otcextensions.sdk.tms.v1.resource_tag¶
The Resource Tag Class¶
The ResourceTag class inherits from
Resource.
- class otcextensions.sdk.tms.v1.resource_tag.ResourceTag¶
The base resource
- Parameters:
_synchronized – This is not intended to be used directly. See
new()andexisting().connection – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of
self._connectionin Resource code should protect itself with a check for None.
- resource_key: str | None = 'resource_tag'¶
Singular form of key for resource.
- base_path: str = '/resource-tags'¶
The base part of the URI for this resource.
- project_id¶
Properties
- allow_create = True¶
Allow to create operation for this resource.
- allow_fetch = False¶
Allow get operation for this resource.
- allow_commit = False¶
Allow update operation for this resource.
- allow_delete = True¶
Allow to delete operation for this resource.
- allow_list = True¶
Allow list operation for this resource.
- allow_head = False¶
Allow head operation for this resource.
- allow_patch = False¶
Allow patch operation for this resource.
- commit_method: Literal['POST', 'PATCH', 'PUT'] = 'PUT'¶
Method for committing a resource (PUT, PATCH, POST)
- create_method: Literal['POST', 'PUT'] = 'POST'¶
Method for creating a resource (POST, PUT)
- requires_id = False¶
Do calls for this resource require an ID.
- create(session, prepend_key=False, base_path=None)¶
Create a remote resource based on this instance.
- Parameters:
session – The session to use for making this request.
prepend_key – DEPRECATED Configure
create_optsinstead. Whether the resource_key should be prepended in a resource creation request. Default toTrue.base_path – Base part of the URI for creating resources, if different from
base_path.resource_request_key – DEPRECATED Configure
create_optsinstead. Overrides the usage ofresource_keywhen prepending a key to the request body. Ignored if prepend_key is false.resource_response_key – DEPRECATED Configure
create_optsinstead. Overrides the usage ofresource_keywhen processing response bodies. Ignored if prepend_key is false.microversion – API version to override the negotiated one.
params – Additional params to pass.
- Returns:
This
Resourceinstance.- Raises:
MethodNotSupportedifResource.allow_createis not set toTrue.
- delete(session, prepend_key=False, base_path=None)¶
Delete the remote resource based on this instance.
- Parameters:
session – The session to use for making this request.
microversion – API version to override the negotiated one.
base_path – Base part of the URI for modifying resources, if different from
base_path.params – Query string parameters to include in the request URL.
- Returns:
This
Resourceinstance.- Raises:
MethodNotSupportedifResource.allow_commitis not set toTrue.- Raises:
NotFoundExceptionif the resource was not found.