Class EventApiBase
Base Class for Event API.
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class EventApiBase : ApiBase, IEventApi, IApi, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public MustInherit Class EventApiBase Inherits ApiBase Implements IEventApi, IApi, IResource, IConstruct, IDependable, IEnvironmentAware
Synopsis
Constructors
| EventApiBase(Construct, string, IResourceProps?) | Base Class for Event API. |
Properties
| AuthProviderTypes | The Authorization Types for this Event Api. |
| HttpDns | The domain name of the Api's HTTP endpoint. |
| RealtimeDns | The domain name of the Api's real-time endpoint. |
Methods
| AddChannelNamespace(string, IChannelNamespaceOptions?) | add a new Channel Namespace to this API. |
| AddDynamoDbDataSource(string, ITable, IAppSyncDataSourceOptions?) | add a new DynamoDB data source to this API. |
| AddEventBridgeDataSource(string, IEventBus, IAppSyncDataSourceOptions?) | Add an EventBridge data source to this api. |
| AddHttpDataSource(string, string, IAppSyncHttpDataSourceOptions?) | add a new http data source to this API. |
| AddLambdaDataSource(string, IFunction, IAppSyncDataSourceOptions?) | add a new Lambda data source to this API. |
| AddOpenSearchDataSource(string, IDomain, IAppSyncDataSourceOptions?) | add a new OpenSearch data source to this API. |
| AddRdsDataSource(string, object, ISecret, string?, IAppSyncDataSourceOptions?) | add a new Rds data source to this API. |
| Grant(IGrantable, AppSyncEventResource, params string[]) | Adds an IAM policy statement associated with this Event API to an IAM principal's policy. |
| GrantConnect(IGrantable) | Adds an IAM policy statement for EventConnect access to this EventApi to an IAM principal's policy. |
| GrantPublish(IGrantable) | Adds an IAM policy statement for EventPublish access to this EventApi to an IAM principal's policy. |
| GrantPublishAndSubscribe(IGrantable) | Adds an IAM policy statement to publish and subscribe to this API for an IAM principal's policy. |
| GrantSubscribe(IGrantable) | Adds an IAM policy statement for EventSubscribe access to this EventApi to an IAM principal's policy. |
Constructors
EventApiBase(Construct, string, IResourceProps?)
Base Class for Event API.
protected EventApiBase(Construct scope, string id, IResourceProps? props = null)
Parameters
- scope Construct
- id string
- props IResourceProps
Properties
AuthProviderTypes
The Authorization Types for this Event Api.
public abstract AppSyncAuthorizationType[] AuthProviderTypes { get; }
Property Value
HttpDns
The domain name of the Api's HTTP endpoint.
public abstract string HttpDns { get; }
Property Value
RealtimeDns
The domain name of the Api's real-time endpoint.
public abstract string RealtimeDns { get; }
Property Value
Methods
AddChannelNamespace(string, IChannelNamespaceOptions?)
add a new Channel Namespace to this API.
public virtual ChannelNamespace AddChannelNamespace(string id, IChannelNamespaceOptions? options = null)
Parameters
- id string
- options IChannelNamespaceOptions
Returns
AddDynamoDbDataSource(string, ITable, IAppSyncDataSourceOptions?)
add a new DynamoDB data source to this API.
public virtual AppSyncDynamoDbDataSource AddDynamoDbDataSource(string id, ITable table, IAppSyncDataSourceOptions? options = null)
Parameters
- id string
The data source's id.
- table ITable
The DynamoDB table backing this data source.
- options IAppSyncDataSourceOptions
The optional configuration for this data source.
Returns
AddEventBridgeDataSource(string, IEventBus, IAppSyncDataSourceOptions?)
Add an EventBridge data source to this api.
public virtual AppSyncEventBridgeDataSource AddEventBridgeDataSource(string id, IEventBus eventBus, IAppSyncDataSourceOptions? options = null)
Parameters
- id string
The data source's id.
- eventBus IEventBus
The EventBridge EventBus on which to put events.
- options IAppSyncDataSourceOptions
The optional configuration for this data source.
Returns
AddHttpDataSource(string, string, IAppSyncHttpDataSourceOptions?)
add a new http data source to this API.
public virtual AppSyncHttpDataSource AddHttpDataSource(string id, string endpoint, IAppSyncHttpDataSourceOptions? options = null)
Parameters
- id string
The data source's id.
- endpoint string
The http endpoint.
- options IAppSyncHttpDataSourceOptions
The optional configuration for this data source.
Returns
AddLambdaDataSource(string, IFunction, IAppSyncDataSourceOptions?)
add a new Lambda data source to this API.
public virtual AppSyncLambdaDataSource AddLambdaDataSource(string id, IFunction lambdaFunction, IAppSyncDataSourceOptions? options = null)
Parameters
- id string
The data source's id.
- lambdaFunction IFunction
The Lambda function to call to interact with this data source.
- options IAppSyncDataSourceOptions
The optional configuration for this data source.
Returns
AddOpenSearchDataSource(string, IDomain, IAppSyncDataSourceOptions?)
add a new OpenSearch data source to this API.
public virtual AppSyncOpenSearchDataSource AddOpenSearchDataSource(string id, IDomain domain, IAppSyncDataSourceOptions? options = null)
Parameters
- id string
The data source's id.
- domain IDomain
The OpenSearch domain for this data source.
- options IAppSyncDataSourceOptions
The optional configuration for this data source.
Returns
AddRdsDataSource(string, object, ISecret, string?, IAppSyncDataSourceOptions?)
add a new Rds data source to this API.
public virtual AppSyncRdsDataSource AddRdsDataSource(string id, object serverlessCluster, ISecret secretStore, string? databaseName = null, IAppSyncDataSourceOptions? options = null)
Parameters
- id string
The data source's id.
- serverlessCluster object
The database cluster to interact with this data source.. Type union: either IDatabaseCluster or IServerlessCluster
- secretStore ISecret
The secret store that contains the username and password for the database cluster.
- databaseName string
The optional name of the database to use within the cluster.
- options IAppSyncDataSourceOptions
The optional configuration for this data source.
Returns
Grant(IGrantable, AppSyncEventResource, params string[])
Adds an IAM policy statement associated with this Event API to an IAM principal's policy.
public virtual Grant Grant(IGrantable grantee, AppSyncEventResource resources, params string[] actions)
Parameters
- grantee IGrantable
The principal.
- resources AppSyncEventResource
The set of resources to allow (i.e. ...:[region]:[accountId]:apis/EventApiId/...).
- actions string[]
The actions that should be granted to the principal (i.e. appsync:EventPublish ).
Returns
GrantConnect(IGrantable)
Adds an IAM policy statement for EventConnect access to this EventApi to an IAM principal's policy.
public virtual Grant GrantConnect(IGrantable grantee)
Parameters
- grantee IGrantable
The principal.
Returns
GrantPublish(IGrantable)
Adds an IAM policy statement for EventPublish access to this EventApi to an IAM principal's policy.
public virtual Grant GrantPublish(IGrantable grantee)
Parameters
- grantee IGrantable
The principal.
Returns
Remarks
This grants publish permission for all channels within the API.
GrantPublishAndSubscribe(IGrantable)
Adds an IAM policy statement to publish and subscribe to this API for an IAM principal's policy.
public virtual Grant GrantPublishAndSubscribe(IGrantable grantee)
Parameters
- grantee IGrantable
The principal.
Returns
Remarks
This grants publish & subscribe permission for all channels within the API.
GrantSubscribe(IGrantable)
Adds an IAM policy statement for EventSubscribe access to this EventApi to an IAM principal's policy.
public virtual Grant GrantSubscribe(IGrantable grantee)
Parameters
- grantee IGrantable
The principal.
Returns
Remarks
This grants subscribe permission for all channels within the API.