Skip to content

untag_resource

untag_resource(
    resource_arn: Arn,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[LocationClientConfig] = None,
) -> UntagResourceResponse

Removes one or more tags from the specified Amazon Location resource.

Parameters:

  • resource_arn (Arn) –

    The Amazon Resource Name (ARN) of the resource from which you want to remove tags.

    • Format example: arn:aws:geo:region:account-id:resourcetype/ExampleResource

  • tag_keys (TagKeys) –

    The list of tag keys to remove from the specified resource.

Raises:

  • AccessDeniedException –

    The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

  • InternalServerException –

    The request has failed to process because of an unknown server error, exception, or failure.

  • ResourceNotFoundException –

    The resource that you've entered was not found in your AWS account.

  • ThrottlingException –

    The request was denied because of request throttling.

  • ValidationException –

    The input failed to meet the constraints specified by the AWS service.

  • UnknownServiceError –

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

Source code in docs_src/capo_location/_services/location.py
def untag_resource(
    self,
    resource_arn: "capo_location.types.arn.Arn",
    tag_keys: "capo_location.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[LocationClientConfig] = None,
) -> "capo_location.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes one or more tags from the specified Amazon Location resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource from which you want to remove tags.</p> <ul> <li> <p>Format example: <code>arn:aws:geo:region:account-id:resourcetype/ExampleResource</code> </p> </li> </ul>
        tag_keys: <p>The list of tag keys to remove from the specified resource.</p>

    Raises:
        capo_location.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.</p>
        capo_location.errors.internal_server_exception.InternalServerException: <p>The request has failed to process because of an unknown server error, exception, or failure.</p>
        capo_location.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource that you've entered was not found in your AWS account.</p>
        capo_location.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling.</p>
        capo_location.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service. </p>
        capo_location.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_location._operations.location_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_location.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