Skip to content

CloudFront  >  Operations  >  create_invalidation

create_invalidation

Operation

create_invalidation async

create_invalidation(input: CreateInvalidationInput, plugins: list[Plugin] | None = None) -> CreateInvalidationOutput

Create a new invalidation. For more information, see Invalidating files in the Amazon CloudFront Developer Guide.

Parameters:

Name Type Description Default
input CreateInvalidationInput

An instance of CreateInvalidationInput.

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
CreateInvalidationOutput

An instance of CreateInvalidationOutput.

Input

CreateInvalidationInput dataclass

Bases: _SerdeShape

The request to create an invalidation.

Attributes

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

The distribution's id.

invalidation_batch class-attribute instance-attribute
invalidation_batch: InvalidationBatch | None = ...

The batch information for the invalidation.

Output

CreateInvalidationOutput dataclass

Bases: _SerdeShape

The returned result of the corresponding request.

Attributes

invalidation class-attribute instance-attribute
invalidation: Invalidation | None = ...

The invalidation's information.

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

The fully qualified URI of the distribution and invalidation batch request, including the Invalidation ID.

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.