Skip to content

untag_resource

untag_resource(
    resource_arn: TaggableResourceArn,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[PartnerCentralAccountClientConfig] = None,
) -> UntagResourceResponse

Removes specified tags from an AWS Partner Central Account 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 specified resource.

Raises:

  • AccessDeniedException –

    The request was denied due to insufficient permissions. The caller does not have the required permissions to perform this operation.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the resource. This typically occurs when trying to create a resource that already exists or modify a resource that has been changed by another process.

  • InternalServerException –

    An internal server error occurred while processing the request. This is typically a temporary condition and the request may be retried.

  • ResourceNotFoundException –

    The specified resource could not be found. This may occur when referencing a resource that does not exist or has been deleted.

  • ThrottlingException –

    The request was throttled due to too many requests being sent in a short period of time. The client should implement exponential backoff and retry the request.

  • ValidationException –

    The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_partnercentral_account/_services/partner_central_account.py
def untag_resource(
    self,
    resource_arn: "capo_partnercentral_account.types.taggable_resource_arn.TaggableResourceArn",
    tag_keys: "capo_partnercentral_account.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[PartnerCentralAccountClientConfig] = None,
) -> "capo_partnercentral_account.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes specified tags from an AWS Partner Central Account 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 specified resource.</p>

    Raises:
        capo_partnercentral_account.errors.access_denied_exception.AccessDeniedException: <p>The request was denied due to insufficient permissions. The caller does not have the required permissions to perform this operation.</p>
        capo_partnercentral_account.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. This typically occurs when trying to create a resource that already exists or modify a resource that has been changed by another process.</p>
        capo_partnercentral_account.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request. This is typically a temporary condition and the request may be retried.</p>
        capo_partnercentral_account.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found. This may occur when referencing a resource that does not exist or has been deleted.</p>
        capo_partnercentral_account.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests being sent in a short period of time. The client should implement exponential backoff and retry the request.</p>
        capo_partnercentral_account.errors.validation_exception.ValidationException: <p>The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.</p>
        capo_partnercentral_account.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_partnercentral_account.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[
        "capo_partnercentral_account.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_partnercentral_account._operations.partner_central_account.untag_resource

        output, http_response = (
            capo_partnercentral_account._operations.partner_central_account.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_account.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