Skip to content

untag_resource

untag_resource(
    service_type: ServiceType,
    resource_arn: AmazonResourceName,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[PIClientConfig] = 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/pi.py
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[PIClientConfig] = 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.
    """

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

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

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