Skip to content

untag_resource async

untag_resource(
    resource_arn: ResourceArn,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[AsyncsyntheticsClientConfig] = None,
) -> UntagResourceResponse

Removes one or more tags from the specified resource.

Parameters:

  • resource_arn (ResourceArn) –

    The ARN of the canary or group that you're removing tags from.

    The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name .

    The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name

  • tag_keys (TagKeyList) –

    The list of tag keys to remove from the resource.

Raises:

Source code in docs_src/capo_synthetics/_services/async_synthetics.py
async def untag_resource(
    self,
    resource_arn: "capo_synthetics.types.resource_arn.ResourceArn",
    tag_keys: "capo_synthetics.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncsyntheticsClientConfig] = None,
) -> "capo_synthetics.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes one or more tags from the specified resource.</p>

    Args:
        resource_arn: <p>The ARN of the canary or group that you're removing tags from.</p> <p>The ARN format of a canary is <code>arn:aws:synthetics:<i>Region</i>:<i>account-id</i>:canary:<i>canary-name</i> </code>.</p> <p>The ARN format of a group is <code>arn:aws:synthetics:<i>Region</i>:<i>account-id</i>:group:<i>group-name</i> </code> </p>
        tag_keys: <p>The list of tag keys to remove from the resource.</p>

    Raises:
        capo_synthetics.errors.bad_request_exception.BadRequestException: <p>The request was not valid.</p>
        capo_synthetics.errors.conflict_exception.ConflictException: <p>A conflicting operation is already in progress.</p>
        capo_synthetics.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred. Try the operation again.</p>
        capo_synthetics.errors.not_found_exception.NotFoundException: <p>The specified resource was not found.</p>
        capo_synthetics.errors.too_many_requests_exception.TooManyRequestsException: <p>There were too many simultaneous requests. Try the operation again.</p>
        capo_synthetics.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_synthetics._operations.synthetics.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_synthetics.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