import * as core from "@terrascript/core"; export interface CorsArgs 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 Cors extends core.Schema { @core.attr(Boolean) public allowCredentials?: boolean | core.BooleanOut; @core.attr(String, { kind: "array" }) public allowHeaders?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public allowMethods?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public allowOrigins?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public exposeHeaders?: core.Array | core.ArrayOut; @core.attr(Number) public maxAge?: number | core.NumberOut; } export interface FunctionUrlArgs extends core.ResourceArgs { /** * (Required) The type of authentication that the function URL uses. Set to `"AWS_IAM"` to restrict acc * ess to authenticated IAM users only. Set to `"NONE"` to bypass IAM authentication and create a publi * c endpoint. See the [AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html) * for more details. */ authorizationType: string | core.StringOut; /** * (Optional) The [cross-origin resource sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/H * TTP/CORS) settings for the function URL. Documented below. */ cors?: Cors; /** * (Required) The name (or ARN) of the Lambda function. */ functionName: string | core.StringOut; /** * (Optional) The alias name or `"$LATEST"`. */ qualifier?: string | core.StringOut; } export class FunctionUrl extends core.Resource { /** * (Required) The type of authentication that the function URL uses. Set to `"AWS_IAM"` to restrict acc * ess to authenticated IAM users only. Set to `"NONE"` to bypass IAM authentication and create a publi * c endpoint. See the [AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html) * for more details. */ @core.attr(String) public authorizationType!: string | core.StringOut; /** * (Optional) The [cross-origin resource sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/H * TTP/CORS) settings for the function URL. Documented below. */ @core.attr(Cors) public cors?: Cors; /** * The Amazon Resource Name (ARN) of the function. */ @core.attr(String, { computed: true }) public functionArn!: string | core.StringOut; /** * (Required) The name (or ARN) of the Lambda function. */ @core.attr(String) public functionName!: string | core.StringOut; /** * The HTTP URL endpoint for the function in the format `https://.lambda-url..on.aws`. */ @core.attr(String, { computed: true }) public functionUrl!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The alias name or `"$LATEST"`. */ @core.attr(String) public qualifier?: string | core.StringOut; /** * A generated ID for the endpoint. */ @core.attr(String, { computed: true }) public urlId!: string | core.StringOut; constructor(name: string, args?: FunctionUrlArgs) { super(name, "aws_lambda_function_url", args); } public override getNamespace(): string { return "aws_lambda"; } }