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 use ListFunctions and DescribeFunction .
See also: AWS API Documentation
Request Syntax
response = client.delete_function(
Name='string',
IfMatch='string'
)
[REQUIRED]
The name of the function that you are deleting.
[REQUIRED]
The current version ( ETag value) of the function that you are deleting, which you can get using DescribeFunction .
None
Exceptions
CloudFront.Client.exceptions.InvalidIfMatchVersionCloudFront.Client.exceptions.NoSuchFunctionExistsCloudFront.Client.exceptions.FunctionInUseCloudFront.Client.exceptions.PreconditionFailedCloudFront.Client.exceptions.UnsupportedOperation