delete_response_headers_policy
async
¶
delete_response_headers_policy(
id: string,
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
if_match: Optional[string] = None,
) -> None
Deletes a response headers policy.
You cannot delete a response headers policy if it's attached to a cache behavior. First update your distributions to remove the response headers policy from all cache behaviors, then delete the response headers policy.
To delete a response headers policy, you must provide the policy's identifier and version. To get these values, you can use ListResponseHeadersPolicies or GetResponseHeadersPolicy.
Parameters:
-
id(string) –The identifier for the response headers policy that you are deleting.
To get the identifier, you can use
ListResponseHeadersPolicies. -
if_match(Optional[string], default:None) –The version of the response headers policy that you are deleting.
The version is the response headers policy's
ETagvalue, which you can get usingListResponseHeadersPolicies,GetResponseHeadersPolicy, orGetResponseHeadersPolicyConfig.
Raises:
-
AccessDenied–Access denied.
-
IllegalDelete–Deletion is not allowed for this entity.
-
InvalidIfMatchVersion–The
If-Matchversion is missing or not valid. -
NoSuchResponseHeadersPolicy–The response headers policy does not exist.
-
PreconditionFailed–The precondition in one or more of the request fields evaluated to
false. -
ResponseHeadersPolicyInUse–Cannot delete the response headers policy because it is attached to one or more cache behaviors in a CloudFront distribution.
-
UnknownServiceError–The service returned an error code this client does not model.