Removes specified tags from a resource.
Parameters:
-
resource_arn
(TaggableResourceArn)
–
The Amazon Resource Name (ARN) of the resource to remove tags from.
-
tag_keys
(TagKeyList)
–
A list of tag keys to remove from the resource.
Raises:
-
AccessDeniedException
–
Thrown when the caller does not have sufficient permissions to perform the requested operation.
-
ConflictException
–
Thrown when the request conflicts with the current state of the resource, such as attempting to modify a resource that has been changed by another process.
-
InternalServerException
–
Thrown when an unexpected error occurs on the server side during request processing.
-
ResourceNotFoundException
–
Thrown when the requested resource cannot be found or does not exist.
-
ServiceQuotaExceededException
–
Thrown when the request would exceed the service quotas or limits for the account.
-
ThrottlingException
–
Thrown when the request rate exceeds the allowed limits and the request is being throttled.
-
ValidationException
–
Thrown when the request contains invalid parameters or fails input validation requirements.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_partnercentral_benefits/_services/async_partner_central_benefits.py
| async def untag_resource(
self,
resource_arn: "capo_partnercentral_benefits.types.taggable_resource_arn.TaggableResourceArn",
tag_keys: "capo_partnercentral_benefits.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[AsyncPartnerCentralBenefitsClientConfig] = None,
) -> "capo_partnercentral_benefits.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes specified tags from a resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource to remove tags from.</p>
tag_keys: <p>A list of tag keys to remove from the resource.</p>
Raises:
capo_partnercentral_benefits.errors.access_denied_exception.AccessDeniedException: <p>Thrown when the caller does not have sufficient permissions to perform the requested operation.</p>
capo_partnercentral_benefits.errors.conflict_exception.ConflictException: <p>Thrown when the request conflicts with the current state of the resource, such as attempting to modify a resource that has been changed by another process.</p>
capo_partnercentral_benefits.errors.internal_server_exception.InternalServerException: <p>Thrown when an unexpected error occurs on the server side during request processing.</p>
capo_partnercentral_benefits.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when the requested resource cannot be found or does not exist.</p>
capo_partnercentral_benefits.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Thrown when the request would exceed the service quotas or limits for the account.</p>
capo_partnercentral_benefits.errors.throttling_exception.ThrottlingException: <p>Thrown when the request rate exceeds the allowed limits and the request is being throttled.</p>
capo_partnercentral_benefits.errors.validation_exception.ValidationException: <p>Thrown when the request contains invalid parameters or fails input validation requirements.</p>
capo_partnercentral_benefits.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_partnercentral_benefits.types.untag_resource_request.UntagResourceRequest]",
) -> AsyncOperationResponse[
"capo_partnercentral_benefits.types.untag_resource_response.UntagResourceResponse"
]:
import capo_partnercentral_benefits._operations.partner_central_benefits_service.untag_resource
(
output,
http_response,
) = await capo_partnercentral_benefits._operations.partner_central_benefits_service.untag_resource.async_untag_resource(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UntagResource")
)
input_: capo_partnercentral_benefits.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn,
"tag_keys": tag_keys,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|