Removes tags from a specified resource.
Parameters:
-
resource_arn
(TaggableArn)
–
The Amazon Resource Name (ARN) of the resource to remove tags from.
-
tag_keys
(TagKeyList)
–
The keys of the tags to remove from the resource.
Raises:
Examples:
Example for UntagResource
>>> client.untag_resource(resource_arn='arn:aws:partnercentral:us-east-1:123456789012:catalog/AWS/channel-handshake/ch-4fj3bd2o3vb91', tag_keys=['ExampleKey'])
Source code in docs_src/capo_partnercentral_channel/_services/partner_central_channel.py
| def untag_resource(
self,
resource_arn: "capo_partnercentral_channel.types.taggable_arn.TaggableArn",
tag_keys: "capo_partnercentral_channel.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[PartnerCentralChannelClientConfig] = None,
) -> "capo_partnercentral_channel.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes tags from a specified resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource to remove tags from.</p>
tag_keys: <p>The keys of the tags to remove from the resource.</p>
Raises:
capo_partnercentral_channel.errors.access_denied_exception.AccessDeniedException: <p>The request was denied due to insufficient permissions.</p>
capo_partnercentral_channel.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request.</p>
capo_partnercentral_channel.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_partnercentral_channel.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests being sent in a short period.</p>
capo_partnercentral_channel.errors.validation_exception.ValidationException: <p>The request failed validation due to invalid input parameters.</p>
capo_partnercentral_channel.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
capo_partnercentral_channel.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Example for UntagResource
>>> client.untag_resource(resource_arn='arn:aws:partnercentral:us-east-1:123456789012:catalog/AWS/channel-handshake/ch-4fj3bd2o3vb91', tag_keys=['ExampleKey'])
"""
def _handler(
req: "OperationRequest[capo_partnercentral_channel.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_partnercentral_channel.types.untag_resource_response.UntagResourceResponse"
]:
import capo_partnercentral_channel._operations.partner_central_channel.untag_resource
output, http_response = (
capo_partnercentral_channel._operations.partner_central_channel.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_partnercentral_channel.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
|