Class HandlerConfig
Handler configuration construct for onPublish and onSubscribe.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HandlerConfig : IHandlerConfig
Syntax (vb)
Public Class HandlerConfig Implements IHandlerConfig
Remarks
ExampleMetadata: infused
Examples
EventApi api;
AppSyncDynamoDbDataSource ddbDataSource;
AppSyncEventBridgeDataSource ebDataSource;
// DynamoDB data source for publish handler
api.AddChannelNamespace("ddb-eb-ns", new ChannelNamespaceOptions {
Code = Code.FromInline("/* event handler code here.*/"),
PublishHandlerConfig = new HandlerConfig {
DataSource = ddbDataSource
},
SubscribeHandlerConfig = new HandlerConfig {
DataSource = ebDataSource
}
});
Synopsis
Constructors
HandlerConfig() | Handler configuration construct for onPublish and onSubscribe. |
Properties
DataSource | The Event Handler data source. |
Direct | If the Event Handler should invoke the data source directly. |
LambdaInvokeType | The Lambda invocation type for direct integrations. |
Constructors
HandlerConfig()
Handler configuration construct for onPublish and onSubscribe.
public HandlerConfig()
Remarks
ExampleMetadata: infused
Examples
EventApi api;
AppSyncDynamoDbDataSource ddbDataSource;
AppSyncEventBridgeDataSource ebDataSource;
// DynamoDB data source for publish handler
api.AddChannelNamespace("ddb-eb-ns", new ChannelNamespaceOptions {
Code = Code.FromInline("/* event handler code here.*/"),
PublishHandlerConfig = new HandlerConfig {
DataSource = ddbDataSource
},
SubscribeHandlerConfig = new HandlerConfig {
DataSource = ebDataSource
}
});
Properties
DataSource
The Event Handler data source.
public AppSyncBackedDataSource? DataSource { get; set; }
Property Value
Remarks
Default: - no data source is used
Direct
If the Event Handler should invoke the data source directly.
public bool? Direct { get; set; }
Property Value
bool?
Remarks
Default: - false
LambdaInvokeType
The Lambda invocation type for direct integrations.
public LambdaInvokeType? LambdaInvokeType { get; set; }
Property Value
Remarks
Default: - LambdaInvokeType.REQUEST_RESPONSE