Removes tags from a resource in CodeArtifact.
Parameters:
-
resource_arn
(Arn)
–
The Amazon Resource Name (ARN) of the resource that you want to remove tags from.
-
tag_keys
(TagKeyList)
–
The tag key for each tag that you want to remove from the resource.
Raises:
-
AccessDeniedException
–
The operation did not succeed because of an unauthorized access attempt.
-
ResourceNotFoundException
–
The operation did not succeed because the resource requested is not found in the service.
-
ThrottlingException
–
The operation did not succeed because too many requests are sent to the service.
-
ValidationException
–
The operation did not succeed because a parameter in the request was sent with an invalid value.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_codeartifact/_services/codeartifact.py
| def untag_resource(
self,
resource_arn: "capo_codeartifact.types.arn.Arn",
tag_keys: "capo_codeartifact.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[codeartifactClientConfig] = None,
) -> "capo_codeartifact.types.untag_resource_result.UntagResourceResult":
"""<p>Removes tags from a resource in CodeArtifact.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource that you want to remove tags from.</p>
tag_keys: <p>The tag key for each tag that you want to remove from the resource.</p>
Raises:
capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codeartifact.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_codeartifact.types.untag_resource_result.UntagResourceResult"
]:
import capo_codeartifact._operations.code_artifact_control_plane_service.untag_resource
output, http_response = (
capo_codeartifact._operations.code_artifact_control_plane_service.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_codeartifact.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn,
"tag_keys": tag_keys,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|