Skip to content

untag_resource async

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

Detaches a key-value pair from the specified resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities.

Parameters:

  • resource_arn (AmazonResourceName) –

    Specifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.

  • tag_keys (TagKeyList) –

    Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.

Raises:

  • InternalServerException –

    This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.

  • ResourceNotFoundException –

    Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.

  • ValidationException –

    Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.

  • UnknownServiceError –

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

Examples:

Sample UntagResource call

>>> await client.untag_resource(resource_arn='arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9', tag_keys=['sampleKey'])
Source code in docs_src/capo_b2bi/_services/async_b2bi.py
async def untag_resource(
    self,
    resource_arn: "capo_b2bi.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_b2bi.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[Asyncb2biClientConfig] = None,
) -> None:
    """<p>Detaches a key-value pair from the specified resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities.</p>

    Args:
        resource_arn: <p>Specifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.</p>
        tag_keys: <p>Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.</p>

    Raises:
        capo_b2bi.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.</p>
        capo_b2bi.errors.resource_not_found_exception.ResourceNotFoundException: <p>Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.</p>
        capo_b2bi.errors.validation_exception.ValidationException: <p>Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.</p>
        capo_b2bi.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Sample UntagResource call

        >>> await client.untag_resource(resource_arn='arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9', tag_keys=['sampleKey'])
    """

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

        (
            output,
            http_response,
        ) = await capo_b2bi._operations.b2_bi.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_b2bi.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