AwsCloudfrontDistributionArgs
interface AwsCloudfrontDistributionArgs extends Omit<aws.cloudfront.DistributionArgs, 'comment' | 'defaultCacheBehavior' | 'enabled' | 'httpVersion' | 'isIpv6Enabled' | 'orderedCacheBehaviors' | 'origins' | 'restrictions' | 'tags' | 'viewerCertificate' | 'viewerMtlsConfig'> {
additionalMetrics?: boolean;
aliases?: Input<Input<string>[] | undefined>;
anycastIpListId?: Input<string | undefined>;
cacheTagConfig?: Input<DistributionCacheTagConfig | undefined>;
comment?: Input<string>;
connectionFunctionAssociation?: Input<DistributionConnectionFunctionAssociation | undefined>;
continuousDeploymentPolicyId?: Input<string | undefined>;
customErrorResponses?: Input<Input<DistributionCustomErrorResponse>[] | undefined>;
defaultCacheBehavior: AwsCloudfrontCacheBehaviorArgs;
defaultRootObject?: Input<string | undefined>;
enabled?: Input<boolean>;
httpVersion?: Input<'http2' | 'http2and3'>;
isIpv6Enabled?: Input<boolean>;
loggingConfig?: Input<DistributionLoggingConfig | undefined>;
name: string;
orderedCacheBehaviors?: AwsCloudfrontOrderedCacheBehaviorArgs[];
originGroups?: Input<Input<DistributionOriginGroup>[] | undefined>;
origins: AwsCloudfrontOriginArgs[];
priceClass?: Input<string | undefined>;
restrictions?: Input<DistributionRestrictions>;
retainOnDelete?: Input<boolean | undefined>;
staging?: Input<boolean | undefined>;
tags?: TagMap;
viewerCertificate: AwsCloudfrontViewerCertificateArnArgs;
viewerMtlsConfig?: AwsCloudfrontViewerMtlsConfigArgs;
waitForDeployment?: Input<boolean | undefined>;
webAclId?: Input<string | undefined>;
}Distribution capability inputs.
Remarks
Viewer HTTPS, custom-origin TLS 1.2, compression, HTTP/3, and IPv6 are secure defaults.
Example
`const distribution: AwsCloudfrontDistributionArgs = { name: 'website', origins: [{ domainName: 'origin.example.com', originId: 'application', customOriginConfig: { httpPort: 80, httpsPort: 443 } }], defaultCacheBehavior: { targetOriginId: 'application' }, viewerCertificate: { acmCertificateArn: 'arn:aws:acm:us-east-1:000000000000:certificate/12345678-1234-1234-1234-123456789abc' } };`Hierarchy
DistributionArgs, "comment" | "defaultCacheBehavior" | "enabled" | "httpVersion" | "isIpv6Enabled" | "orderedCacheBehaviors" | "origins" | "restrictions" | "tags" | "viewerCertificate" | "viewerMtlsConfig">AwsCloudfrontDistributionArgs
Properties
additionalMetrics: boolean
Enables CloudFront additional real-time metrics.
Default: `false`
aliases: Input<Input<string>[] | undefined>
Inherited from aliases
Extra CNAMEs (alternate domain names), if any, for this distribution.
anycastIpListId: Input<string | undefined>
Inherited from anycastIpListId
ID of the Anycast static IP list that is associated with the distribution.
cacheTagConfig: Input<DistributionCacheTagConfig | undefined>
Inherited from cacheTagConfig
Cache tag configuration block for cache tag extraction from origin responses (maximum one). See the AWS documentation for more information about cache tags.
comment: Input<string>
Default: ```ts Component identity. ```
connectionFunctionAssociation: Input<DistributionConnectionFunctionAssociation | undefined>
Inherited from connectionFunctionAssociation
A connection function association configuration block (maximum one).
continuousDeploymentPolicyId: Input<string | undefined>
Inherited from continuousDeploymentPolicyId
Identifier of a continuous deployment policy. This argument should only be set on a production distribution. See the aws.cloudfront.ContinuousDeploymentPolicy resource for additional details.
customErrorResponses: Input<Input<DistributionCustomErrorResponse>[] | undefined>
Inherited from customErrorResponses
One or more custom error response elements (multiples allowed).
defaultCacheBehavior: AwsCloudfrontCacheBehaviorArgs
Default cache behaviour.
defaultRootObject: Input<string | undefined>
Inherited from defaultRootObject
Object that you want CloudFront to return (for example, index.html) when an end user requests the root URL.
enabled: Input<boolean>
Default: `true`
httpVersion: Input<'http2' | 'http2and3'>
Default: `http2and3`
isIpv6Enabled: Input<boolean>
Default: `true`
loggingConfig: Input<DistributionLoggingConfig | undefined>
Inherited from loggingConfig
The logging configuration that controls how logs are written to your distribution (maximum one). AWS provides two versions of access logs for CloudFront: Legacy and v2. This argument configures legacy version standard logs.
name: string
Stable component identity and default comment.
orderedCacheBehaviors: AwsCloudfrontOrderedCacheBehaviorArgs[]
Path-specific cache behaviours.
originGroups: Input<Input<DistributionOriginGroup>[] | undefined>
Inherited from originGroups
One or more originGroup for this distribution (multiples allowed).
origins: AwsCloudfrontOriginArgs[]
Distribution origins.
priceClass: Input<string | undefined>
Inherited from priceClass
Price class for this distribution. One of PriceClass_All, PriceClass_200, PriceClass_100.
restrictions: Input<DistributionRestrictions>
Default: ```ts No geographical restriction. ```
retainOnDelete: Input<boolean | undefined>
Inherited from retainOnDelete
Disables the distribution instead of deleting it when destroying the resource through the provider. If this is set, the distribution needs to be deleted manually afterwards. Default: false.
staging: Input<boolean | undefined>
Inherited from staging
A Boolean that indicates whether this is a staging distribution. Defaults to false.
tags: TagMap
Additional tags.
viewerCertificate: AwsCloudfrontViewerCertificateArnArgs
ACM viewer certificate.
viewerMtlsConfig: AwsCloudfrontViewerMtlsConfigArgs
Required client-certificate authentication for viewers.
waitForDeployment: Input<boolean | undefined>
Inherited from waitForDeployment
If enabled, the resource will wait for the distribution status to change from InProgress to Deployed. Setting this tofalse will skip the process. Default: true.
webAclId: Input<string | undefined>
Inherited from webAclId
Unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution. To specify a web ACL created using the latest version of AWS WAF (WAFv2), use the ACL ARN, for example aws_wafv2_web_acl.example.arn. To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example aws_waf_web_acl.example.id. The WAF Web ACL must exist in the WAF Global (CloudFront) region and the credentials configuring this argument must have waf:GetWebACL permissions assigned.