Skip to content

untag_resource

untag_resource(
    resource_id: ResourceId,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[S3FilesClientConfig] = None,
) -> None

Removes tags from S3 Files resources.

Parameters:

  • resource_id (ResourceId) –

    The ID or Amazon Resource Name (ARN) of the resource to remove tags from.

  • tag_keys (TagKeys) –

    An array of tag keys to remove from the resource.

Raises:

Source code in docs_src/capo_s3files/_services/s3_files.py
def untag_resource(
    self,
    resource_id: "capo_s3files.types.resource_id.ResourceId",
    tag_keys: "capo_s3files.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[S3FilesClientConfig] = None,
) -> None:
    """<p>Removes tags from S3 Files resources.</p>

    Args:
        resource_id: <p>The ID or Amazon Resource Name (ARN) of the resource to remove tags from.</p>
        tag_keys: <p>An array of tag keys to remove from the resource.</p>

    Raises:
        capo_s3files.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry your request using exponential backoff.</p>
        capo_s3files.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_s3files.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource exists and that you have permission to access it.</p>
        capo_s3files.errors.validation_exception.ValidationException: <p>The input parameters are not valid. Check the parameter values and try again.</p>
        capo_s3files.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_s3files.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[None]:
        import capo_s3files._operations.s3_files.untag_resource

        output, http_response = (
            capo_s3files._operations.s3_files.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_s3files.types.untag_resource_request.UntagResourceRequest = {
        "resource_id": resource_id,
        "tag_keys": tag_keys,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output