CloudFront / Client / delete_function
delete_function#
- CloudFront.Client.delete_function(**kwargs)#
Deletes a CloudFront function.
You cannot delete a function if it’s associated with a cache behavior. First, update your distributions to remove the function association from all cache behaviors, then delete the function.
To delete a function, you must provide the function’s name and version (
ETag
value). To get these values, you can useListFunctions
andDescribeFunction
.See also: AWS API Documentation
Request Syntax
response = client.delete_function( Name='string', IfMatch='string' )
- Parameters:
Name (string) –
[REQUIRED]
The name of the function that you are deleting.
IfMatch (string) –
[REQUIRED]
The current version (
ETag
value) of the function that you are deleting, which you can get usingDescribeFunction
.
- Returns:
None
Exceptions
CloudFront.Client.exceptions.PreconditionFailed
CloudFront.Client.exceptions.UnsupportedOperation
CloudFront.Client.exceptions.FunctionInUse
CloudFront.Client.exceptions.NoSuchFunctionExists
CloudFront.Client.exceptions.InvalidIfMatchVersion