Class EventApi
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.appsync.ApiBase
software.amazon.awscdk.services.appsync.EventApiBase
software.amazon.awscdk.services.appsync.EventApi
- All Implemented Interfaces:
IEnvironmentAware,IResource,IApi,IEventApi,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:05.152Z")
@Stability(Stable)
public class EventApi
extends EventApiBase
An AppSync Event API.
Example:
import software.amazon.awscdk.services.lambda.*;
Function handler;
AppSyncAuthProvider iamProvider = AppSyncAuthProvider.builder()
.authorizationType(AppSyncAuthorizationType.IAM)
.build();
AppSyncAuthProvider apiKeyProvider = AppSyncAuthProvider.builder()
.authorizationType(AppSyncAuthorizationType.API_KEY)
.build();
/* API with IAM and API Key providers.
* Connection, default publish and default subscribe
* can be done with either IAM and API Key.
*/
EventApi api = EventApi.Builder.create(this, "api")
.apiName("api")
.authorizationConfig(EventApiAuthConfig.builder()
// set auth providers
.authProviders(List.of(iamProvider, apiKeyProvider))
.build())
.build();
api.addChannelNamespace("default");
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.appsync.IApi
IApi.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.appsync.IEventApi
IEventApi.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEventApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedEventApi(software.amazon.jsii.JsiiObjectRef objRef) EventApi(software.constructs.Construct scope, String id, EventApiProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IEventApifromEventApiAttributes(software.constructs.Construct scope, String id, EventApiAttributes attrs) Import a Event API through this function.the ARN of the API.getApiId()an unique AWS AppSync Event API identifier i.e.The configured API keys, if present.The AppSyncDomainName of the associated custom domain.The Authorization Types for this Event Api.The connection auth modes for this Event Api.The HTTP Endpoint of the associated custom domain.The Realtime Endpoint of the associated custom domain.The default publish auth modes for this Event Api.The default subscribe auth modes for this Event Api.the domain name of the Api's HTTP endpoint.the CloudWatch Log Group for this API.the domain name of the Api's real-time endpoint.Methods inherited from class software.amazon.awscdk.services.appsync.EventApiBase
addChannelNamespace, addChannelNamespace, addDynamoDbDataSource, addDynamoDbDataSource, addEventBridgeDataSource, addEventBridgeDataSource, addHttpDataSource, addHttpDataSource, addLambdaDataSource, addLambdaDataSource, addOpenSearchDataSource, addOpenSearchDataSource, addRdsDataSource, addRdsDataSource, addRdsDataSource, grant, grantConnect, grantPublish, grantPublishAndSubscribe, grantSubscribeMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
EventApi
protected EventApi(software.amazon.jsii.JsiiObjectRef objRef) -
EventApi
protected EventApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
EventApi
@Stability(Stable) public EventApi(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EventApiProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromEventApiAttributes
@Stability(Stable) @NotNull public static IEventApi fromEventApiAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EventApiAttributes attrs) Import a Event API through this function.- Parameters:
scope- scope. This parameter is required.id- id. This parameter is required.attrs- Event API Attributes of an API. This parameter is required.
-
getApiArn
the ARN of the API. -
getApiId
an unique AWS AppSync Event API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'. -
getApiKeys
The configured API keys, if present.The key of this object is an apiKey name (apiKeyConfig.name) if specified,
Defaultotherwise.Default: - no api key
-
getAppSyncDomainName
The AppSyncDomainName of the associated custom domain. -
getAuthProviderTypes
The Authorization Types for this Event Api.- Specified by:
getAuthProviderTypesin interfaceIEventApi- Specified by:
getAuthProviderTypesin classEventApiBase
-
getConnectionModeTypes
The connection auth modes for this Event Api. -
getCustomHttpEndpoint
The HTTP Endpoint of the associated custom domain. -
getCustomRealtimeEndpoint
The Realtime Endpoint of the associated custom domain. -
getDefaultPublishModeTypes
The default publish auth modes for this Event Api. -
getDefaultSubscribeModeTypes
The default subscribe auth modes for this Event Api. -
getHttpDns
the domain name of the Api's HTTP endpoint.- Specified by:
getHttpDnsin interfaceIEventApi- Specified by:
getHttpDnsin classEventApiBase
-
getLogGroup
the CloudWatch Log Group for this API. -
getRealtimeDns
the domain name of the Api's real-time endpoint.- Specified by:
getRealtimeDnsin interfaceIEventApi- Specified by:
getRealtimeDnsin classEventApiBase
-