Skip to content

untag_resource async

untag_resource(
    workload_arn: WorkloadArn,
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    tag_keys: Optional[TagKeyList] = None,
) -> UntagResourceOutput

Deletes specified tags from a resource.

The WorkloadArn parameter can be a workload ARN, a custom lens ARN, a profile ARN, or review template ARN.

To specify multiple tags, use separate tagKeys parameters, for example:

DELETE /tags/WorkloadArn?tagKeys=key1&tagKeys=key2

Parameters:

  • tag_keys (Optional[TagKeyList], default: None ) –

    A list of tag keys. Existing tags of the resource whose keys are members of this list are removed from the resource.

Raises:

Source code in docs_src/capo_wellarchitected/_services/async_well_architected.py
async def untag_resource(
    self,
    workload_arn: "capo_wellarchitected.types.workload_arn.WorkloadArn",
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    tag_keys: Optional["capo_wellarchitected.types.tag_key_list.TagKeyList"] = None,
) -> "capo_wellarchitected.types.untag_resource_output.UntagResourceOutput":
    """<p>Deletes specified tags from a resource.</p> <note> <p>The WorkloadArn parameter can be a workload ARN, a custom lens ARN, a profile ARN, or review template ARN.</p> </note> <p>To specify multiple tags, use separate <b>tagKeys</b> parameters, for example:</p> <p> <code>DELETE /tags/WorkloadArn?tagKeys=key1&amp;tagKeys=key2</code> </p>

    Args:
        tag_keys: <p>A list of tag keys. Existing tags of the resource whose keys are members of this list are removed from the resource.</p>

    Raises:
        capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
        capo_wellarchitected.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_wellarchitected.types.untag_resource_input.UntagResourceInput]",
    ) -> AsyncOperationResponse[
        "capo_wellarchitected.types.untag_resource_output.UntagResourceOutput"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.untag_resource

        (
            output,
            http_response,
        ) = await capo_wellarchitected._operations.well_architected_api_service_lambda.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_wellarchitected.types.untag_resource_input.UntagResourceInput = {
        "workload_arn": workload_arn
    }
    if tag_keys is not None:
        input_["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