enum AppSyncAuthorizationType
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AppSync.AppSyncAuthorizationType |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#AppSyncAuthorizationType |
Java | software.amazon.awscdk.services.appsync.AppSyncAuthorizationType |
Python | aws_cdk.aws_appsync.AppSyncAuthorizationType |
TypeScript (source) | 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,
},
});
api.addChannelNamespace('default');
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.

.NET
Go
Java
Python
TypeScript (