Show / Hide Table of Contents

Class EventApi

An AppSync Event API.

Inheritance
object
Resource
ApiBase
EventApiBase
EventApi
Implements
IEventApi
IApi
IResource
IConstruct
IDependable
Inherited Members
EventApiBase.AddChannelNamespace(string, IChannelNamespaceOptions)
EventApiBase.AddDynamoDbDataSource(string, ITable, IAppSyncDataSourceOptions)
EventApiBase.AddEventBridgeDataSource(string, IEventBus, IAppSyncDataSourceOptions)
EventApiBase.AddHttpDataSource(string, string, IAppSyncHttpDataSourceOptions)
EventApiBase.AddLambdaDataSource(string, IFunction, IAppSyncDataSourceOptions)
EventApiBase.AddOpenSearchDataSource(string, IDomain, IAppSyncDataSourceOptions)
EventApiBase.AddRdsDataSource(string, object, ISecret, string, IAppSyncDataSourceOptions)
EventApiBase.Grant(IGrantable, AppSyncEventResource, params string[])
EventApiBase.GrantConnect(IGrantable)
EventApiBase.GrantPublish(IGrantable)
EventApiBase.GrantPublishAndSubscribe(IGrantable)
EventApiBase.GrantSubscribe(IGrantable)
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EventApi : EventApiBase, IEventApi, IApi, IResource, IConstruct, IDependable
Syntax (vb)
Public Class EventApi Inherits EventApiBase Implements IEventApi, IApi, IResource, IConstruct, IDependable
Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Lambda;
             Function handler;


             var iamProvider = new AppSyncAuthProvider {
                 AuthorizationType = AppSyncAuthorizationType.IAM
             };

             var apiKeyProvider = new AppSyncAuthProvider {
                 AuthorizationType = AppSyncAuthorizationType.API_KEY
             };

             /* API with IAM and API Key providers.
              * Connection, default publish and default subscribe
              * can be done with either IAM and API Key.
              */
             var api = new EventApi(this, "api", new EventApiProps {
                 ApiName = "api",
                 AuthorizationConfig = new EventApiAuthConfig {
                     // set auth providers
                     AuthProviders = new [] { iamProvider, apiKeyProvider }
                 }
             });

             api.AddChannelNamespace("default");

Synopsis

Constructors

EventApi(Construct, string, IEventApiProps)

An AppSync Event API.

Properties

ApiArn

the ARN of the API.

ApiId

an unique AWS AppSync Event API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.

ApiKeys

The configured API keys, if present.

AppSyncDomainName

The AppSyncDomainName of the associated custom domain.

AuthProviderTypes

The Authorization Types for this Event Api.

ConnectionModeTypes

The connection auth modes for this Event Api.

CustomHttpEndpoint

The HTTP Endpoint of the associated custom domain.

CustomRealtimeEndpoint

The Realtime Endpoint of the associated custom domain.

DefaultPublishModeTypes

The default publish auth modes for this Event Api.

DefaultSubscribeModeTypes

The default subscribe auth modes for this Event Api.

HttpDns

the domain name of the Api's HTTP endpoint.

LogGroup

the CloudWatch Log Group for this API.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

RealtimeDns

the domain name of the Api's real-time endpoint.

Methods

FromEventApiAttributes(Construct, string, IEventApiAttributes)

Import a Event API through this function.

Constructors

EventApi(Construct, string, IEventApiProps)

An AppSync Event API.

public EventApi(Construct scope, string id, IEventApiProps props)
Parameters
scope Construct
id string
props IEventApiProps
Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Lambda;
             Function handler;


             var iamProvider = new AppSyncAuthProvider {
                 AuthorizationType = AppSyncAuthorizationType.IAM
             };

             var apiKeyProvider = new AppSyncAuthProvider {
                 AuthorizationType = AppSyncAuthorizationType.API_KEY
             };

             /* API with IAM and API Key providers.
              * Connection, default publish and default subscribe
              * can be done with either IAM and API Key.
              */
             var api = new EventApi(this, "api", new EventApiProps {
                 ApiName = "api",
                 AuthorizationConfig = new EventApiAuthConfig {
                     // set auth providers
                     AuthProviders = new [] { iamProvider, apiKeyProvider }
                 }
             });

             api.AddChannelNamespace("default");

Properties

ApiArn

the ARN of the API.

public override string ApiArn { get; }
Property Value

string

Overrides
ApiBase.ApiArn
Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

ApiId

an unique AWS AppSync Event API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.

public override string ApiId { get; }
Property Value

string

Overrides
ApiBase.ApiId
Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

ApiKeys

The configured API keys, if present.

public virtual IDictionary<string, CfnApiKey> ApiKeys { get; }
Property Value

IDictionary<string, CfnApiKey>

Remarks

The key of this object is an apiKey name (apiKeyConfig.name) if specified, Default otherwise.

Default: - no api key

Attribute: ApiKeys

AppSyncDomainName

The AppSyncDomainName of the associated custom domain.

public virtual string AppSyncDomainName { get; }
Property Value

string

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

AuthProviderTypes

The Authorization Types for this Event Api.

public override AppSyncAuthorizationType[] AuthProviderTypes { get; }
Property Value

AppSyncAuthorizationType[]

Overrides
EventApiBase.AuthProviderTypes
Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

ConnectionModeTypes

The connection auth modes for this Event Api.

public virtual AppSyncAuthorizationType[] ConnectionModeTypes { get; }
Property Value

AppSyncAuthorizationType[]

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

CustomHttpEndpoint

The HTTP Endpoint of the associated custom domain.

public virtual string CustomHttpEndpoint { get; }
Property Value

string

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

CustomRealtimeEndpoint

The Realtime Endpoint of the associated custom domain.

public virtual string CustomRealtimeEndpoint { get; }
Property Value

string

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

DefaultPublishModeTypes

The default publish auth modes for this Event Api.

public virtual AppSyncAuthorizationType[] DefaultPublishModeTypes { get; }
Property Value

AppSyncAuthorizationType[]

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

DefaultSubscribeModeTypes

The default subscribe auth modes for this Event Api.

public virtual AppSyncAuthorizationType[] DefaultSubscribeModeTypes { get; }
Property Value

AppSyncAuthorizationType[]

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

HttpDns

the domain name of the Api's HTTP endpoint.

public override string HttpDns { get; }
Property Value

string

Overrides
EventApiBase.HttpDns
Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

LogGroup

the CloudWatch Log Group for this API.

public virtual ILogGroup LogGroup { get; }
Property Value

ILogGroup

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

RealtimeDns

the domain name of the Api's real-time endpoint.

public override string RealtimeDns { get; }
Property Value

string

Overrides
EventApiBase.RealtimeDns
Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

Methods

FromEventApiAttributes(Construct, string, IEventApiAttributes)

Import a Event API through this function.

public static IEventApi FromEventApiAttributes(Construct scope, string id, IEventApiAttributes attrs)
Parameters
scope Construct

scope.

id string

id.

attrs IEventApiAttributes

Event API Attributes of an API.

Returns

IEventApi

Remarks

Resource: AWS::AppSync::Api

ExampleMetadata: infused

Implements

IEventApi
IApi
IResource
Constructs.IConstruct
Constructs.IDependable
Back to top Generated by DocFX