import * as core from "@terrascript/core"; export interface HeadersArgs extends core.SchemaArgs { items?: core.Array | core.ArrayOut; } export class Headers extends core.Schema { @core.attr(String, { kind: "array" }) public items?: core.Array | core.ArrayOut; } export interface HeadersConfigArgs extends core.SchemaArgs { headerBehavior?: string | core.StringOut; headers?: Headers; } export class HeadersConfig extends core.Schema { @core.attr(String) public headerBehavior?: string | core.StringOut; @core.attr(Headers) public headers?: Headers; } export interface QueryStringsArgs extends core.SchemaArgs { items?: core.Array | core.ArrayOut; } export class QueryStrings extends core.Schema { @core.attr(String, { kind: "array" }) public items?: core.Array | core.ArrayOut; } export interface QueryStringsConfigArgs extends core.SchemaArgs { queryStringBehavior: string | core.StringOut; queryStrings?: QueryStrings; } export class QueryStringsConfig extends core.Schema { @core.attr(String) public queryStringBehavior!: string | core.StringOut; @core.attr(QueryStrings) public queryStrings?: QueryStrings; } export interface CookiesArgs extends core.SchemaArgs { items?: core.Array | core.ArrayOut; } export class Cookies extends core.Schema { @core.attr(String, { kind: "array" }) public items?: core.Array | core.ArrayOut; } export interface CookiesConfigArgs extends core.SchemaArgs { cookieBehavior: string | core.StringOut; cookies?: Cookies; } export class CookiesConfig extends core.Schema { @core.attr(String) public cookieBehavior!: string | core.StringOut; @core.attr(Cookies) public cookies?: Cookies; } export interface ParametersInCacheKeyAndForwardedToOriginArgs extends core.SchemaArgs { cookiesConfig: CookiesConfig; enableAcceptEncodingBrotli?: boolean | core.BooleanOut; enableAcceptEncodingGzip?: boolean | core.BooleanOut; headersConfig: HeadersConfig; queryStringsConfig: QueryStringsConfig; } export class ParametersInCacheKeyAndForwardedToOrigin extends core.Schema { @core.attr(CookiesConfig) public cookiesConfig!: CookiesConfig; @core.attr(Boolean) public enableAcceptEncodingBrotli?: boolean | core.BooleanOut; @core.attr(Boolean) public enableAcceptEncodingGzip?: boolean | core.BooleanOut; @core.attr(HeadersConfig) public headersConfig!: HeadersConfig; @core.attr(QueryStringsConfig) public queryStringsConfig!: QueryStringsConfig; } export interface CachePolicyArgs extends core.ResourceArgs { /** * (Optional) A comment to describe the cache policy. */ comment?: string | core.StringOut; /** * (Optional) The default amount of time, in seconds, that you want objects to stay in the CloudFront c * ache before CloudFront sends another request to the origin to see if the object has been updated. */ defaultTtl?: number | core.NumberOut; /** * (Optional) The maximum amount of time, in seconds, that objects stay in the CloudFront cache before * CloudFront sends another request to the origin to see if the object has been updated. */ maxTtl?: number | core.NumberOut; /** * (Required) The minimum amount of time, in seconds, that you want objects to stay in the CloudFront c * ache before CloudFront sends another request to the origin to see if the object has been updated. */ minTtl?: number | core.NumberOut; /** * (Required) A unique name to identify the cache policy. */ name: string | core.StringOut; /** * (Required) The HTTP headers, cookies, and URL query strings to include in the cache key. See [Parame * ters In Cache Key And Forwarded To Origin](#parameters-in-cache-key-and-forwarded-to-origin) for mor * e information. */ parametersInCacheKeyAndForwardedToOrigin: ParametersInCacheKeyAndForwardedToOrigin; } export class CachePolicy extends core.Resource { /** * (Optional) A comment to describe the cache policy. */ @core.attr(String) public comment?: string | core.StringOut; /** * (Optional) The default amount of time, in seconds, that you want objects to stay in the CloudFront c * ache before CloudFront sends another request to the origin to see if the object has been updated. */ @core.attr(Number) public defaultTtl?: number | core.NumberOut; /** * The current version of the cache policy. */ @core.attr(String, { computed: true }) public etag!: string | core.StringOut; /** * The identifier for the cache policy. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The maximum amount of time, in seconds, that objects stay in the CloudFront cache before * CloudFront sends another request to the origin to see if the object has been updated. */ @core.attr(Number) public maxTtl?: number | core.NumberOut; /** * (Required) The minimum amount of time, in seconds, that you want objects to stay in the CloudFront c * ache before CloudFront sends another request to the origin to see if the object has been updated. */ @core.attr(Number) public minTtl?: number | core.NumberOut; /** * (Required) A unique name to identify the cache policy. */ @core.attr(String) public name!: string | core.StringOut; /** * (Required) The HTTP headers, cookies, and URL query strings to include in the cache key. See [Parame * ters In Cache Key And Forwarded To Origin](#parameters-in-cache-key-and-forwarded-to-origin) for mor * e information. */ @core.attr(ParametersInCacheKeyAndForwardedToOrigin) public parametersInCacheKeyAndForwardedToOrigin!: ParametersInCacheKeyAndForwardedToOrigin; constructor(name: string, args?: CachePolicyArgs) { super(name, "aws_cloudfront_cache_policy", args); } public override getNamespace(): string { return "aws_cloudfront"; } }