import * as core from "@terrascript/core"; export interface IndexDocumentArgs extends core.SchemaArgs { suffix: string | core.StringOut; } export class IndexDocument extends core.Schema { @core.attr(String) public suffix!: string | core.StringOut; } export interface ErrorDocumentArgs extends core.SchemaArgs { key: string | core.StringOut; } export class ErrorDocument extends core.Schema { @core.attr(String) public key!: string | core.StringOut; } export interface RedirectArgs extends core.SchemaArgs { hostName?: string | core.StringOut; httpRedirectCode?: string | core.StringOut; protocol?: string | core.StringOut; replaceKeyPrefixWith?: string | core.StringOut; replaceKeyWith?: string | core.StringOut; } export class Redirect extends core.Schema { @core.attr(String) public hostName?: string | core.StringOut; @core.attr(String) public httpRedirectCode?: string | core.StringOut; @core.attr(String) public protocol?: string | core.StringOut; @core.attr(String) public replaceKeyPrefixWith?: string | core.StringOut; @core.attr(String) public replaceKeyWith?: string | core.StringOut; } export interface ConditionArgs extends core.SchemaArgs { httpErrorCodeReturnedEquals?: string | core.StringOut; keyPrefixEquals?: string | core.StringOut; } export class Condition extends core.Schema { @core.attr(String) public httpErrorCodeReturnedEquals?: string | core.StringOut; @core.attr(String) public keyPrefixEquals?: string | core.StringOut; } export interface RoutingRuleArgs extends core.SchemaArgs { condition?: Condition; redirect: Redirect; } export class RoutingRule extends core.Schema { @core.attr(Condition) public condition?: Condition; @core.attr(Redirect) public redirect!: Redirect; } export interface RedirectAllRequestsToArgs extends core.SchemaArgs { hostName: string | core.StringOut; protocol?: string | core.StringOut; } export class RedirectAllRequestsTo extends core.Schema { @core.attr(String) public hostName!: string | core.StringOut; @core.attr(String) public protocol?: string | core.StringOut; } export interface BucketWebsiteConfigurationArgs extends core.ResourceArgs { /** * (Required, Forces new resource) The name of the bucket. */ bucket: string | core.StringOut; /** * (Optional, Conflicts with `redirect_all_requests_to`) The name of the error document for the website * [detailed below](#error_document). */ errorDocument?: ErrorDocument; /** * (Optional, Forces new resource) The account ID of the expected bucket owner. */ expectedBucketOwner?: string | core.StringOut; /** * (Optional, Required if `redirect_all_requests_to` is not specified) The name of the index document f * or the website [detailed below](#index_document). */ indexDocument?: IndexDocument; /** * (Optional, Required if `index_document` is not specified) The redirect behavior for every request to * this bucket's website endpoint [detailed below](#redirect_all_requests_to). Conflicts with `error_d * ocument`, `index_document`, and `routing_rule`. */ redirectAllRequestsTo?: RedirectAllRequestsTo; /** * (Optional, Conflicts with `redirect_all_requests_to` and `routing_rules`) List of rules that define * when a redirect is applied and the redirect behavior [detailed below](#routing_rule). */ routingRule?: core.Array | core.ArrayOut; /** * (Optional, Conflicts with `routing_rule` and `redirect_all_requests_to`) A json array containing [ro * uting rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websit * econfiguration-routingrules.html) */ routingRules?: string | core.StringOut; } export class BucketWebsiteConfiguration extends core.Resource { /** * (Required, Forces new resource) The name of the bucket. */ @core.attr(String) public bucket!: string | core.StringOut; /** * (Optional, Conflicts with `redirect_all_requests_to`) The name of the error document for the website * [detailed below](#error_document). */ @core.attr(ErrorDocument) public errorDocument?: ErrorDocument; /** * (Optional, Forces new resource) The account ID of the expected bucket owner. */ @core.attr(String) public expectedBucketOwner?: string | core.StringOut; /** * The `bucket` or `bucket` and `expected_bucket_owner` separated by a comma (`,`) if the latter is pro * vided. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional, Required if `redirect_all_requests_to` is not specified) The name of the index document f * or the website [detailed below](#index_document). */ @core.attr(IndexDocument) public indexDocument?: IndexDocument; /** * (Optional, Required if `index_document` is not specified) The redirect behavior for every request to * this bucket's website endpoint [detailed below](#redirect_all_requests_to). Conflicts with `error_d * ocument`, `index_document`, and `routing_rule`. */ @core.attr(RedirectAllRequestsTo) public redirectAllRequestsTo?: RedirectAllRequestsTo; /** * (Optional, Conflicts with `redirect_all_requests_to` and `routing_rules`) List of rules that define * when a redirect is applied and the redirect behavior [detailed below](#routing_rule). */ @core.attr(RoutingRule, { computed: true, kind: "array" }) public routingRule?: core.Array | core.ArrayOut; /** * (Optional, Conflicts with `routing_rule` and `redirect_all_requests_to`) A json array containing [ro * uting rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websit * econfiguration-routingrules.html) */ @core.attr(String, { computed: true }) public routingRules?: string | core.StringOut; /** * The domain of the website endpoint. This is used to create Route 53 alias records. */ @core.attr(String, { computed: true }) public websiteDomain!: string | core.StringOut; /** * The website endpoint. */ @core.attr(String, { computed: true }) public websiteEndpoint!: string | core.StringOut; constructor(name: string, args?: BucketWebsiteConfigurationArgs) { super(name, "aws_s3_bucket_website_configuration", args); } public override getNamespace(): string { return "aws_s3"; } }