Skip to content

untag_resource async

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

Removes the specified user-defined tags from an Amazon S3 Tables resource. You can pass one or more tag keys.

For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources.

Permissions

For tables, table buckets, and S3 Storage Lens for Tables configurations, you must have the s3tables:UntagResource permission to use this operation.

Parameters:

Raises:

  • BadRequestException –

    The request is invalid or malformed.

  • ConflictException –

    The request conflicts with the resource's current state, such as a previous write, an existing table, or a migration that's in progress or already in the requested state. If the conflict is with a concurrent write, you can retry the request.

  • ForbiddenException –

    The caller isn't authorized to make the request.

  • InternalServerErrorException –

    The request failed due to an internal server error.

  • NotFoundException –

    The request was rejected because the specified resource could not be found.

  • TooManyRequestsException –

    The limit on the number of requests per second was exceeded.

  • UnknownServiceError –

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

Source code in docs_src/capo_s3tables/_services/async_s3_tables.py
async def untag_resource(
    self,
    resource_arn: "capo_s3tables.types.resource_arn.ResourceArn",
    tag_keys: "capo_s3tables.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncS3TablesClientConfig] = None,
) -> "capo_s3tables.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes the specified user-defined tags from an Amazon S3 Tables resource. You can pass one or more tag keys. </p> <note> <p>For a list of S3 resources that support tagging, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#manage-tags">Managing tags for Amazon S3 resources</a>.</p> </note> <dl> <dt>Permissions</dt> <dd> <p>For tables, table buckets, and S3 Storage Lens for Tables configurations, you must have the <code>s3tables:UntagResource</code> permission to use this operation.</p> </dd> </dl>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the Amazon S3 Tables resource that you're removing tags from. The tagged resource can be a table bucket, a table, or an S3 Storage Lens for Tables configuration. For a list of all S3 resources that support tagging, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#manage-tags">Managing tags for Amazon S3 resources</a>.</p>
        tag_keys: <p>The array of tag keys that you're removing from the S3 Tables resource. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Tagging for cost allocation or attribute-based access control (ABAC)</a>.</p>

    Raises:
        capo_s3tables.errors.bad_request_exception.BadRequestException: <p>The request is invalid or malformed.</p>
        capo_s3tables.errors.conflict_exception.ConflictException: <p>The request conflicts with the resource's current state, such as a previous write, an existing table, or a migration that's in progress or already in the requested state. If the conflict is with a concurrent write, you can retry the request.</p>
        capo_s3tables.errors.forbidden_exception.ForbiddenException: <p>The caller isn't authorized to make the request.</p>
        capo_s3tables.errors.internal_server_error_exception.InternalServerErrorException: <p>The request failed due to an internal server error.</p>
        capo_s3tables.errors.not_found_exception.NotFoundException: <p>The request was rejected because the specified resource could not be found.</p>
        capo_s3tables.errors.too_many_requests_exception.TooManyRequestsException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_s3tables.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_s3tables.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_s3tables.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_s3tables._operations.s3_table_buckets.untag_resource

        (
            output,
            http_response,
        ) = await capo_s3tables._operations.s3_table_buckets.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_s3tables.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