import * as core from "@terrascript/core"; export interface AccessControlAllowHeadersArgs extends core.SchemaArgs { items?: core.Array | core.ArrayOut; } export class AccessControlAllowHeaders extends core.Schema { @core.attr(String, { kind: "array" }) public items?: core.Array | core.ArrayOut; } export interface AccessControlAllowMethodsArgs extends core.SchemaArgs { items?: core.Array | core.ArrayOut; } export class AccessControlAllowMethods extends core.Schema { @core.attr(String, { kind: "array" }) public items?: core.Array | core.ArrayOut; } export interface AccessControlAllowOriginsArgs extends core.SchemaArgs { items?: core.Array | core.ArrayOut; } export class AccessControlAllowOrigins extends core.Schema { @core.attr(String, { kind: "array" }) public items?: core.Array | core.ArrayOut; } export interface AccessControlExposeHeadersArgs extends core.SchemaArgs { items?: core.Array | core.ArrayOut; } export class AccessControlExposeHeaders extends core.Schema { @core.attr(String, { kind: "array" }) public items?: core.Array | core.ArrayOut; } export interface CorsConfigArgs extends core.SchemaArgs { accessControlAllowCredentials: boolean | core.BooleanOut; accessControlAllowHeaders: AccessControlAllowHeaders; accessControlAllowMethods: AccessControlAllowMethods; accessControlAllowOrigins: AccessControlAllowOrigins; accessControlExposeHeaders?: AccessControlExposeHeaders; accessControlMaxAgeSec?: number | core.NumberOut; originOverride: boolean | core.BooleanOut; } export class CorsConfig extends core.Schema { @core.attr(Boolean) public accessControlAllowCredentials!: boolean | core.BooleanOut; @core.attr(AccessControlAllowHeaders) public accessControlAllowHeaders!: AccessControlAllowHeaders; @core.attr(AccessControlAllowMethods) public accessControlAllowMethods!: AccessControlAllowMethods; @core.attr(AccessControlAllowOrigins) public accessControlAllowOrigins!: AccessControlAllowOrigins; @core.attr(AccessControlExposeHeaders) public accessControlExposeHeaders?: AccessControlExposeHeaders; @core.attr(Number) public accessControlMaxAgeSec?: number | core.NumberOut; @core.attr(Boolean) public originOverride!: boolean | core.BooleanOut; } export interface ItemsArgs extends core.SchemaArgs { header: string | core.StringOut; override: boolean | core.BooleanOut; value: string | core.StringOut; } export class Items extends core.Schema { @core.attr(String) public header!: string | core.StringOut; @core.attr(Boolean) public override!: boolean | core.BooleanOut; @core.attr(String) public value!: string | core.StringOut; } export interface CustomHeadersConfigArgs extends core.SchemaArgs { items?: core.Array | core.ArrayOut; } export class CustomHeadersConfig extends core.Schema { @core.attr(Items, { kind: "array" }) public items?: core.Array | core.ArrayOut; } export interface FrameOptionsArgs extends core.SchemaArgs { frameOption: string | core.StringOut; override: boolean | core.BooleanOut; } export class FrameOptions extends core.Schema { @core.attr(String) public frameOption!: string | core.StringOut; @core.attr(Boolean) public override!: boolean | core.BooleanOut; } export interface ReferrerPolicyArgs extends core.SchemaArgs { override: boolean | core.BooleanOut; referrerPolicy: string | core.StringOut; } export class ReferrerPolicy extends core.Schema { @core.attr(Boolean) public override!: boolean | core.BooleanOut; @core.attr(String) public referrerPolicy!: string | core.StringOut; } export interface StrictTransportSecurityArgs extends core.SchemaArgs { accessControlMaxAgeSec: number | core.NumberOut; includeSubdomains?: boolean | core.BooleanOut; override: boolean | core.BooleanOut; preload?: boolean | core.BooleanOut; } export class StrictTransportSecurity extends core.Schema { @core.attr(Number) public accessControlMaxAgeSec!: number | core.NumberOut; @core.attr(Boolean) public includeSubdomains?: boolean | core.BooleanOut; @core.attr(Boolean) public override!: boolean | core.BooleanOut; @core.attr(Boolean) public preload?: boolean | core.BooleanOut; } export interface XssProtectionArgs extends core.SchemaArgs { modeBlock?: boolean | core.BooleanOut; override: boolean | core.BooleanOut; protection: boolean | core.BooleanOut; reportUri?: string | core.StringOut; } export class XssProtection extends core.Schema { @core.attr(Boolean) public modeBlock?: boolean | core.BooleanOut; @core.attr(Boolean) public override!: boolean | core.BooleanOut; @core.attr(Boolean) public protection!: boolean | core.BooleanOut; @core.attr(String) public reportUri?: string | core.StringOut; } export interface ContentSecurityPolicyArgs extends core.SchemaArgs { contentSecurityPolicy: string | core.StringOut; override: boolean | core.BooleanOut; } export class ContentSecurityPolicy extends core.Schema { @core.attr(String) public contentSecurityPolicy!: string | core.StringOut; @core.attr(Boolean) public override!: boolean | core.BooleanOut; } export interface ContentTypeOptionsArgs extends core.SchemaArgs { override: boolean | core.BooleanOut; } export class ContentTypeOptions extends core.Schema { @core.attr(Boolean) public override!: boolean | core.BooleanOut; } export interface SecurityHeadersConfigArgs extends core.SchemaArgs { contentSecurityPolicy?: ContentSecurityPolicy; contentTypeOptions?: ContentTypeOptions; frameOptions?: FrameOptions; referrerPolicy?: ReferrerPolicy; strictTransportSecurity?: StrictTransportSecurity; xssProtection?: XssProtection; } export class SecurityHeadersConfig extends core.Schema { @core.attr(ContentSecurityPolicy) public contentSecurityPolicy?: ContentSecurityPolicy; @core.attr(ContentTypeOptions) public contentTypeOptions?: ContentTypeOptions; @core.attr(FrameOptions) public frameOptions?: FrameOptions; @core.attr(ReferrerPolicy) public referrerPolicy?: ReferrerPolicy; @core.attr(StrictTransportSecurity) public strictTransportSecurity?: StrictTransportSecurity; @core.attr(XssProtection) public xssProtection?: XssProtection; } export interface ServerTimingHeadersConfigArgs extends core.SchemaArgs { enabled: boolean | core.BooleanOut; samplingRate: number | core.NumberOut; } export class ServerTimingHeadersConfig extends core.Schema { @core.attr(Boolean) public enabled!: boolean | core.BooleanOut; @core.attr(Number) public samplingRate!: number | core.NumberOut; } export interface ResponseHeadersPolicyArgs extends core.ResourceArgs { /** * (Optional) A comment to describe the response headers policy. The comment cannot be longer than 128 * characters. */ comment?: string | core.StringOut; /** * (Optional) A configuration for a set of HTTP response headers that are used for Cross-Origin Resourc * e Sharing (CORS). See [Cors Config](#cors-config) for more information. */ corsConfig?: CorsConfig; /** * (Optional) Object that contains an attribute `items` that contains a list of custom headers. See [Cu * stom Header](#custom-header) for more information. */ customHeadersConfig?: CustomHeadersConfig; /** * The current version of the response headers policy. */ etag?: string | core.StringOut; /** * (Required) A unique name to identify the response headers policy. */ name: string | core.StringOut; /** * (Optional) A configuration for a set of security-related HTTP response headers. See [Security Header * s Config](#security-headers-config) for more information. */ securityHeadersConfig?: SecurityHeadersConfig; /** * (Optional) A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFr * ont. See [Server Timing Headers Config](#server-timing-headers-config) for more information. */ serverTimingHeadersConfig?: ServerTimingHeadersConfig; } export class ResponseHeadersPolicy extends core.Resource { /** * (Optional) A comment to describe the response headers policy. The comment cannot be longer than 128 * characters. */ @core.attr(String) public comment?: string | core.StringOut; /** * (Optional) A configuration for a set of HTTP response headers that are used for Cross-Origin Resourc * e Sharing (CORS). See [Cors Config](#cors-config) for more information. */ @core.attr(CorsConfig) public corsConfig?: CorsConfig; /** * (Optional) Object that contains an attribute `items` that contains a list of custom headers. See [Cu * stom Header](#custom-header) for more information. */ @core.attr(CustomHeadersConfig) public customHeadersConfig?: CustomHeadersConfig; /** * The current version of the response headers policy. */ @core.attr(String, { computed: true }) public etag?: string | core.StringOut; /** * The identifier for the response headers policy. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) A unique name to identify the response headers policy. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) A configuration for a set of security-related HTTP response headers. See [Security Header * s Config](#security-headers-config) for more information. */ @core.attr(SecurityHeadersConfig) public securityHeadersConfig?: SecurityHeadersConfig; /** * (Optional) A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFr * ont. See [Server Timing Headers Config](#server-timing-headers-config) for more information. */ @core.attr(ServerTimingHeadersConfig) public serverTimingHeadersConfig?: ServerTimingHeadersConfig; constructor(name: string, args?: ResponseHeadersPolicyArgs) { super(name, "aws_cloudfront_response_headers_policy", args); } public override getNamespace(): string { return "aws_cloudfront"; } }