Skip to content

untag_resource

untag_resource(
    resource: TaggableResource,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
) -> None

Removes tags from a Lambda MicroVM resource.

Parameters:

  • resource (TaggableResource) –

    The ARN of the resource to remove tags from.

  • tag_keys (TagKeyList) –

    The list of tag keys to remove from the resource.

Raises:

Source code in docs_src/capo_lambda_microvms/_services/lambda_microvms.py
def untag_resource(
    self,
    resource: "capo_lambda_microvms.types.taggable_resource.TaggableResource",
    tag_keys: "capo_lambda_microvms.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
) -> None:
    """<p>Removes tags from a Lambda MicroVM resource.</p>

    Args:
        resource: <p>The ARN of the resource to remove tags from.</p>
        tag_keys: <p>The list of tag keys to remove from the resource.</p>

    Raises:
        capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
        capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
        capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
        capo_lambda_microvms.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
        capo_lambda_microvms.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
        capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_lambda_microvms.errors.service_exception.ServiceException: <p>The AWS Lambda MicroVMs service encountered an internal error.</p>
        capo_lambda_microvms.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. Retry the request later.</p>
        capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lambda_microvms.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[None]:
        import capo_lambda_microvms._operations.lambda_microvms.untag_resource

        output, http_response = (
            capo_lambda_microvms._operations.lambda_microvms.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_lambda_microvms.types.untag_resource_request.UntagResourceRequest = {
        "resource": resource,
        "tag_keys": tag_keys,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output