Class EventApi
An AppSync Event API.
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EventApi : EventApiBase, IEventApi, IApi, IResource
Syntax (vb)
Public Class EventApi
Inherits EventApiBase
Implements IEventApi, IApi, IResource
Remarks
Resource: AWS::AppSync::Api
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Logs;
var apiKeyProvider = new AppSyncAuthProvider {
AuthorizationType = AppSyncAuthorizationType.API_KEY
};
var api = new EventApi(this, "api", new EventApiProps {
ApiName = "Api",
OwnerContact = "OwnerContact",
AuthorizationConfig = new EventApiAuthConfig {
AuthProviders = new [] { apiKeyProvider },
ConnectionAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
DefaultPublishAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
DefaultSubscribeAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY }
},
LogConfig = new AppSyncLogConfig {
FieldLogLevel = AppSyncFieldLogLevel.INFO,
Retention = RetentionDays.ONE_WEEK
}
});
api.AddChannelNamespace("default");
Synopsis
Constructors
Event |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Event |
Used by jsii to construct an instance of this class from DeputyProps |
Event |
Properties
Api |
the ARN of the API. |
Api |
an unique AWS AppSync Event API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'. |
Api |
The configured API keys, if present. |
App |
The AppSyncDomainName of the associated custom domain. |
Auth |
The Authorization Types for this Event Api. |
Connection |
The connection auth modes for this Event Api. |
Custom |
The HTTP Endpoint of the associated custom domain. |
Custom |
The Realtime Endpoint of the associated custom domain. |
Default |
The default publish auth modes for this Event Api. |
Default |
The default subscribe auth modes for this Event Api. |
Http |
the domain name of the Api's HTTP endpoint. |
Log |
the CloudWatch Log Group for this API. |
Realtime |
the domain name of the Api's real-time endpoint. |
Methods
From |
Import a Event API through this function. |
Constructors
EventApi(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected EventApi(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
EventApi(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected EventApi(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
EventApi(Construct, String, IEventApiProps)
public EventApi(Construct scope, string id, IEventApiProps props)
Parameters
- scope Constructs.
Construct - id System.
String - props IEvent
Api Props
Properties
ApiArn
the ARN of the API.
public override string ApiArn { get; }
Property Value
System.
Overrides
ApiId
an unique AWS AppSync Event API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.
public override string ApiId { get; }
Property Value
System.
Overrides
ApiKeys
The configured API keys, if present.
public virtual IDictionary<string, CfnApiKey> ApiKeys { get; }
Property Value
System.
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
System.
AuthProviderTypes
The Authorization Types for this Event Api.
public override AppSyncAuthorizationType[] AuthProviderTypes { get; }
Property Value
Overrides
ConnectionModeTypes
The connection auth modes for this Event Api.
public virtual AppSyncAuthorizationType[] ConnectionModeTypes { get; }
Property Value
CustomHttpEndpoint
The HTTP Endpoint of the associated custom domain.
public virtual string CustomHttpEndpoint { get; }
Property Value
System.
CustomRealtimeEndpoint
The Realtime Endpoint of the associated custom domain.
public virtual string CustomRealtimeEndpoint { get; }
Property Value
System.
DefaultPublishModeTypes
The default publish auth modes for this Event Api.
public virtual AppSyncAuthorizationType[] DefaultPublishModeTypes { get; }
Property Value
DefaultSubscribeModeTypes
The default subscribe auth modes for this Event Api.
public virtual AppSyncAuthorizationType[] DefaultSubscribeModeTypes { get; }
Property Value
HttpDns
the domain name of the Api's HTTP endpoint.
public override string HttpDns { get; }
Property Value
System.
Overrides
LogGroup
the CloudWatch Log Group for this API.
public virtual ILogGroup LogGroup { get; }
Property Value
RealtimeDns
the domain name of the Api's real-time endpoint.
public override string RealtimeDns { get; }
Property Value
System.
Overrides
Methods
FromEventApiAttributes(Construct, String, IEventApiAttributes)
Import a Event API through this function.
public static IEventApi FromEventApiAttributes(Construct scope, string id, IEventApiAttributes attrs)
Parameters
- scope Constructs.
Construct scope.
- id System.
String id.
- attrs IEvent
Api Attributes Event API Attributes of an API.
Returns