Skip to content

untag_resource

untag_resource(
    resource_arn: str,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[SnowDeviceManagementClientConfig] = None,
) -> None

Removes a tag from a device or task.

Parameters:

  • resource_arn (str) –

    The Amazon Resource Name (ARN) of the device or task.

  • tag_keys (TagKeys) –

    Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.

Raises:

Source code in docs_src/capo_snow_device_management/_services/snow_device_management.py
def untag_resource(
    self,
    resource_arn: str,
    tag_keys: "capo_snow_device_management.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[SnowDeviceManagementClientConfig] = None,
) -> None:
    """<p>Removes a tag from a device or task.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the device or task.</p>
        tag_keys: <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment.</p>

    Raises:
        capo_snow_device_management.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing the request.</p>
        capo_snow_device_management.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that doesn't exist.</p>
        capo_snow_device_management.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_snow_device_management.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_snow_device_management.types.untag_resource_input.UntagResourceInput]",
    ) -> OperationResponse[None]:
        import capo_snow_device_management._operations.snow_device_management.untag_resource

        output, http_response = (
            capo_snow_device_management._operations.snow_device_management.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_snow_device_management.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