CloudFront
Bases: DuploTenantResourceV3
apply
Apply a service.
create
Create a CloudFront distribution. Usage: Basic CLI Use
Contents of thecloudfront.yaml
file
UseOAIIdentity: true
DistributionConfig:
DefaultRootObject: "index.html"
Aliases:
Items: []
Quantity: 0
ViewerCertificate:
MinimumProtocolVersion:
Value: "TLSv1.2_2021"
ACMCertificateArn: ""
SSLSupportMethod:
Value: "sni-only"
Origins:
Items:
- DomainName: ""
Id: ""
Quantity: 1
CacheBehaviors:
Items: []
Quantity: 0
CustomErrorResponses:
Items: []
Quantity: 0
Logging:
Enabled: false
DefaultCacheBehavior:
ViewerProtocolPolicy:
Value: "redirect-to-https"
LambdaFunctionAssociations:
Items: []
Quantity: 0
Compress: true
TargetOriginId: ""
CachePolicyId: ""
Comment: "duplo-cloudfront"
CorsAllowedHostNames: []
delete
disable
enable
find
get_status
Retrieve the status of a CloudFront distribution by its distribution ID. Usage:
Args: distribution_id (str): The CloudFront distribution ID. Returns: str: The status of the CloudFront distribution. Raises: DuploError: If the CloudFront distribution could not be found or lacks a status.
list
Retrieve a List of CloudFront resources
Returns:
Name | Type | Description |
---|---|---|
list |
list
|
A list of CloudFront. |
update
Update a CloudFront distribution. Usage: Basic CLI Use
Contents of thecloudfront.yaml
file
UseOAIIdentity: true
ProcessS3OriginPolicy: true
Id:
DistributionConfig:
Aliases:
Items: []
Quantity: 0
CacheBehaviors:
Items: []
Quantity: 0
CallerReference:
Comment: duplo-cloudfront
ContinuousDeploymentPolicyId: ""
CustomErrorResponses:
Items: []
Quantity: 0
DefaultCacheBehavior:
AllowedMethods:
CachedMethods:
Items:
- HEAD
- GET
Quantity: 2
Items:
- HEAD
- GET
Quantity: 2
CachePolicyId: ""
Compress: true
FieldLevelEncryptionId: ""
FunctionAssociations:
Items: []
Quantity: 0
LambdaFunctionAssociations:
Items: []
Quantity: 0
SmoothStreaming: false
TargetOriginId:
TrustedKeyGroups:
Enabled: false
Items: []
Quantity: 0
TrustedSigners:
Enabled: false
Items: []
Quantity: 0
ViewerProtocolPolicy:
Value: redirect-to-https
DefaultRootObject: main.html
Enabled: true
HttpVersion:
Value: http2
IsIPV6Enabled: true
Logging:
Bucket: ""
Enabled: false
IncludeCookies: false
Prefix: ""
OriginGroups:
Items: []
Quantity: 0
Origins:
Items:
- ConnectionAttempts: 3
ConnectionTimeout: 10
CustomHeaders:
Items: []
Quantity: 0
DomainName: ""
Id: ""
OriginAccessControlId: ""
OriginPath: ""
OriginShield:
Enabled: false
S3OriginConfig:
OriginAccessIdentity: ""
Quantity: 1
PriceClass:
Value: PriceClass_All
Restrictions:
GeoRestriction:
Items: []
Quantity: 0
RestrictionType:
Value: none
Staging: false
ViewerCertificate:
ACMCertificateArn: ""
Certificate: ""
CertificateSource:
Value: acm
CloudFrontDefaultCertificate: false
MinimumProtocolVersion:
Value: TLSv1.2_2021
SSLSupportMethod:
Value: sni-only
WebACLId: ""
wait_check
Waits for the CloudFront distribution to be in 'Deployed' status.