Class ChannelNamespaceOptions
Option configuration for channel namespace.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ChannelNamespaceOptions : IChannelNamespaceOptions
Syntax (vb)
Public Class ChannelNamespaceOptions Implements IChannelNamespaceOptions
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
| ChannelNamespaceOptions() | Option configuration for channel namespace. |
Properties
| AuthorizationConfig | Authorization config for channel namespace. |
| ChannelNamespaceName | The Channel Namespace name. |
| Code | The Event Handler code. |
| PublishHandlerConfig | onPublish handler config. |
| SubscribeHandlerConfig | onSubscribe handler config. |
Constructors
ChannelNamespaceOptions()
Option configuration for channel namespace.
public ChannelNamespaceOptions()
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
AuthorizationConfig
Authorization config for channel namespace.
public INamespaceAuthConfig? AuthorizationConfig { get; set; }
Property Value
Remarks
Default: - defaults to Event API default auth config
ChannelNamespaceName
The Channel Namespace name.
public string? ChannelNamespaceName { get; set; }
Property Value
Remarks
Default: - the construct's id will be used
Code
The Event Handler code.
public Code? Code { get; set; }
Property Value
Remarks
Default: - no code is used
PublishHandlerConfig
onPublish handler config.
public IHandlerConfig? PublishHandlerConfig { get; set; }
Property Value
Remarks
Default: - no handler config
SubscribeHandlerConfig
onSubscribe handler config.
public IHandlerConfig? SubscribeHandlerConfig { get; set; }
Property Value
Remarks
Default: - no handler config