Deletes specified tags from an Batch resource.
Parameters:
-
resource_arn
(String)
–
The Amazon Resource Name (ARN) of the resource from which to delete tags. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported.
-
tag_keys
(Optional[TagKeysList], default:
None
)
–
The keys of the tags to be removed.
Raises:
-
ClientException
–
These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.
-
ServerException
–
These errors are usually caused by a server issue.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
UntagResource Example
This demonstrates calling the UntagResource action.
>>> client.untag_resource(resource_arn='arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1', tag_keys=['Stage'])
Source code in docs_src/capo_batch/_services/batch.py
| def untag_resource(
self,
resource_arn: "capo_batch.types.string.String",
*,
config_overrides: Optional[BatchClientConfig] = None,
tag_keys: Optional["capo_batch.types.tag_keys_list.TagKeysList"] = None,
) -> "capo_batch.types.untag_resource_response.UntagResourceResponse":
"""<p>Deletes specified tags from an Batch resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource from which to delete tags. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported.</p>
tag_keys: <p>The keys of the tags to be removed.</p>
Raises:
capo_batch.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.</p>
capo_batch.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
capo_batch.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
UntagResource Example
This demonstrates calling the UntagResource action.
>>> client.untag_resource(resource_arn='arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1', tag_keys=['Stage'])
"""
def _handler(
req: "OperationRequest[capo_batch.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_batch.types.untag_resource_response.UntagResourceResponse"
]:
import capo_batch._operations.aws_batch_v20160810.untag_resource
output, http_response = (
capo_batch._operations.aws_batch_v20160810.untag_resource.untag_resource(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UntagResource")
)
input_: capo_batch.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn
}
if tag_keys is not None:
input_["tag_keys"] = tag_keys
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|