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 lambda from 'aws-cdk-lib/aws-lambda';
declare const handler: lambda.Function;
const iamProvider: appsync.AppSyncAuthProvider = {
authorizationType: appsync.AppSyncAuthorizationType.IAM,
};
const apiKeyProvider: appsync.AppSyncAuthProvider = {
authorizationType: appsync.AppSyncAuthorizationType.API_KEY,
};
/* API with IAM and API Key providers.
* Connection, default publish and default subscribe
* can be done with either IAM and API Key.
*/
const api = new appsync.EventApi(this, 'api', {
apiName: 'api',
authorizationConfig: {
// set auth providers
authProviders: [
iamProvider,
apiKeyProvider,
],
}
});
api.addChannelNamespace('default');
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.