import * as core from "@terrascript/core"; export interface JwtConfigurationArgs extends core.SchemaArgs { audience?: core.Array | core.ArrayOut; issuer?: string | core.StringOut; } export class JwtConfiguration extends core.Schema { @core.attr(String, { kind: "array" }) public audience?: core.Array | core.ArrayOut; @core.attr(String) public issuer?: string | core.StringOut; } export interface AuthorizerArgs extends core.ResourceArgs { /** * (Required) The API identifier. */ apiId: string | core.StringOut; /** * (Optional) The required credentials as an IAM role for API Gateway to invoke the authorizer. */ authorizerCredentialsArn?: string | core.StringOut; /** * (Optional) The format of the payload sent to an HTTP API Lambda authorizer. Required for HTTP API La * mbda authorizers. */ authorizerPayloadFormatVersion?: string | core.StringOut; /** * (Optional) The time to live (TTL) for cached authorizer results, in seconds. If it equals 0, authori * zation caching is disabled. */ authorizerResultTtlInSeconds?: number | core.NumberOut; /** * (Required) The authorizer type. Valid values: `JWT`, `REQUEST`. */ authorizerType: string | core.StringOut; /** * (Optional) The authorizer's Uniform Resource Identifier (URI). */ authorizerUri?: string | core.StringOut; /** * (Optional) Whether a Lambda authorizer returns a response in a simple format. If enabled, the Lambda * authorizer can return a boolean value instead of an IAM policy. */ enableSimpleResponses?: boolean | core.BooleanOut; /** * (Optional) The identity sources for which authorization is requested. */ identitySources?: core.Array | core.ArrayOut; /** * (Optional) The configuration of a JWT authorizer. Required for the `JWT` authorizer type. */ jwtConfiguration?: JwtConfiguration; /** * (Required) The name of the authorizer. Must be between 1 and 128 characters in length. */ name: string | core.StringOut; } export class Authorizer extends core.Resource { /** * (Required) The API identifier. */ @core.attr(String) public apiId!: string | core.StringOut; /** * (Optional) The required credentials as an IAM role for API Gateway to invoke the authorizer. */ @core.attr(String) public authorizerCredentialsArn?: string | core.StringOut; /** * (Optional) The format of the payload sent to an HTTP API Lambda authorizer. Required for HTTP API La * mbda authorizers. */ @core.attr(String) public authorizerPayloadFormatVersion?: string | core.StringOut; /** * (Optional) The time to live (TTL) for cached authorizer results, in seconds. If it equals 0, authori * zation caching is disabled. */ @core.attr(Number, { computed: true }) public authorizerResultTtlInSeconds?: number | core.NumberOut; /** * (Required) The authorizer type. Valid values: `JWT`, `REQUEST`. */ @core.attr(String) public authorizerType!: string | core.StringOut; /** * (Optional) The authorizer's Uniform Resource Identifier (URI). */ @core.attr(String) public authorizerUri?: string | core.StringOut; /** * (Optional) Whether a Lambda authorizer returns a response in a simple format. If enabled, the Lambda * authorizer can return a boolean value instead of an IAM policy. */ @core.attr(Boolean) public enableSimpleResponses?: boolean | core.BooleanOut; /** * The authorizer identifier. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The identity sources for which authorization is requested. */ @core.attr(String, { kind: "array" }) public identitySources?: core.Array | core.ArrayOut; /** * (Optional) The configuration of a JWT authorizer. Required for the `JWT` authorizer type. */ @core.attr(JwtConfiguration) public jwtConfiguration?: JwtConfiguration; /** * (Required) The name of the authorizer. Must be between 1 and 128 characters in length. */ @core.attr(String) public name!: string | core.StringOut; constructor(name: string, args?: AuthorizerArgs) { super(name, "aws_apigatewayv2_authorizer", args); } public override getNamespace(): string { return "aws_apigatewayv2"; } }