AwsApiGatewayHttpRouteAuthorizerAuthorizationArgs

interface AwsApiGatewayHttpRouteAuthorizerAuthorizationArgs { authorizationScopes?: Input<string>[]; authorizerKey: Input<string>; type: 'CUSTOM' | 'JWT'; }

Authorizer-backed route authorisation settings for HTTP routes.

Remarks

type must match the type of the referenced authorizer. For example, routes configured with type: 'JWT' must reference a JWT authorizer and routes configured with type: 'CUSTOM' must reference a CUSTOM authorizer.

authorizationScopes is only supported when type is JWT.

Example

CODE
const authorization: AwsApiGatewayHttpRouteAuthorizerAuthorizationArgs = {
  type: 'JWT',
  authorizerKey: 'jwt-main',
  authorizationScopes: ['orders:read'],
};

Properties

authorizationScopes: Input<string>[]

Optional JWT scopes used for route authorisation. Supported only when type is JWT.

authorizerKey: Input<string>

Authorizer key referencing one entry from AwsApiGatewayHttpArgs.authorizers.

type: 'CUSTOM' | 'JWT'

Authorisation type for the route. Must match the referenced authorizer type.