import * as core from "@terrascript/core"; export interface CorsConfigurationArgs extends core.SchemaArgs { allowCredentials: boolean | core.BooleanOut; allowHeaders: core.Array | core.ArrayOut; allowMethods: core.Array | core.ArrayOut; allowOrigins: core.Array | core.ArrayOut; exposeHeaders: core.Array | core.ArrayOut; maxAge: number | core.NumberOut; } export class CorsConfiguration extends core.Schema { @core.attr(Boolean, { computed: true }) public allowCredentials!: boolean | core.BooleanOut; @core.attr(String, { computed: true, kind: "array" }) public allowHeaders!: core.Array | core.ArrayOut; @core.attr(String, { computed: true, kind: "array" }) public allowMethods!: core.Array | core.ArrayOut; @core.attr(String, { computed: true, kind: "array" }) public allowOrigins!: core.Array | core.ArrayOut; @core.attr(String, { computed: true, kind: "array" }) public exposeHeaders!: core.Array | core.ArrayOut; @core.attr(Number, { computed: true }) public maxAge!: number | core.NumberOut; } export interface DsApiArgs { /** * (Required) The API identifier. */ apiId: string | core.StringOut; /** * A map of resource tags. */ tags?: core.Map | core.MapOut; } export class DsApi extends core.Data { /** * The URI of the API, of the form `https://{api-id}.execute-api.{region}.amazonaws.com` for HTTP APIs * and `wss://{api-id}.execute-api.{region}.amazonaws.com` for WebSocket APIs. */ @core.attr(String, { computed: true }) public apiEndpoint!: string | core.StringOut; /** * (Required) The API identifier. */ @core.attr(String) public apiId!: string | core.StringOut; /** * An [API key selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apiga * teway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions * ). */ @core.attr(String, { computed: true }) public apiKeySelectionExpression!: string | core.StringOut; /** * The ARN of the API. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * The cross-origin resource sharing (CORS) [configuration](https://docs.aws.amazon.com/apigateway/late * st/developerguide/http-api-cors.html). */ @core.attr(CorsConfiguration, { computed: true, kind: "array" }) public corsConfiguration!: | core.Array | core.ArrayOut; /** * The description of the API. */ @core.attr(String, { computed: true }) public description!: string | core.StringOut; /** * Whether clients can invoke the API by using the default `execute-api` endpoint. */ @core.attr(Boolean, { computed: true }) public disableExecuteApiEndpoint!: boolean | core.BooleanOut; /** * The ARN prefix to be used in an [`aws_lambda_permission`](/docs/providers/aws/r/lambda_permission.ht * ml)'s `source_arn` attribute */ @core.attr(String, { computed: true }) public executionArn!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * The name of the API. */ @core.attr(String, { computed: true }) public name!: string | core.StringOut; /** * The API protocol. */ @core.attr(String, { computed: true }) public protocolType!: string | core.StringOut; /** * The [route selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigat * eway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-selection-expressions) * for the API. */ @core.attr(String, { computed: true }) public routeSelectionExpression!: string | core.StringOut; /** * A map of resource tags. */ @core.attr(String, { computed: true, kind: "map" }) public tags?: core.Map | core.MapOut; /** * A version identifier for the API. */ @core.attr(String, { computed: true }) public version!: string | core.StringOut; constructor(name: string, args?: DsApiArgs) { super(name, "aws_apigatewayv2_api", args); } public override getNamespace(): string { return "aws_apigatewayv2"; } }