import * as core from "@terrascript/core"; export interface WeightedTargetArgs extends core.SchemaArgs { virtualNode: string | core.StringOut; weight: number | core.NumberOut; } export class WeightedTarget extends core.Schema { @core.attr(String) public virtualNode!: string | core.StringOut; @core.attr(Number) public weight!: number | core.NumberOut; } export interface ActionArgs extends core.SchemaArgs { weightedTarget: core.Array | core.ArrayOut; } export class Action extends core.Schema { @core.attr(WeightedTarget, { kind: "array" }) public weightedTarget!: | core.Array | core.ArrayOut; } export interface RangeArgs extends core.SchemaArgs { end: number | core.NumberOut; start: number | core.NumberOut; } export class Range extends core.Schema { @core.attr(Number) public end!: number | core.NumberOut; @core.attr(Number) public start!: number | core.NumberOut; } export interface MetadataMatchArgs extends core.SchemaArgs { exact?: string | core.StringOut; prefix?: string | core.StringOut; range?: Range; regex?: string | core.StringOut; suffix?: string | core.StringOut; } export class MetadataMatch extends core.Schema { @core.attr(String) public exact?: string | core.StringOut; @core.attr(String) public prefix?: string | core.StringOut; @core.attr(Range) public range?: Range; @core.attr(String) public regex?: string | core.StringOut; @core.attr(String) public suffix?: string | core.StringOut; } export interface MetadataArgs extends core.SchemaArgs { invert?: boolean | core.BooleanOut; match?: MetadataMatch; name: string | core.StringOut; } export class Metadata extends core.Schema { @core.attr(Boolean) public invert?: boolean | core.BooleanOut; @core.attr(MetadataMatch) public match?: MetadataMatch; @core.attr(String) public name!: string | core.StringOut; } export interface GrpcRouteMatchArgs extends core.SchemaArgs { metadata?: core.Array | core.ArrayOut; methodName?: string | core.StringOut; prefix?: string | core.StringOut; serviceName?: string | core.StringOut; } export class GrpcRouteMatch extends core.Schema { @core.attr(Metadata, { kind: "array" }) public metadata?: core.Array | core.ArrayOut; @core.attr(String) public methodName?: string | core.StringOut; @core.attr(String) public prefix?: string | core.StringOut; @core.attr(String) public serviceName?: string | core.StringOut; } export interface PerRetryTimeoutArgs extends core.SchemaArgs { unit: string | core.StringOut; value: number | core.NumberOut; } export class PerRetryTimeout extends core.Schema { @core.attr(String) public unit!: string | core.StringOut; @core.attr(Number) public value!: number | core.NumberOut; } export interface GrpcRouteRetryPolicyArgs extends core.SchemaArgs { grpcRetryEvents?: core.Array | core.ArrayOut; httpRetryEvents?: core.Array | core.ArrayOut; maxRetries: number | core.NumberOut; perRetryTimeout: PerRetryTimeout; tcpRetryEvents?: core.Array | core.ArrayOut; } export class GrpcRouteRetryPolicy extends core.Schema { @core.attr(String, { kind: "array" }) public grpcRetryEvents?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public httpRetryEvents?: core.Array | core.ArrayOut; @core.attr(Number) public maxRetries!: number | core.NumberOut; @core.attr(PerRetryTimeout) public perRetryTimeout!: PerRetryTimeout; @core.attr(String, { kind: "array" }) public tcpRetryEvents?: core.Array | core.ArrayOut; } export interface IdleArgs extends core.SchemaArgs { unit: string | core.StringOut; value: number | core.NumberOut; } export class Idle extends core.Schema { @core.attr(String) public unit!: string | core.StringOut; @core.attr(Number) public value!: number | core.NumberOut; } export interface PerRequestArgs extends core.SchemaArgs { unit: string | core.StringOut; value: number | core.NumberOut; } export class PerRequest extends core.Schema { @core.attr(String) public unit!: string | core.StringOut; @core.attr(Number) public value!: number | core.NumberOut; } export interface GrpcRouteTimeoutArgs extends core.SchemaArgs { idle?: Idle; perRequest?: PerRequest; } export class GrpcRouteTimeout extends core.Schema { @core.attr(Idle) public idle?: Idle; @core.attr(PerRequest) public perRequest?: PerRequest; } export interface GrpcRouteArgs extends core.SchemaArgs { action: Action; match?: GrpcRouteMatch; retryPolicy?: GrpcRouteRetryPolicy; timeout?: GrpcRouteTimeout; } export class GrpcRoute extends core.Schema { @core.attr(Action) public action!: Action; @core.attr(GrpcRouteMatch) public match?: GrpcRouteMatch; @core.attr(GrpcRouteRetryPolicy) public retryPolicy?: GrpcRouteRetryPolicy; @core.attr(GrpcRouteTimeout) public timeout?: GrpcRouteTimeout; } export interface HeaderArgs extends core.SchemaArgs { invert?: boolean | core.BooleanOut; match?: MetadataMatch; name: string | core.StringOut; } export class Header extends core.Schema { @core.attr(Boolean) public invert?: boolean | core.BooleanOut; @core.attr(MetadataMatch) public match?: MetadataMatch; @core.attr(String) public name!: string | core.StringOut; } export interface Http2RouteMatchArgs extends core.SchemaArgs { header?: core.Array
| core.ArrayOut
; method?: string | core.StringOut; prefix: string | core.StringOut; scheme?: string | core.StringOut; } export class Http2RouteMatch extends core.Schema { @core.attr(Header, { kind: "array" }) public header?: core.Array
| core.ArrayOut
; @core.attr(String) public method?: string | core.StringOut; @core.attr(String) public prefix!: string | core.StringOut; @core.attr(String) public scheme?: string | core.StringOut; } export interface Http2RouteRetryPolicyArgs extends core.SchemaArgs { httpRetryEvents?: core.Array | core.ArrayOut; maxRetries: number | core.NumberOut; perRetryTimeout: PerRetryTimeout; tcpRetryEvents?: core.Array | core.ArrayOut; } export class Http2RouteRetryPolicy extends core.Schema { @core.attr(String, { kind: "array" }) public httpRetryEvents?: core.Array | core.ArrayOut; @core.attr(Number) public maxRetries!: number | core.NumberOut; @core.attr(PerRetryTimeout) public perRetryTimeout!: PerRetryTimeout; @core.attr(String, { kind: "array" }) public tcpRetryEvents?: core.Array | core.ArrayOut; } export interface Http2RouteArgs extends core.SchemaArgs { action: Action; match: Http2RouteMatch; retryPolicy?: Http2RouteRetryPolicy; timeout?: GrpcRouteTimeout; } export class Http2Route extends core.Schema { @core.attr(Action) public action!: Action; @core.attr(Http2RouteMatch) public match!: Http2RouteMatch; @core.attr(Http2RouteRetryPolicy) public retryPolicy?: Http2RouteRetryPolicy; @core.attr(GrpcRouteTimeout) public timeout?: GrpcRouteTimeout; } export interface HttpRouteArgs extends core.SchemaArgs { action: Action; match: Http2RouteMatch; retryPolicy?: Http2RouteRetryPolicy; timeout?: GrpcRouteTimeout; } export class HttpRoute extends core.Schema { @core.attr(Action) public action!: Action; @core.attr(Http2RouteMatch) public match!: Http2RouteMatch; @core.attr(Http2RouteRetryPolicy) public retryPolicy?: Http2RouteRetryPolicy; @core.attr(GrpcRouteTimeout) public timeout?: GrpcRouteTimeout; } export interface TcpRouteTimeoutArgs extends core.SchemaArgs { idle?: Idle; } export class TcpRouteTimeout extends core.Schema { @core.attr(Idle) public idle?: Idle; } export interface TcpRouteArgs extends core.SchemaArgs { action: Action; timeout?: TcpRouteTimeout; } export class TcpRoute extends core.Schema { @core.attr(Action) public action!: Action; @core.attr(TcpRouteTimeout) public timeout?: TcpRouteTimeout; } export interface SpecArgs extends core.SchemaArgs { grpcRoute?: GrpcRoute; http2Route?: Http2Route; httpRoute?: HttpRoute; priority?: number | core.NumberOut; tcpRoute?: TcpRoute; } export class Spec extends core.Schema { @core.attr(GrpcRoute) public grpcRoute?: GrpcRoute; @core.attr(Http2Route) public http2Route?: Http2Route; @core.attr(HttpRoute) public httpRoute?: HttpRoute; @core.attr(Number) public priority?: number | core.NumberOut; @core.attr(TcpRoute) public tcpRoute?: TcpRoute; } export interface RouteArgs extends core.ResourceArgs { /** * (Required) The name of the service mesh in which to create the route. Must be between 1 and 255 char * acters in length. */ meshName: string | core.StringOut; /** * (Optional) The AWS account ID of the service mesh's owner. Defaults to the account ID the [AWS provi * der][1] is currently connected to. */ meshOwner?: string | core.StringOut; /** * (Required) The name to use for the route. Must be between 1 and 255 characters in length. */ name: string | core.StringOut; /** * (Required) The route specification to apply. */ spec: Spec; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Required) The name of the virtual router in which to create the route. Must be between 1 and 255 ch * aracters in length. */ virtualRouterName: string | core.StringOut; } export class Route extends core.Resource { /** * The ARN of the route. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * The creation date of the route. */ @core.attr(String, { computed: true }) public createdDate!: string | core.StringOut; /** * The ID of the route. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * The last update date of the route. */ @core.attr(String, { computed: true }) public lastUpdatedDate!: string | core.StringOut; /** * (Required) The name of the service mesh in which to create the route. Must be between 1 and 255 char * acters in length. */ @core.attr(String) public meshName!: string | core.StringOut; /** * (Optional) The AWS account ID of the service mesh's owner. Defaults to the account ID the [AWS provi * der][1] is currently connected to. */ @core.attr(String, { computed: true }) public meshOwner?: string | core.StringOut; /** * (Required) The name to use for the route. Must be between 1 and 255 characters in length. */ @core.attr(String) public name!: string | core.StringOut; /** * The resource owner's AWS account ID. */ @core.attr(String, { computed: true }) public resourceOwner!: string | core.StringOut; /** * (Required) The route specification to apply. */ @core.attr(Spec) public spec!: Spec; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Required) The name of the virtual router in which to create the route. Must be between 1 and 255 ch * aracters in length. */ @core.attr(String) public virtualRouterName!: string | core.StringOut; constructor(name: string, args?: RouteArgs) { super(name, "aws_appmesh_route", args); } public override getNamespace(): string { return "aws_appmesh"; } }