@aws-cdk_aws-apigatewayv2-alpha.HttpAuthorizerProps

interface HttpAuthorizerProps ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Alpha.HttpAuthorizerProps
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2alpha/v2#HttpAuthorizerProps
Javasoftware.amazon.awscdk.services.apigatewayv2.alpha.HttpAuthorizerProps
Pythonaws_cdk.aws_apigatewayv2_alpha.HttpAuthorizerProps
TypeScript (source)@aws-cdk/aws-apigatewayv2-alpha ยป HttpAuthorizerProps

Properties to initialize an instance of HttpAuthorizer.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apigatewayv2_alpha from '@aws-cdk/aws-apigatewayv2-alpha';
import * as cdk from 'aws-cdk-lib';

declare const httpApi: apigatewayv2_alpha.HttpApi;
const httpAuthorizerProps: apigatewayv2_alpha.HttpAuthorizerProps = {
  httpApi: httpApi,
  identitySource: ['identitySource'],
  type: apigatewayv2_alpha.HttpAuthorizerType.IAM,

  // the properties below are optional
  authorizerName: 'authorizerName',
  authorizerUri: 'authorizerUri',
  enableSimpleResponses: false,
  jwtAudience: ['jwtAudience'],
  jwtIssuer: 'jwtIssuer',
  payloadFormatVersion: apigatewayv2_alpha.AuthorizerPayloadVersion.VERSION_1_0,
  resultsCacheTtl: cdk.Duration.minutes(30),
};

Properties

NameTypeDescription
httpApi๐Ÿ”นIHttpApiHTTP Api to attach the authorizer to.
identitySource๐Ÿ”นstring[]The identity source for which authorization is requested.
type๐Ÿ”นHttpAuthorizerTypeThe type of authorizer.
authorizerName?๐Ÿ”นstringName of the authorizer.
authorizerUri?๐Ÿ”นstringThe authorizer's Uniform Resource Identifier (URI).
enableSimpleResponses?๐Ÿ”นbooleanSpecifies whether a Lambda authorizer returns a response in a simple format.
jwtAudience?๐Ÿ”นstring[]A list of the intended recipients of the JWT.
jwtIssuer?๐Ÿ”นstringThe base domain of the identity provider that issues JWT.
payloadFormatVersion?๐Ÿ”นAuthorizerPayloadVersionSpecifies the format of the payload sent to an HTTP API Lambda authorizer.
resultsCacheTtl?๐Ÿ”นDurationHow long APIGateway should cache the results.

httpApi๐Ÿ”น

Type: IHttpApi

HTTP Api to attach the authorizer to.


identitySource๐Ÿ”น

Type: string[]

The identity source for which authorization is requested.

See also: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource


type๐Ÿ”น

Type: HttpAuthorizerType

The type of authorizer.


authorizerName?๐Ÿ”น

Type: string (optional, default: id of the HttpAuthorizer construct.)

Name of the authorizer.


authorizerUri?๐Ÿ”น

Type: string (optional, default: required for Request authorizer types)

The authorizer's Uniform Resource Identifier (URI).

For REQUEST authorizers, this must be a well-formed Lambda function URI.


enableSimpleResponses?๐Ÿ”น

Type: boolean (optional, default: The lambda authorizer must return an IAM policy as its response)

Specifies 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.


jwtAudience?๐Ÿ”น

Type: string[] (optional, default: required for JWT authorizer typess.)

A list of the intended recipients of the JWT.

A valid JWT must provide an aud that matches at least one entry in this list.


jwtIssuer?๐Ÿ”น

Type: string (optional, default: required for JWT authorizer types.)

The base domain of the identity provider that issues JWT.


payloadFormatVersion?๐Ÿ”น

Type: AuthorizerPayloadVersion (optional, default: AuthorizerPayloadVersion.VERSION_2_0 if the authorizer type is HttpAuthorizerType.LAMBDA)

Specifies the format of the payload sent to an HTTP API Lambda authorizer.


resultsCacheTtl?๐Ÿ”น

Type: Duration (optional, default: API Gateway will not cache authorizer responses)

How long APIGateway should cache the results.

Max 1 hour.