Skip to content

untag_resource async

untag_resource(
    resource_arn: TagArn,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
) -> None

Removes one or more tags from the specified resource.

Parameters:

  • resource_arn (TagArn) –

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

  • tag_keys (TagKeyList) –

    The list of tag keys to remove from the resource.

Raises:

Examples:

Remove tags from a resource

>>> await client.untag_resource(resource_arn='arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel', tag_keys=['key3', 'key4'])
Source code in docs_src/capo_mediapackagev2/_services/async_media_package_v2.py
async def untag_resource(
    self,
    resource_arn: "capo_mediapackagev2.types.tag_arn.TagArn",
    tag_keys: "capo_mediapackagev2.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
) -> None:
    """<p>Removes one or more tags from the specified resource.</p>

    Args:
        resource_arn: <p>The ARN of the MediaPackage resource that you're removing tags from.</p>
        tag_keys: <p>The list of tag keys to remove from the resource.</p>

    Raises:
        capo_mediapackagev2.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service.</p>
        capo_mediapackagev2.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Remove tags from a resource

        >>> await client.untag_resource(resource_arn='arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel', tag_keys=['key3', 'key4'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediapackagev2.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_mediapackagev2._operations.mediapackagev2.untag_resource

        (
            output,
            http_response,
        ) = await capo_mediapackagev2._operations.mediapackagev2.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_mediapackagev2.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