Removes tags from a function, event source mapping, or code signing configuration.
Parameters:
-
resource
(TaggableResource)
–
The resource's Amazon Resource Name (ARN).
-
tag_keys
(TagKeyList)
–
A list of tag keys to remove from the resource.
Raises:
Examples:
To remove tags from an existing Lambda function
The following example removes the tag with the key name DEPARTMENT tag from the my-function Lambda function.
>>> client.untag_resource(resource='arn:aws:lambda:us-west-2:123456789012:function:my-function', tag_keys=['DEPARTMENT'])
Source code in docs_src/capo_lambda/_services/_lambda.py
| def untag_resource(
self,
resource: "capo_lambda.types.taggable_resource.TaggableResource",
tag_keys: "capo_lambda.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[LambdaClientConfig] = None,
) -> None:
"""<p>Removes <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> from a function, event source mapping, or code signing configuration.</p>
Args:
resource: <p>The resource's Amazon Resource Name (ARN).</p>
tag_keys: <p>A list of tag keys to remove from the resource.</p>
Raises:
capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To remove tags from an existing Lambda function
The following example removes the tag with the key name DEPARTMENT tag from the my-function Lambda function.
>>> client.untag_resource(resource='arn:aws:lambda:us-west-2:123456789012:function:my-function', tag_keys=['DEPARTMENT'])
"""
def _handler(
req: "OperationRequest[capo_lambda.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[None]:
import capo_lambda._operations.aws_gir_api_service.untag_resource
output, http_response = (
capo_lambda._operations.aws_gir_api_service.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.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
|