import * as core from "@terrascript/core"; export interface CorsRuleArgs extends core.SchemaArgs { allowedHeaders?: core.Array | core.ArrayOut; allowedMethods: core.Array | core.ArrayOut; allowedOrigins: core.Array | core.ArrayOut; exposeHeaders?: core.Array | core.ArrayOut; id?: string | core.StringOut; maxAgeSeconds?: number | core.NumberOut; } export class CorsRule extends core.Schema { @core.attr(String, { kind: "array" }) public allowedHeaders?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public allowedMethods!: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public allowedOrigins!: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public exposeHeaders?: core.Array | core.ArrayOut; @core.attr(String) public id?: string | core.StringOut; @core.attr(Number) public maxAgeSeconds?: number | core.NumberOut; } export interface BucketCorsConfigurationArgs extends core.ResourceArgs { /** * (Required, Forces new resource) The name of the bucket. */ bucket: string | core.StringOut; /** * (Required) Set of origins and methods (cross-origin access that you want to allow) [documented below * ](#cors_rule). You can configure up to 100 rules. */ corsRule: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) The account ID of the expected bucket owner. */ expectedBucketOwner?: string | core.StringOut; } export class BucketCorsConfiguration extends core.Resource { /** * (Required, Forces new resource) The name of the bucket. */ @core.attr(String) public bucket!: string | core.StringOut; /** * (Required) Set of origins and methods (cross-origin access that you want to allow) [documented below * ](#cors_rule). You can configure up to 100 rules. */ @core.attr(CorsRule, { kind: "array" }) public corsRule!: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) The account ID of the expected bucket owner. */ @core.attr(String) public expectedBucketOwner?: string | core.StringOut; /** * (Optional) Unique identifier for the rule. The value cannot be longer than 255 characters. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; constructor(name: string, args?: BucketCorsConfigurationArgs) { super(name, "aws_s3_bucket_cors_configuration", args); } public override getNamespace(): string { return "aws_s3"; } }