update_distribution¶
Operation¶
update_distribution
async
¶
update_distribution(input: UpdateDistributionInput, plugins: list[Plugin] | None = None) -> UpdateDistributionOutput
Updates the configuration for a CloudFront distribution.
The update process includes getting the current distribution
configuration, updating it to make your changes, and then submitting an
UpdateDistribution request to make the updates.
To update a web distribution using the CloudFront API
-
Use
GetDistributionConfigto get the current configuration, including the version identifier (ETag). -
Update the distribution configuration that was returned in the response. Note the following important requirements and restrictions:
-
You must copy the
ETagfield value from the response. (You'll use it for theIfMatchparameter in your request.) Then, remove theETagfield from the distribution configuration. -
You can't change the value of
CallerReference.
-
-
Submit an
UpdateDistributionrequest, providing the updated distribution configuration. The new configuration replaces the existing configuration. The values that you specify in anUpdateDistributionrequest are not merged into your existing configuration. Make sure to include all fields: the ones that you modified and also the ones that you didn't.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
UpdateDistributionInput
|
An instance of |
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 |
|---|---|
UpdateDistributionOutput
|
An instance of |
Input¶
UpdateDistributionInput
dataclass
¶
Output¶
UpdateDistributionOutput
dataclass
¶
Bases: _SerdeShape
The returned result of the corresponding request.
Attributes¶
distribution
class-attribute
instance-attribute
¶
The distribution's information.
e_tag
class-attribute
instance-attribute
¶
e_tag: str | None = ...
The current version of the configuration. For example: E2QWRUHAPOMQZL.
response_metadata
class-attribute
instance-attribute
¶
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.