AwsApiGatewayRestArgs

interface AwsApiGatewayRestArgs { customDomain?: AwsApiGatewayRestCustomDomainArgs; description?: Input<string>; routes?: Record<string, Omit<AwsApiGatewayRestRouteArgs, 'path' | 'method'>>; stageName?: Input<string>; tags?: Input<Record<string, Input<string>>>; wafAttachment?: AwsApiGatewayWafAttachmentArgs; }

REST API capability inputs for AwsApiGateway.

Example

CODE
const restArgs: AwsApiGatewayRestArgs = {
  stageName: 'v1',
  customDomain: {
    domainName: 'api.example.com',
    endpointType: 'REGIONAL',
    securityPolicy: 'SecurityPolicy_TLS13_1_3_2025_09',
    endpointAccessMode: 'BASIC',
    certificate: {
      regionalCertificateArn: regionalCertificate.arn,
    },
  },
  routes: {
    'GET /health': {
      integration: {
        type: 'lambda',
        targetArn: healthFunction.arn,
        createInvokePermission: false,
      },
    },
  },
};

Properties

customDomain: AwsApiGatewayRestCustomDomainArgs

Optional custom-domain mapping for this REST API stage.

description: Input<string>

Optional API description.

routes: Record<string, Omit<AwsApiGatewayRestRouteArgs, 'path' | 'method'>>

Route definitions for the REST API keyed by <METHOD> <path> (for example GET /v1/users). The map key is the stable route identity; the method is uppercased for the provider and the path must start with /. Must contain at least one route unless customDomain.mappingTarget is provided.

stageName: Input<string>

Stage name. Defaults to v1.

tags: Input<Record<string, Input<string>>>

Additional tags merged with default project/environment tags.

wafAttachment: AwsApiGatewayWafAttachmentArgs

Optional WAFv2 web ACL attachment for the effective REST API stage.