update_distribution
async
¶
update_distribution(
distribution_config: DistributionConfig,
id: string,
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
if_match: Optional[string] = None,
) -> UpdateDistributionResult
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:
-
distribution_config(DistributionConfig) –The distribution's configuration information.
-
id(string) –The distribution's id.
-
if_match(Optional[string], default:None) –The value of the
ETagheader that you received when retrieving the distribution's configuration. For example:E2QWRUHAPOMQZL.
Raises:
-
AccessDenied–Access denied.
-
CNAMEAlreadyExists–The CNAME specified is already defined for CloudFront.
-
ContinuousDeploymentPolicyInUse–You cannot delete a continuous deployment policy that is associated with a primary distribution.
-
EntityNotFound–The entity was not found.
-
IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior–The specified configuration for field-level encryption can't be associated with the specified cache behavior.
-
IllegalOriginAccessConfiguration–An origin cannot contain both an origin access control (OAC) and an origin access identity (OAI).
-
IllegalUpdate–The update contains modifications that are not allowed.
-
InconsistentQuantities–The value of
Quantityand the size ofItemsdon't match. -
InvalidArgument–An argument is invalid.
-
InvalidDefaultRootObject–The default root object file name is too big or contains an invalid character.
-
InvalidDomainNameForOriginAccessControl–An origin access control is associated with an origin whose domain name is not supported.
-
InvalidErrorCode–An invalid error code was specified.
-
InvalidForwardCookies–Your request contains forward cookies option which doesn't match with the expectation for the
whitelistedlist of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected. -
InvalidFunctionAssociation–A CloudFront function association is invalid.
-
InvalidGeoRestrictionParameter–The specified geo restriction parameter is not valid.
-
InvalidHeadersForS3Origin–The headers specified are not valid for an Amazon S3 origin.
-
InvalidIfMatchVersion–The
If-Matchversion is missing or not valid. -
InvalidLambdaFunctionAssociation–The specified Lambda@Edge function association is invalid.
-
InvalidLocationCode–The location code specified is not valid.
-
InvalidMinimumProtocolVersion–The minimum protocol version specified is not valid.
-
InvalidOriginAccessControl–The origin access control is not valid.
-
InvalidOriginAccessIdentity–The origin access identity is not valid or doesn't exist.
-
InvalidOriginKeepaliveTimeout–The keep alive timeout specified for the origin is not valid.
-
InvalidOriginReadTimeout–The read timeout specified for the origin is not valid.
-
InvalidQueryStringParameters–The query string parameters specified are not valid.
-
InvalidRelativePath–The relative path is too big, is not URL-encoded, or does not begin with a slash (/).
-
InvalidRequiredProtocol–This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the
RequiredProtocolselement from your distribution configuration. -
InvalidResponseCode–A response code is not valid.
-
InvalidTTLOrder–The TTL order specified is not valid.
-
InvalidViewerCertificate–A viewer certificate specified is not valid.
-
InvalidWebACLId–A web ACL ID specified is not valid. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example
arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using WAF Classic, use the ACL ID, for example473e64fd-f30b-4765-81a0-62ad96dd167a. -
MissingBody–This operation requires a body. Ensure that the body is present and the
Content-Typeheader is set. -
NoSuchCachePolicy–The cache policy does not exist.
-
NoSuchContinuousDeploymentPolicy–The continuous deployment policy doesn't exist.
-
NoSuchDistribution–The specified distribution does not exist.
-
NoSuchFieldLevelEncryptionConfig–The specified configuration for field-level encryption doesn't exist.
-
NoSuchOrigin–No origin exists with the specified
Origin Id. -
NoSuchOriginRequestPolicy–The origin request policy does not exist.
-
NoSuchRealtimeLogConfig–The real-time log configuration does not exist.
-
NoSuchResponseHeadersPolicy–The response headers policy does not exist.
-
PreconditionFailed–The precondition in one or more of the request fields evaluated to
false. -
RealtimeLogConfigOwnerMismatch–The specified real-time log configuration belongs to a different Amazon Web Services account.
-
StagingDistributionInUse–A continuous deployment policy for this staging distribution already exists.
-
TooManyCacheBehaviors–You cannot create more cache behaviors for the distribution.
-
TooManyCertificates–You cannot create anymore custom SSL/TLS certificates.
-
TooManyCookieNamesInWhiteList–Your request contains more cookie names in the whitelist than are allowed per cache behavior.
-
TooManyDistributionCNAMEs–Your request contains more CNAMEs than are allowed per distribution.
-
TooManyDistributionsAssociatedToCachePolicy–The maximum number of distributions have been associated with the specified cache policy. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyDistributionsAssociatedToFieldLevelEncryptionConfig–The maximum number of distributions have been associated with the specified configuration for field-level encryption.
-
TooManyDistributionsAssociatedToKeyGroup–The number of distributions that reference this key group is more than the maximum allowed. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyDistributionsAssociatedToOriginAccessControl–The maximum number of distributions have been associated with the specified origin access control.
For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyDistributionsAssociatedToOriginRequestPolicy–The maximum number of distributions have been associated with the specified origin request policy. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyDistributionsAssociatedToResponseHeadersPolicy–The maximum number of distributions have been associated with the specified response headers policy.
For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyDistributionsWithFunctionAssociations–You have reached the maximum number of distributions that are associated with a CloudFront function. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyDistributionsWithLambdaAssociations–Processing your request would cause the maximum number of distributions with Lambda@Edge function associations per owner to be exceeded.
-
TooManyDistributionsWithSingleFunctionARN–The maximum number of distributions have been associated with the specified Lambda@Edge function.
-
TooManyFunctionAssociations–You have reached the maximum number of CloudFront function associations for this distribution. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyHeadersInForwardedValues–Your request contains too many headers in forwarded values.
-
TooManyKeyGroupsAssociatedToDistribution–The number of key groups referenced by this distribution is more than the maximum allowed. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyLambdaFunctionAssociations–Your request contains more Lambda@Edge function associations than are allowed per distribution.
-
TooManyOriginCustomHeaders–Your request contains too many origin custom headers.
-
TooManyOriginGroupsPerDistribution–Processing your request would cause you to exceed the maximum number of origin groups allowed.
-
TooManyOrigins–You cannot create more origins for the distribution.
-
TooManyQueryStringParameters–Your request contains too many query string parameters.
-
TooManyTrustedSigners–Your request contains more trusted signers than are allowed per distribution.
-
TrustedKeyGroupDoesNotExist–The specified key group does not exist.
-
TrustedSignerDoesNotExist–One or more of your trusted signers don't exist.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 | |