EventApiAttributes Struct
Attributes for Event API imports.
| Source | aws-appsync/lib/eventapi.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const eventApiAttributes: appsync.EventApiAttributes = {
apiId: 'apiId',
httpDns: 'httpDns',
realtimeDns: 'realtimeDns',
// the properties below are optional
apiArn: 'apiArn',
apiName: 'apiName',
authProviderTypes: [appsync.AppSyncAuthorizationType.API_KEY],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync
event_api_attributes = appsync.EventApiAttributes(
api_id="apiId",
http_dns="httpDns",
realtime_dns="realtimeDns",
# the properties below are optional
api_arn="apiArn",
api_name="apiName",
auth_provider_types=[appsync.AppSyncAuthorizationType.API_KEY]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;
EventApiAttributes eventApiAttributes = EventApiAttributes.builder()
.apiId("apiId")
.httpDns("httpDns")
.realtimeDns("realtimeDns")
// the properties below are optional
.apiArn("apiArn")
.apiName("apiName")
.authProviderTypes(List.of(AppSyncAuthorizationType.API_KEY))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
var eventApiAttributes = new EventApiAttributes {
ApiId = "apiId",
HttpDns = "httpDns",
RealtimeDns = "realtimeDns",
// the properties below are optional
ApiArn = "apiArn",
ApiName = "apiName",
AuthProviderTypes = new [] { AppSyncAuthorizationType.API_KEY }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
eventApiAttributes := &EventApiAttributes{
ApiId: jsii.String("apiId"),
HttpDns: jsii.String("httpDns"),
RealtimeDns: jsii.String("realtimeDns"),
// the properties below are optional
ApiArn: jsii.String("apiArn"),
ApiName: jsii.String("apiName"),
AuthProviderTypes: []AppSyncAuthorizationType{
awscdk.Aws_appsync.AppSyncAuthorizationType_API_KEY,
},
}
Properties
apiArnoptionalstringapi_arnoptionalstrapiArnoptionalStringApiArnoptionalstringApiArnoptional*string #the ARN of the Event API.
Default: constructed arn
a unique AWS AppSync Event API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.
apiNameoptionalstringapi_nameoptionalstrapiNameoptionalStringApiNameoptionalstringApiNameoptional*string #the name of the Event API.
Default: not needed to import API
authProviderTypesoptionalAppSyncAuthorizationType[]auth_provider_typesoptionaltyping.List[AppSyncAuthorizationType]authProviderTypesoptionalList<AppSyncAuthorizationType>AuthProviderTypesoptionalAppSyncAuthorizationType[]AuthProviderTypesoptional*[]AppSyncAuthorizationType #The Authorization Types for this Event Api.
Default: none, required to construct event rules from imported APIs
the domain name of the Api's HTTP endpoint.
the domain name of the Api's real-time endpoint.