interface EventApiProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppSync.EventApiProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#EventApiProps |
![]() | software.amazon.awscdk.services.appsync.EventApiProps |
![]() | aws_cdk.aws_appsync.EventApiProps |
![]() | aws-cdk-lib » aws_appsync » EventApiProps |
Properties for an AppSync Event API.
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,
},
});
Properties
Name | Type | Description |
---|---|---|
api | string | the name of the Event API. |
authorization | Event | Optional authorization configuration. |
domain | App | The domain name configuration for the Event API. |
log | App | Logging configuration for this api. |
owner | string | The owner contact information for an API resource. |
apiName
Type:
string
the name of the Event API.
authorizationConfig?
Type:
Event
(optional, default: API Key authorization)
Optional authorization configuration.
domainName?
Type:
App
(optional, default: no domain name)
The domain name configuration for the Event API.
The Route 53 hosted zone and CName DNS record must be configured in addition to this setting to enable custom domain URL
logConfig?
Type:
App
(optional, default: None)
Logging configuration for this api.
ownerContact?
Type:
string
(optional, default: No owner contact.)
The owner contact information for an API resource.
This field accepts any string input with a length of 0 - 256 characters.