aws-cdk-lib.aws_apigateway.AuthorizationType

enum AuthorizationType

LanguageType name
.NETAmazon.CDK.AWS.APIGateway.AuthorizationType
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#AuthorizationType
Javasoftware.amazon.awscdk.services.apigateway.AuthorizationType
Pythonaws_cdk.aws_apigateway.AuthorizationType
TypeScript (source)aws-cdk-lib » aws_apigateway » AuthorizationType

Example

const userPool = new cognito.UserPool(this, 'UserPool');

const auth = new apigateway.CognitoUserPoolsAuthorizer(this, 'booksAuthorizer', {
  cognitoUserPools: [userPool]
});

declare const books: apigateway.Resource;
books.addMethod('GET', new apigateway.HttpIntegration('http://amazon.com'), {
  authorizer: auth,
  authorizationType: apigateway.AuthorizationType.COGNITO,
});

Members

NameDescription
NONEOpen access.
IAMUse AWS IAM permissions.
CUSTOMUse a custom authorizer.
COGNITOUse an AWS Cognito user pool.

NONE

Open access.


IAM

Use AWS IAM permissions.


CUSTOM

Use a custom authorizer.


COGNITO

Use an AWS Cognito user pool.