Skip to content

untag_resource

untag_resource(
    resource_arn: str,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[LaunchWizardClientConfig] = None,
) -> UntagResourceOutput

Removes the specified tags from the given resource.

Parameters:

  • resource_arn (str) –

    The Amazon Resource Name (ARN) of the resource.

  • tag_keys (TagKeyList) –

    Keys identifying the tags to remove.

Raises:

Examples:

Removing tags on a Launch Wizard deployment resource.

>>> client.untag_resource(resource_arn='arn:aws:launchwizard:us-east-1:123456789012:deployment/11111111-1111-1111-1111-111111111111', tag_keys=['key1', 'key2'])
Source code in docs_src/capo_launch_wizard/_services/launch_wizard.py
def untag_resource(
    self,
    resource_arn: str,
    tag_keys: "capo_launch_wizard.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[LaunchWizardClientConfig] = None,
) -> "capo_launch_wizard.types.untag_resource_output.UntagResourceOutput":
    """<p>Removes the specified tags from the given resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource.</p>
        tag_keys: <p>Keys identifying the tags to remove.</p>

    Raises:
        capo_launch_wizard.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
        capo_launch_wizard.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified workload or deployment resource can't be found.</p>
        capo_launch_wizard.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_launch_wizard.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Removing tags on a Launch Wizard deployment resource.

        >>> client.untag_resource(resource_arn='arn:aws:launchwizard:us-east-1:123456789012:deployment/11111111-1111-1111-1111-111111111111', tag_keys=['key1', 'key2'])
    """

    def _handler(
        req: "OperationRequest[capo_launch_wizard.types.untag_resource_input.UntagResourceInput]",
    ) -> OperationResponse[
        "capo_launch_wizard.types.untag_resource_output.UntagResourceOutput"
    ]:
        import capo_launch_wizard._operations.launch_wizard.untag_resource

        output, http_response = (
            capo_launch_wizard._operations.launch_wizard.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_launch_wizard.types.untag_resource_input.UntagResourceInput = {
        "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