enum AppSyncAuthorizationType
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppSync.AppSyncAuthorizationType |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#AppSyncAuthorizationType |
![]() | software.amazon.awscdk.services.appsync.AppSyncAuthorizationType |
![]() | aws_cdk.aws_appsync.AppSyncAuthorizationType |
![]() | aws-cdk-lib » aws_appsync » AppSyncAuthorizationType |
enum with all possible values for AppSync authorization type.
Example
import * as logs from 'aws-cdk-lib/aws-logs';
const apiKeyProvider: appsync.AppSyncAuthProvider = {
authorizationType: appsync.AppSyncAuthorizationType.API_KEY,
};
const api = new appsync.EventApi(this, 'api', {
apiName: 'Api',
ownerContact: 'OwnerContact',
authorizationConfig: {
authProviders: [
apiKeyProvider,
],
connectionAuthModeTypes: [
appsync.AppSyncAuthorizationType.API_KEY,
],
defaultPublishAuthModeTypes: [
appsync.AppSyncAuthorizationType.API_KEY,
],
defaultSubscribeAuthModeTypes: [
appsync.AppSyncAuthorizationType.API_KEY,
],
},
logConfig: {
fieldLogLevel: appsync.AppSyncFieldLogLevel.INFO,
retention: logs.RetentionDays.ONE_WEEK,
},
});
Members
Name | Description |
---|---|
API_KEY | API Key authorization type. |
IAM | AWS IAM authorization type. |
USER_POOL | Cognito User Pool authorization type. |
OIDC | OpenID Connect authorization type. |
LAMBDA | Lambda authorization type. |
API_KEY
API Key authorization type.
IAM
AWS IAM authorization type.
Can be used with Cognito Identity Pool federated credentials
USER_POOL
Cognito User Pool authorization type.
OIDC
OpenID Connect authorization type.
LAMBDA
Lambda authorization type.