Skip to content

untag_resource async

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

Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:

  • To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see the documentation for the service whose resource you want to untag.

  • You can only tag resources that are located in the specified Amazon Web Services Region for the calling Amazon Web Services account.

Minimum permissions

In addition to the tag:UntagResources permission required by this operation, you must also have the remove tags permission defined by the service that created the resource. For example, to remove the tags from an Amazon EC2 instance using the UntagResources operation, you must have both of the following permissions:

tag:UntagResource

ChimeSDKMeetings:DeleteTags

Parameters:

  • resource_arn (AmazonResourceName) –

    The ARN of the resource that you're removing tags from.

  • tag_keys (TagKeyList) –

    The tag keys being removed from the resources.

Raises:

Source code in docs_src/capo_chime_sdk_meetings/_services/async_chime_sdk_meetings.py
async def untag_resource(
    self,
    resource_arn: "capo_chime_sdk_meetings.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_chime_sdk_meetings.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncChimeSDKMeetingsClientConfig] = None,
) -> "capo_chime_sdk_meetings.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:</p> <ul> <li> <p>To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see the documentation for the service whose resource you want to untag.</p> </li> <li> <p>You can only tag resources that are located in the specified Amazon Web Services Region for the calling Amazon Web Services account.</p> </li> </ul> <p> <b>Minimum permissions</b> </p> <p>In addition to the <code>tag:UntagResources</code> permission required by this operation, you must also have the remove tags permission defined by the service that created the resource. For example, to remove the tags from an Amazon EC2 instance using the <code>UntagResources</code> operation, you must have both of the following permissions:</p> <p> <code>tag:UntagResource</code> </p> <p> <code>ChimeSDKMeetings:DeleteTags</code> </p>

    Args:
        resource_arn: <p>The ARN of the resource that you're removing tags from.</p>
        tag_keys: <p>The tag keys being removed from the resources.</p>

    Raises:
        capo_chime_sdk_meetings.errors.bad_request_exception.BadRequestException: <p>The input parameters don't match the service's restrictions.</p>
        capo_chime_sdk_meetings.errors.forbidden_exception.ForbiddenException: <p>The client is permanently forbidden from making the request.</p>
        capo_chime_sdk_meetings.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeds the resource limit.</p>
        capo_chime_sdk_meetings.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource that you want to tag couldn't be found.</p>
        capo_chime_sdk_meetings.errors.service_failure_exception.ServiceFailureException: <p>The service encountered an unexpected error.</p>
        capo_chime_sdk_meetings.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
        capo_chime_sdk_meetings.errors.throttling_exception.ThrottlingException: <p>The number of customer requests exceeds the request rate limit.</p>
        capo_chime_sdk_meetings.errors.unauthorized_exception.UnauthorizedException: <p>The user isn't authorized to request a resource.</p>
        capo_chime_sdk_meetings.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_chime_sdk_meetings._operations.chime_meetings_sdk_service.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_chime_sdk_meetings.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