AwsApiGatewayRestRouteArgs

interface AwsApiGatewayRestRouteArgs { apiKeyRequired?: Input<boolean>; authorization?: Input<string>; integration: AwsApiGatewayRestRouteIntegrationArgs; method: Input<string>; path: Input<string>; }

REST API route definition for AwsApiGatewayRestArgs.

Remarks

When supplied through AwsApiGatewayRestArgs.routes, path and method are derived from the map key (<METHOD> <path>, for example GET /v1/users) and are omitted from the value. The map key is the stable route identity; the method is uppercased for the provider and the path must start with /.

Example

CODE
const route: AwsApiGatewayRestRouteArgs = {
  path: '/v1/users',
  method: 'GET',
  integration: {
    type: 'lambda',
    targetArn: usersFunction.arn,
    createInvokePermission: false,
  },
};

Properties

apiKeyRequired: Input<boolean>

Whether the method requires an API key.

authorization: Input<string>

Method authorisation mode. Defaults to NONE.

integration: AwsApiGatewayRestRouteIntegrationArgs

Typed integration settings.

method: Input<string>

HTTP method (for example GET, POST, ANY). Derived from the map key in AwsApiGatewayRestArgs.routes.

path: Input<string>

Route path. Must start with /. Derived from the map key in AwsApiGatewayRestArgs.routes.