Skip to content

untag_resource async

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

Deletes the metadata tags from the Amazon RDS Performance Insights resource.

Parameters:

  • service_type (ServiceType) –

    List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

  • resource_arn (AmazonResourceName) –

    The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN).

  • tag_keys (TagKeyList) –

    The metadata assigned to an Amazon RDS Performance Insights resource consisting of a key-value pair.

Raises:

Source code in docs_src/capo_pi/_services/async_pi.py
async def untag_resource(
    self,
    service_type: "capo_pi.types.service_type.ServiceType",
    resource_arn: "capo_pi.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_pi.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncPIClientConfig] = None,
) -> "capo_pi.types.untag_resource_response.UntagResourceResponse":
    """<p>Deletes the metadata tags from the Amazon RDS Performance Insights resource.</p>

    Args:
        service_type: <p>List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is <code>RDS</code>.</p>
        resource_arn: <p>The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an RDS Amazon Resource Name (ARN)</a>.</p>
        tag_keys: <p>The metadata assigned to an Amazon RDS Performance Insights resource consisting of a key-value pair.</p>

    Raises:
        capo_pi.errors.internal_service_error.InternalServiceError: <p>The request failed due to an unknown error.</p>
        capo_pi.errors.invalid_argument_exception.InvalidArgumentException: <p>One of the arguments provided is invalid for this request.</p>
        capo_pi.errors.not_authorized_exception.NotAuthorizedException: <p>The user is not authorized to perform this request.</p>
        capo_pi.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_pi._operations.performance_insightsv20180227.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_pi.types.untag_resource_request.UntagResourceRequest = {
        "service_type": service_type,
        "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