From f23adb8ec4cf5236b7579f27cf823db3017aa826 Mon Sep 17 00:00:00 2001 From: Christopher Sundersingh Date: Fri, 17 Sep 2021 11:50:55 -0700 Subject: [PATCH 1/2] add lambda authorizer config to AppSync types --- .../cloudform-types/types/appSync/graphQlApi.js | 6 ++++++ .../cloudform-types/types/appSync/graphQlApi.ts | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/packages/cloudform-types/types/appSync/graphQlApi.js b/packages/cloudform-types/types/appSync/graphQlApi.js index b61813064..dd73f4d89 100644 --- a/packages/cloudform-types/types/appSync/graphQlApi.js +++ b/packages/cloudform-types/types/appSync/graphQlApi.js @@ -38,6 +38,12 @@ class LogConfig { } } exports.LogConfig = LogConfig; +class LambdaAuthorizerConfig { + constructor(properties) { + Object.assign(this, properties); + } +} +exports.LambdaAuthorizerConfig = LambdaAuthorizerConfig; class AdditionalAuthenticationProvider { constructor(properties) { Object.assign(this, properties); diff --git a/packages/cloudform-types/types/appSync/graphQlApi.ts b/packages/cloudform-types/types/appSync/graphQlApi.ts index 1d8513425..61a418a0d 100644 --- a/packages/cloudform-types/types/appSync/graphQlApi.ts +++ b/packages/cloudform-types/types/appSync/graphQlApi.ts @@ -61,9 +61,20 @@ export class LogConfig { } } +export class LambdaAuthorizerConfig { + AuthorizerUri?: Value + AuthorizerResultTtlInSeconds?: Value + IdentityValidationExpression?: Value + + constructor(properties: LogConfig) { + Object.assign(this, properties) + } +} + export class AdditionalAuthenticationProvider { OpenIDConnectConfig?: OpenIDConnectConfig UserPoolConfig?: CognitoUserPoolConfig + LambdaAuthorizerConfig?: LambdaAuthorizerConfig AuthenticationType!: Value constructor(properties: AdditionalAuthenticationProvider) { @@ -75,6 +86,7 @@ export interface GraphQLApiProperties { OpenIDConnectConfig?: OpenIDConnectConfig XrayEnabled?: Value UserPoolConfig?: UserPoolConfig + LambdaAuthorizerConfig?: LambdaAuthorizerConfig Tags?: Tags Name: Value AuthenticationType: Value @@ -87,6 +99,7 @@ export default class GraphQLApi extends ResourceBase { static CognitoUserPoolConfig = CognitoUserPoolConfig static UserPoolConfig = UserPoolConfig static LogConfig = LogConfig + static LambdaAuthorizerConfig = LambdaAuthorizerConfig static AdditionalAuthenticationProvider = AdditionalAuthenticationProvider constructor(properties: GraphQLApiProperties) { From 0441788393c4c322fe26fc90cda5ca25896aed84 Mon Sep 17 00:00:00 2001 From: Christopher Sundersingh Date: Fri, 17 Sep 2021 11:55:41 -0700 Subject: [PATCH 2/2] correct type name --- packages/cloudform-types/types/appSync/graphQlApi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cloudform-types/types/appSync/graphQlApi.ts b/packages/cloudform-types/types/appSync/graphQlApi.ts index 61a418a0d..33b3e45f0 100644 --- a/packages/cloudform-types/types/appSync/graphQlApi.ts +++ b/packages/cloudform-types/types/appSync/graphQlApi.ts @@ -66,7 +66,7 @@ export class LambdaAuthorizerConfig { AuthorizerResultTtlInSeconds?: Value IdentityValidationExpression?: Value - constructor(properties: LogConfig) { + constructor(properties: LambdaAuthorizerConfig) { Object.assign(this, properties) } }