diff --git a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/README.md b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/README.md index 1464b6a465132..73a71f22fb22c 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/README.md +++ b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/README.md @@ -334,8 +334,8 @@ api.addRoutes({ // You can only access authorizerId after it's been bound to a route // In this example we expect use CfnOutput -new CfnOutput(stack, 'authorizerId', authorizer.authorizerId); -new CfnOutput(stack, 'authorizerType', authorizer.authorizerType); +new CfnOutput(this, 'authorizerId', authorizer.authorizerId); +new CfnOutput(this, 'authorizerType', authorizer.authorizerType); ``` ```ts diff --git a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/lib/http/iam.ts b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/lib/http/iam.ts index 4ea1b24567852..da6b21936422c 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/lib/http/iam.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/lib/http/iam.ts @@ -9,7 +9,7 @@ import { * Authorize HTTP API Routes with IAM */ export class HttpIamAuthorizer implements IHttpRouteAuthorizer { - /** + /** * The authorizationType used for IAM Authorizer */ public readonly authorizationType = HttpAuthorizerType.IAM; diff --git a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts index 1b12c69ae6b1e..78a3a56c95d0e 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts @@ -75,6 +75,7 @@ describe('HttpJwtAuthorizer', () => { // THEN expect(authorizer.authorizerId).toBeDefined(); + expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId); }); test('should throw error when acessing authorizer before it been bound to route', () => { diff --git a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts index 3d48426c81834..43eba81e63fc3 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts @@ -181,6 +181,7 @@ describe('HttpLambdaAuthorizer', () => { // THEN expect(authorizer.authorizerId).toBeDefined(); + expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId); }); test('should throw error when acessing authorizer before it been bound to route', () => { diff --git a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts index d5155d969bbf6..d24cb8e98e0be 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts @@ -124,6 +124,7 @@ describe('HttpUserPoolAuthorizer', () => { // THEN expect(authorizer.authorizerId).toBeDefined(); + expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId); }); test('should throw error when acessing authorizer before it been bound to route', () => { diff --git a/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/authorizer.ts b/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/authorizer.ts index 027b65c948cb9..0221a11c1dfea 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/authorizer.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/authorizer.ts @@ -257,6 +257,9 @@ function undefinedIfNoKeys(obj: A): A | un * Explicitly configure no authorizers on specific HTTP API routes. */ export class HttpNoneAuthorizer implements IHttpRouteAuthorizer { + /** + * The authorizationType used for IAM Authorizer + */ public readonly authorizationType = 'NONE'; public bind(_options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig { return {