Skip to content

untag_contact async

untag_contact(
    contact_id: ContactId,
    instance_id: InstanceId,
    tag_keys: ContactTagKeys,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
) -> UntagContactResponse

Removes the specified tags from the contact resource. For more information about this API is used, see Set up granular billing for a detailed view of your Connect Customer usage.

Parameters:

  • contact_id (ContactId) –

    The identifier of the contact in this instance of Connect Customer.

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • tag_keys (ContactTagKeys) –

    A list of tag keys. Existing tags on the contact whose keys are members of this list will be removed.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def untag_contact(
    self,
    contact_id: "capo_connect.types.contact_id.ContactId",
    instance_id: "capo_connect.types.instance_id.InstanceId",
    tag_keys: "capo_connect.types.contact_tag_keys.ContactTagKeys",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
) -> "capo_connect.types.untag_contact_response.UntagContactResponse":
    """<p>Removes the specified tags from the contact resource. For more information about this API is used, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/granular-billing.html">Set up granular billing for a detailed view of your Connect Customer usage</a>.</p>

    Args:
        contact_id: <p>The identifier of the contact in this instance of Connect Customer. </p>
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        tag_keys: <p>A list of tag keys. Existing tags on the contact whose keys are members of this list will be removed.</p>

    Raises:
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_active_region_exception.InvalidActiveRegionException: <p>This exception occurs when an API request is made to a non-active region in an Amazon Connect instance configured with Amazon Connect Global Resiliency. For example, if the active region is US West (Oregon) and a request is made to US East (N. Virginia), the exception will be returned.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.untag_contact_request.UntagContactRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.untag_contact_response.UntagContactResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.untag_contact

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.untag_contact.async_untag_contact(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UntagContact")
    )
    input_: capo_connect.types.untag_contact_request.UntagContactRequest = {
        "contact_id": contact_id,
        "instance_id": instance_id,
        "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