Skip to content

CloudFront  >  Operations  >  list_cache_policies

list_cache_policies

Operation

list_cache_policies async

list_cache_policies(input: ListCachePoliciesInput, plugins: list[Plugin] | None = None) -> ListCachePoliciesOutput

Gets a list of cache policies.

You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or only the custom policies created in your Amazon Web Services account.

You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request.

Parameters:

Name Type Description Default
input ListCachePoliciesInput

An instance of ListCachePoliciesInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ListCachePoliciesOutput

An instance of ListCachePoliciesOutput.

Input

ListCachePoliciesInput dataclass

Bases: _SerdeShape

Dataclass for ListCachePoliciesInput structure.

Attributes

marker class-attribute instance-attribute
marker: str | None = ...

Use this field when paginating results to indicate where to begin in your list of cache policies. The response includes cache policies in the list that occur after the marker. To get the next page of the list, set this field's value to the value of NextMarker from the current page's response.

max_items class-attribute instance-attribute
max_items: int | None = ...

The maximum number of cache policies that you want in the response.

type class-attribute instance-attribute
type: str | None = ...

A filter to return only the specified kinds of cache policies. Valid values are:

  • managed -- Returns only the managed policies created by Amazon Web Services.

  • custom -- Returns only the custom policies created in your Amazon Web Services account.

Output

ListCachePoliciesOutput dataclass

Bases: _SerdeShape

Dataclass for ListCachePoliciesOutput structure.

Attributes

cache_policy_list class-attribute instance-attribute
cache_policy_list: CachePolicyList | None = ...

A list of cache policies.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.