Class ChannelNamespace
A Channel Namespace.
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ChannelNamespace : Resource, IChannelNamespace, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class ChannelNamespace Inherits Resource Implements IChannelNamespace, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
ExampleMetadata: infused
Examples
EventApi api;
new ChannelNamespace(this, "Namespace", new ChannelNamespaceProps {
Api = api,
AuthorizationConfig = new NamespaceAuthConfig {
// Override publishing authorization to API Key
PublishAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
// Override subscribing authorization to Lambda
SubscribeAuthModeTypes = new [] { AppSyncAuthorizationType.LAMBDA }
}
});
Synopsis
Constructors
| ChannelNamespace(Construct, string, IChannelNamespaceProps) | A Channel Namespace. |
Properties
| ChannelNamespaceArn | the ARN of the channel namespace. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
| FromChannelNamespaceArn(Construct, string, string) | Use an existing channel namespace by ARN. |
| GrantPublish(IGrantable) | Adds an IAM policy statement for EventPublish access to this channel namespace to an IAM principal's policy. |
| GrantPublishAndSubscribe(IGrantable) | Adds an IAM policy statement for EventPublish and EventSubscribe access to this channel namespace to an IAM principal's policy. |
| GrantSubscribe(IGrantable) | Adds an IAM policy statement for EventSubscribe access to this channel namespace to an IAM principal's policy. |
Constructors
ChannelNamespace(Construct, string, IChannelNamespaceProps)
A Channel Namespace.
public ChannelNamespace(Construct scope, string id, IChannelNamespaceProps props)
Parameters
- scope Construct
- id string
- props IChannelNamespaceProps
Remarks
ExampleMetadata: infused
Examples
EventApi api;
new ChannelNamespace(this, "Namespace", new ChannelNamespaceProps {
Api = api,
AuthorizationConfig = new NamespaceAuthConfig {
// Override publishing authorization to API Key
PublishAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
// Override subscribing authorization to Lambda
SubscribeAuthModeTypes = new [] { AppSyncAuthorizationType.LAMBDA }
}
});
Properties
ChannelNamespaceArn
the ARN of the channel namespace.
public virtual string ChannelNamespaceArn { get; }
Property Value
Remarks
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
FromChannelNamespaceArn(Construct, string, string)
Use an existing channel namespace by ARN.
public static IChannelNamespace FromChannelNamespaceArn(Construct scope, string id, string channelNamespaceArn)
Parameters
Returns
Remarks
ExampleMetadata: infused
GrantPublish(IGrantable)
Adds an IAM policy statement for EventPublish access to this channel namespace to an IAM principal's policy.
public virtual Grant GrantPublish(IGrantable grantee)
Parameters
- grantee IGrantable
The principal.
Returns
Remarks
ExampleMetadata: infused
GrantPublishAndSubscribe(IGrantable)
Adds an IAM policy statement for EventPublish and EventSubscribe access to this channel namespace to an IAM principal's policy.
public virtual Grant GrantPublishAndSubscribe(IGrantable grantee)
Parameters
- grantee IGrantable
The principal.
Returns
Remarks
ExampleMetadata: infused
GrantSubscribe(IGrantable)
Adds an IAM policy statement for EventSubscribe access to this channel namespace to an IAM principal's policy.
public virtual Grant GrantSubscribe(IGrantable grantee)
Parameters
- grantee IGrantable
The principal.
Returns
Remarks
ExampleMetadata: infused