class EventApiBase
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppSync.EventApiBase |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#EventApiBase |
![]() | software.amazon.awscdk.services.appsync.EventApiBase |
![]() | aws_cdk.aws_appsync.EventApiBase |
![]() | aws-cdk-lib » aws_appsync » EventApiBase |
Implements
IConstruct
, IDependable
, IResource
, IApi
, IEvent
Extends
Api
Implemented by
Event
Base Class for Event API.
Initializer
new EventApiBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct
- id
string
- props
Resource
Props
Properties
Name | Type | Description |
---|---|---|
api | string | The ARN of the AWS AppSync Api. |
api | string | The unique identifier for the AWS AppSync Api generated by the service. |
auth | App [] | The Authorization Types for this Event Api. |
env | Resource | The environment this resource belongs to. |
http | string | The domain name of the Api's HTTP endpoint. |
node | Node | The tree node. |
realtime | string | The domain name of the Api's real-time endpoint. |
stack | Stack | The stack in which this resource is defined. |
apiArn
Type:
string
The ARN of the AWS AppSync Api.
apiId
Type:
string
The unique identifier for the AWS AppSync Api generated by the service.
authProviderTypes
Type:
App
[]
The Authorization Types for this Event Api.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
httpDns
Type:
string
The domain name of the Api's HTTP endpoint.
node
Type:
Node
The tree node.
realtimeDns
Type:
string
The domain name of the Api's real-time endpoint.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
add | add a new Channel Namespace to this API. |
apply | Apply the given removal policy to this resource. |
grant(grantee, resources, ...actions) | Adds an IAM policy statement associated with this Event API to an IAM principal's policy. |
grant | Adds an IAM policy statement for EventConnect access to this EventApi to an IAM principal's policy. |
grant | Adds an IAM policy statement for EventPublish access to this EventApi to an IAM principal's policy. |
grant | Adds an IAM policy statement to publish and subscribe to this API for an IAM principal's policy. |
grant | Adds an IAM policy statement for EventSubscribe access to this EventApi to an IAM principal's policy. |
to | Returns a string representation of this construct. |
addChannelNamespace(id, options?)
public addChannelNamespace(id: string, options?: ChannelNamespaceOptions): ChannelNamespace
Parameters
- id
string
- options
Channel
Namespace Options
Returns
add a new Channel Namespace to this API.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
grant(grantee, resources, ...actions)
public grant(grantee: IGrantable, resources: AppSyncEventResource, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
— The principal. - resources
App
— The set of resources to allow (i.e. ...:[region]:[accountId]:apis/EventApiId/...).Sync Event Resource - actions
string
— The actions that should be granted to the principal (i.e. appsync:EventPublish ).
Returns
Adds an IAM policy statement associated with this Event API to an IAM principal's policy.
grantConnect(grantee)
public grantConnect(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
— The principal.
Returns
Adds an IAM policy statement for EventConnect access to this EventApi to an IAM principal's policy.
grantPublish(grantee)
public grantPublish(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
— The principal.
Returns
Adds an IAM policy statement for EventPublish access to this EventApi to an IAM principal's policy.
This grants publish permission for all channels within the API.
grantPublishAndSubscribe(grantee)
public grantPublishAndSubscribe(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
— The principal.
Returns
Adds an IAM policy statement to publish and subscribe to this API for an IAM principal's policy.
This grants publish & subscribe permission for all channels within the API.
grantSubscribe(grantee)
public grantSubscribe(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
— The principal.
Returns
Adds an IAM policy statement for EventSubscribe access to this EventApi to an IAM principal's policy.
This grants subscribe permission for all channels within the API.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.