import * as core from "@terrascript/core"; export interface GeoRestrictionArgs extends core.SchemaArgs { locations?: core.Array | core.ArrayOut; restrictionType: string | core.StringOut; } export class GeoRestriction extends core.Schema { @core.attr(String, { computed: true, kind: "array" }) public locations?: core.Array | core.ArrayOut; @core.attr(String) public restrictionType!: string | core.StringOut; } export interface RestrictionsArgs extends core.SchemaArgs { geoRestriction: GeoRestriction; } export class Restrictions extends core.Schema { @core.attr(GeoRestriction) public geoRestriction!: GeoRestriction; } export interface MemberArgs extends core.SchemaArgs { originId: string | core.StringOut; } export class Member extends core.Schema { @core.attr(String) public originId!: string | core.StringOut; } export interface FailoverCriteriaArgs extends core.SchemaArgs { statusCodes: core.Array | core.ArrayOut; } export class FailoverCriteria extends core.Schema { @core.attr(Number, { kind: "array" }) public statusCodes!: core.Array | core.ArrayOut; } export interface OriginGroupArgs extends core.SchemaArgs { failoverCriteria: FailoverCriteria; member: core.Array | core.ArrayOut; originId: string | core.StringOut; } export class OriginGroup extends core.Schema { @core.attr(FailoverCriteria) public failoverCriteria!: FailoverCriteria; @core.attr(Member, { kind: "array" }) public member!: core.Array | core.ArrayOut; @core.attr(String) public originId!: string | core.StringOut; } export interface CustomErrorResponseArgs extends core.SchemaArgs { errorCachingMinTtl?: number | core.NumberOut; errorCode: number | core.NumberOut; responseCode?: number | core.NumberOut; responsePagePath?: string | core.StringOut; } export class CustomErrorResponse extends core.Schema { @core.attr(Number) public errorCachingMinTtl?: number | core.NumberOut; @core.attr(Number) public errorCode!: number | core.NumberOut; @core.attr(Number) public responseCode?: number | core.NumberOut; @core.attr(String) public responsePagePath?: string | core.StringOut; } export interface CustomOriginConfigArgs extends core.SchemaArgs { httpPort: number | core.NumberOut; httpsPort: number | core.NumberOut; originKeepaliveTimeout?: number | core.NumberOut; originProtocolPolicy: string | core.StringOut; originReadTimeout?: number | core.NumberOut; originSslProtocols: core.Array | core.ArrayOut; } export class CustomOriginConfig extends core.Schema { @core.attr(Number) public httpPort!: number | core.NumberOut; @core.attr(Number) public httpsPort!: number | core.NumberOut; @core.attr(Number) public originKeepaliveTimeout?: number | core.NumberOut; @core.attr(String) public originProtocolPolicy!: string | core.StringOut; @core.attr(Number) public originReadTimeout?: number | core.NumberOut; @core.attr(String, { kind: "array" }) public originSslProtocols!: | core.Array | core.ArrayOut; } export interface OriginShieldArgs extends core.SchemaArgs { enabled: boolean | core.BooleanOut; originShieldRegion: string | core.StringOut; } export class OriginShield extends core.Schema { @core.attr(Boolean) public enabled!: boolean | core.BooleanOut; @core.attr(String) public originShieldRegion!: string | core.StringOut; } export interface S3OriginConfigArgs extends core.SchemaArgs { originAccessIdentity: string | core.StringOut; } export class S3OriginConfig extends core.Schema { @core.attr(String) public originAccessIdentity!: string | core.StringOut; } export interface CustomHeaderArgs extends core.SchemaArgs { name: string | core.StringOut; value: string | core.StringOut; } export class CustomHeader extends core.Schema { @core.attr(String) public name!: string | core.StringOut; @core.attr(String) public value!: string | core.StringOut; } export interface OriginArgs extends core.SchemaArgs { connectionAttempts?: number | core.NumberOut; connectionTimeout?: number | core.NumberOut; customHeader?: core.Array | core.ArrayOut; customOriginConfig?: CustomOriginConfig; domainName: string | core.StringOut; originId: string | core.StringOut; originPath?: string | core.StringOut; originShield?: OriginShield; s3OriginConfig?: S3OriginConfig; } export class Origin extends core.Schema { @core.attr(Number) public connectionAttempts?: number | core.NumberOut; @core.attr(Number) public connectionTimeout?: number | core.NumberOut; @core.attr(CustomHeader, { kind: "array" }) public customHeader?: core.Array | core.ArrayOut; @core.attr(CustomOriginConfig) public customOriginConfig?: CustomOriginConfig; @core.attr(String) public domainName!: string | core.StringOut; @core.attr(String) public originId!: string | core.StringOut; @core.attr(String) public originPath?: string | core.StringOut; @core.attr(OriginShield) public originShield?: OriginShield; @core.attr(S3OriginConfig) public s3OriginConfig?: S3OriginConfig; } export interface LambdaFunctionAssociationArgs extends core.SchemaArgs { eventType: string | core.StringOut; includeBody?: boolean | core.BooleanOut; lambdaArn: string | core.StringOut; } export class LambdaFunctionAssociation extends core.Schema { @core.attr(String) public eventType!: string | core.StringOut; @core.attr(Boolean) public includeBody?: boolean | core.BooleanOut; @core.attr(String) public lambdaArn!: string | core.StringOut; } export interface FunctionAssociationArgs extends core.SchemaArgs { eventType: string | core.StringOut; functionArn: string | core.StringOut; } export class FunctionAssociation extends core.Schema { @core.attr(String) public eventType!: string | core.StringOut; @core.attr(String) public functionArn!: string | core.StringOut; } export interface OrderedCacheBehaviorForwardedValuesCookiesArgs extends core.SchemaArgs { forward: string | core.StringOut; whitelistedNames?: core.Array | core.ArrayOut; } export class OrderedCacheBehaviorForwardedValuesCookies extends core.Schema { @core.attr(String) public forward!: string | core.StringOut; @core.attr(String, { kind: "array" }) public whitelistedNames?: core.Array | core.ArrayOut; } export interface OrderedCacheBehaviorForwardedValuesArgs extends core.SchemaArgs { cookies: OrderedCacheBehaviorForwardedValuesCookies; headers?: core.Array | core.ArrayOut; queryString: boolean | core.BooleanOut; queryStringCacheKeys?: core.Array | core.ArrayOut; } export class OrderedCacheBehaviorForwardedValues extends core.Schema { @core.attr(OrderedCacheBehaviorForwardedValuesCookies) public cookies!: OrderedCacheBehaviorForwardedValuesCookies; @core.attr(String, { computed: true, kind: "array" }) public headers?: core.Array | core.ArrayOut; @core.attr(Boolean) public queryString!: boolean | core.BooleanOut; @core.attr(String, { computed: true, kind: "array" }) public queryStringCacheKeys?: | core.Array | core.ArrayOut; } export interface OrderedCacheBehaviorArgs extends core.SchemaArgs { allowedMethods: core.Array | core.ArrayOut; cachePolicyId?: string | core.StringOut; cachedMethods: core.Array | core.ArrayOut; compress?: boolean | core.BooleanOut; defaultTtl?: number | core.NumberOut; fieldLevelEncryptionId?: string | core.StringOut; forwardedValues?: OrderedCacheBehaviorForwardedValues; functionAssociation?: | core.Array | core.ArrayOut; lambdaFunctionAssociation?: | core.Array | core.ArrayOut; maxTtl?: number | core.NumberOut; minTtl?: number | core.NumberOut; originRequestPolicyId?: string | core.StringOut; pathPattern: string | core.StringOut; realtimeLogConfigArn?: string | core.StringOut; responseHeadersPolicyId?: string | core.StringOut; smoothStreaming?: boolean | core.BooleanOut; targetOriginId: string | core.StringOut; trustedKeyGroups?: core.Array | core.ArrayOut; trustedSigners?: core.Array | core.ArrayOut; viewerProtocolPolicy: string | core.StringOut; } export class OrderedCacheBehavior extends core.Schema { @core.attr(String, { kind: "array" }) public allowedMethods!: core.Array | core.ArrayOut; @core.attr(String) public cachePolicyId?: string | core.StringOut; @core.attr(String, { kind: "array" }) public cachedMethods!: core.Array | core.ArrayOut; @core.attr(Boolean) public compress?: boolean | core.BooleanOut; @core.attr(Number, { computed: true }) public defaultTtl?: number | core.NumberOut; @core.attr(String) public fieldLevelEncryptionId?: string | core.StringOut; @core.attr(OrderedCacheBehaviorForwardedValues) public forwardedValues?: OrderedCacheBehaviorForwardedValues; @core.attr(FunctionAssociation, { kind: "array" }) public functionAssociation?: | core.Array | core.ArrayOut; @core.attr(LambdaFunctionAssociation, { kind: "array" }) public lambdaFunctionAssociation?: | core.Array | core.ArrayOut; @core.attr(Number, { computed: true }) public maxTtl?: number | core.NumberOut; @core.attr(Number) public minTtl?: number | core.NumberOut; @core.attr(String) public originRequestPolicyId?: string | core.StringOut; @core.attr(String) public pathPattern!: string | core.StringOut; @core.attr(String) public realtimeLogConfigArn?: string | core.StringOut; @core.attr(String) public responseHeadersPolicyId?: string | core.StringOut; @core.attr(Boolean) public smoothStreaming?: boolean | core.BooleanOut; @core.attr(String) public targetOriginId!: string | core.StringOut; @core.attr(String, { kind: "array" }) public trustedKeyGroups?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public trustedSigners?: core.Array | core.ArrayOut; @core.attr(String) public viewerProtocolPolicy!: string | core.StringOut; } export interface DefaultCacheBehaviorForwardedValuesCookiesArgs extends core.SchemaArgs { forward: string | core.StringOut; whitelistedNames?: core.Array | core.ArrayOut; } export class DefaultCacheBehaviorForwardedValuesCookies extends core.Schema { @core.attr(String) public forward!: string | core.StringOut; @core.attr(String, { computed: true, kind: "array" }) public whitelistedNames?: core.Array | core.ArrayOut; } export interface DefaultCacheBehaviorForwardedValuesArgs extends core.SchemaArgs { cookies: DefaultCacheBehaviorForwardedValuesCookies; headers?: core.Array | core.ArrayOut; queryString: boolean | core.BooleanOut; queryStringCacheKeys?: core.Array | core.ArrayOut; } export class DefaultCacheBehaviorForwardedValues extends core.Schema { @core.attr(DefaultCacheBehaviorForwardedValuesCookies) public cookies!: DefaultCacheBehaviorForwardedValuesCookies; @core.attr(String, { computed: true, kind: "array" }) public headers?: core.Array | core.ArrayOut; @core.attr(Boolean) public queryString!: boolean | core.BooleanOut; @core.attr(String, { computed: true, kind: "array" }) public queryStringCacheKeys?: | core.Array | core.ArrayOut; } export interface DefaultCacheBehaviorArgs extends core.SchemaArgs { allowedMethods: core.Array | core.ArrayOut; cachePolicyId?: string | core.StringOut; cachedMethods: core.Array | core.ArrayOut; compress?: boolean | core.BooleanOut; defaultTtl?: number | core.NumberOut; fieldLevelEncryptionId?: string | core.StringOut; forwardedValues?: DefaultCacheBehaviorForwardedValues; functionAssociation?: | core.Array | core.ArrayOut; lambdaFunctionAssociation?: | core.Array | core.ArrayOut; maxTtl?: number | core.NumberOut; minTtl?: number | core.NumberOut; originRequestPolicyId?: string | core.StringOut; realtimeLogConfigArn?: string | core.StringOut; responseHeadersPolicyId?: string | core.StringOut; smoothStreaming?: boolean | core.BooleanOut; targetOriginId: string | core.StringOut; trustedKeyGroups?: core.Array | core.ArrayOut; trustedSigners?: core.Array | core.ArrayOut; viewerProtocolPolicy: string | core.StringOut; } export class DefaultCacheBehavior extends core.Schema { @core.attr(String, { kind: "array" }) public allowedMethods!: core.Array | core.ArrayOut; @core.attr(String) public cachePolicyId?: string | core.StringOut; @core.attr(String, { kind: "array" }) public cachedMethods!: core.Array | core.ArrayOut; @core.attr(Boolean) public compress?: boolean | core.BooleanOut; @core.attr(Number, { computed: true }) public defaultTtl?: number | core.NumberOut; @core.attr(String) public fieldLevelEncryptionId?: string | core.StringOut; @core.attr(DefaultCacheBehaviorForwardedValues) public forwardedValues?: DefaultCacheBehaviorForwardedValues; @core.attr(FunctionAssociation, { kind: "array" }) public functionAssociation?: | core.Array | core.ArrayOut; @core.attr(LambdaFunctionAssociation, { kind: "array" }) public lambdaFunctionAssociation?: | core.Array | core.ArrayOut; @core.attr(Number, { computed: true }) public maxTtl?: number | core.NumberOut; @core.attr(Number) public minTtl?: number | core.NumberOut; @core.attr(String) public originRequestPolicyId?: string | core.StringOut; @core.attr(String) public realtimeLogConfigArn?: string | core.StringOut; @core.attr(String) public responseHeadersPolicyId?: string | core.StringOut; @core.attr(Boolean) public smoothStreaming?: boolean | core.BooleanOut; @core.attr(String) public targetOriginId!: string | core.StringOut; @core.attr(String, { computed: true, kind: "array" }) public trustedKeyGroups?: core.Array | core.ArrayOut; @core.attr(String, { computed: true, kind: "array" }) public trustedSigners?: core.Array | core.ArrayOut; @core.attr(String) public viewerProtocolPolicy!: string | core.StringOut; } export interface TrustedSignersItemsArgs extends core.SchemaArgs { awsAccountNumber: string | core.StringOut; keyPairIds: core.Array | core.ArrayOut; } export class TrustedSignersItems extends core.Schema { @core.attr(String, { computed: true }) public awsAccountNumber!: string | core.StringOut; @core.attr(String, { computed: true, kind: "array" }) public keyPairIds!: core.Array | core.ArrayOut; } export interface TrustedSignersArgs extends core.SchemaArgs { enabled: boolean | core.BooleanOut; items: core.Array | core.ArrayOut; } export class TrustedSigners extends core.Schema { @core.attr(Boolean, { computed: true }) public enabled!: boolean | core.BooleanOut; @core.attr(TrustedSignersItems, { computed: true, kind: "array" }) public items!: | core.Array | core.ArrayOut; } export interface ViewerCertificateArgs extends core.SchemaArgs { acmCertificateArn?: string | core.StringOut; cloudfrontDefaultCertificate?: boolean | core.BooleanOut; iamCertificateId?: string | core.StringOut; minimumProtocolVersion?: string | core.StringOut; sslSupportMethod?: string | core.StringOut; } export class ViewerCertificate extends core.Schema { @core.attr(String) public acmCertificateArn?: string | core.StringOut; @core.attr(Boolean) public cloudfrontDefaultCertificate?: boolean | core.BooleanOut; @core.attr(String) public iamCertificateId?: string | core.StringOut; @core.attr(String) public minimumProtocolVersion?: string | core.StringOut; @core.attr(String) public sslSupportMethod?: string | core.StringOut; } export interface LoggingConfigArgs extends core.SchemaArgs { bucket: string | core.StringOut; includeCookies?: boolean | core.BooleanOut; prefix?: string | core.StringOut; } export class LoggingConfig extends core.Schema { @core.attr(String) public bucket!: string | core.StringOut; @core.attr(Boolean) public includeCookies?: boolean | core.BooleanOut; @core.attr(String) public prefix?: string | core.StringOut; } export interface TrustedKeyGroupsItemsArgs extends core.SchemaArgs { keyGroupId: string | core.StringOut; keyPairIds: core.Array | core.ArrayOut; } export class TrustedKeyGroupsItems extends core.Schema { @core.attr(String, { computed: true }) public keyGroupId!: string | core.StringOut; @core.attr(String, { computed: true, kind: "array" }) public keyPairIds!: core.Array | core.ArrayOut; } export interface TrustedKeyGroupsArgs extends core.SchemaArgs { enabled: boolean | core.BooleanOut; items: | core.Array | core.ArrayOut; } export class TrustedKeyGroups extends core.Schema { @core.attr(Boolean, { computed: true }) public enabled!: boolean | core.BooleanOut; @core.attr(TrustedKeyGroupsItems, { computed: true, kind: "array" }) public items!: | core.Array | core.ArrayOut; } export interface DistributionArgs extends core.ResourceArgs { aliases?: core.Array | core.ArrayOut; comment?: string | core.StringOut; customErrorResponse?: | core.Array | core.ArrayOut; defaultCacheBehavior: DefaultCacheBehavior; defaultRootObject?: string | core.StringOut; /** * true` if any of the key groups have public keys that CloudFront can use to verify the signature * s of signed URLs and signed cookies */ enabled: boolean | core.BooleanOut; httpVersion?: string | core.StringOut; isIpv6Enabled?: boolean | core.BooleanOut; loggingConfig?: LoggingConfig; orderedCacheBehavior?: | core.Array | core.ArrayOut; origin: core.Array | core.ArrayOut; originGroup?: core.Array | core.ArrayOut; priceClass?: string | core.StringOut; restrictions: Restrictions; retainOnDelete?: boolean | core.BooleanOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; viewerCertificate: ViewerCertificate; waitForDeployment?: boolean | core.BooleanOut; webAclId?: string | core.StringOut; } export class Distribution extends core.Resource { @core.attr(String, { kind: "array" }) public aliases?: core.Array | core.ArrayOut; /** * The ARN (Amazon Resource Name) for the distribution. For example: `arn:aws:cloudfront::123456789012: * distribution/EDFDVBD632BHDS5`, where `123456789012` is your AWS account ID. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * Internal value used by CloudFront to allow future */ @core.attr(String, { computed: true }) public callerReference!: string | core.StringOut; @core.attr(String) public comment?: string | core.StringOut; @core.attr(CustomErrorResponse, { kind: "array" }) public customErrorResponse?: | core.Array | core.ArrayOut; @core.attr(DefaultCacheBehavior) public defaultCacheBehavior!: DefaultCacheBehavior; @core.attr(String) public defaultRootObject?: string | core.StringOut; /** * The domain name corresponding to the distribution. For */ @core.attr(String, { computed: true }) public domainName!: string | core.StringOut; /** * true` if any of the key groups have public keys that CloudFront can use to verify the signature * s of signed URLs and signed cookies */ @core.attr(Boolean) public enabled!: boolean | core.BooleanOut; /** * The current version of the distribution's information. For example: */ @core.attr(String, { computed: true }) public etag!: string | core.StringOut; /** * The CloudFront Route 53 zone ID that can be used to */ @core.attr(String, { computed: true }) public hostedZoneId!: string | core.StringOut; @core.attr(String) public httpVersion?: string | core.StringOut; /** * The identifier for the distribution. For example: `EDFDVBD632BHDS5`. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * The number of invalidation batches */ @core.attr(Number, { computed: true }) public inProgressValidationBatches!: number | core.NumberOut; @core.attr(Boolean) public isIpv6Enabled?: boolean | core.BooleanOut; /** * The date and time the distribution was last modified. */ @core.attr(String, { computed: true }) public lastModifiedTime!: string | core.StringOut; @core.attr(LoggingConfig) public loggingConfig?: LoggingConfig; @core.attr(OrderedCacheBehavior, { kind: "array" }) public orderedCacheBehavior?: | core.Array | core.ArrayOut; @core.attr(Origin, { kind: "array" }) public origin!: core.Array | core.ArrayOut; @core.attr(OriginGroup, { kind: "array" }) public originGroup?: core.Array | core.ArrayOut; @core.attr(String) public priceClass?: string | core.StringOut; @core.attr(Restrictions) public restrictions!: Restrictions; @core.attr(Boolean) public retainOnDelete?: boolean | core.BooleanOut; /** * The current status of the distribution. `Deployed` if the */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * List of nested attributes for active trusted key groups, if the distribution is set up to serve priv * ate content with signed URLs */ @core.attr(TrustedKeyGroups, { computed: true, kind: "array" }) public trustedKeyGroups!: | core.Array | core.ArrayOut; /** * List of nested attributes for active trusted signers, if the distribution is set up to serve private * content with signed URLs */ @core.attr(TrustedSigners, { computed: true, kind: "array" }) public trustedSigners!: | core.Array | core.ArrayOut; @core.attr(ViewerCertificate) public viewerCertificate!: ViewerCertificate; @core.attr(Boolean) public waitForDeployment?: boolean | core.BooleanOut; @core.attr(String) public webAclId?: string | core.StringOut; constructor(name: string, args?: DistributionArgs) { super(name, "aws_cloudfront_distribution", args); } public override getNamespace(): string { return "aws_cloudfront"; } }