Class CfnSubscriptionDefinition.SubscriptionProperty
Subscriptions define how MQTT messages can be exchanged between devices, functions, and connectors in the group, and with AWS IoT or the local shadow service.
Inheritance
Namespace: Amazon.CDK.AWS.Greengrass
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SubscriptionProperty : Object, CfnSubscriptionDefinition.ISubscriptionProperty
Syntax (vb)
Public Class SubscriptionProperty
Inherits Object
Implements CfnSubscriptionDefinition.ISubscriptionProperty
Remarks
A subscription defines a message source, message target, and a topic (or subject) that's used to route messages from the source to the target. A subscription defines the message flow in one direction, from the source to the target. For two-way communication, you must set up two subscriptions, one for each direction.
In an AWS CloudFormation template, the Subscriptions
property of the SubscriptionDefinitionVersion
property type contains a list of Subscription
property types.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Greengrass;
var subscriptionProperty = new SubscriptionProperty {
Id = "id",
Source = "source",
Subject = "subject",
Target = "target"
};
Synopsis
Constructors
SubscriptionProperty() |
Properties
Id | A descriptive or arbitrary ID for the subscription. |
Source | The originator of the message. |
Subject | The MQTT topic used to route the message. |
Target | The destination of the message. |
Constructors
SubscriptionProperty()
public SubscriptionProperty()
Properties
Id
A descriptive or arbitrary ID for the subscription.
public string Id { get; set; }
Property Value
System.String
Remarks
This value must be unique within the subscription definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+
.
Source
The originator of the message.
public string Source { get; set; }
Property Value
System.String
Remarks
The value can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, cloud
(which represents the AWS IoT cloud), or GGShadowService
.
Subject
The MQTT topic used to route the message.
public string Subject { get; set; }
Property Value
System.String
Remarks
Target
The destination of the message.
public string Target { get; set; }
Property Value
System.String
Remarks
The value can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, cloud
(which represents the AWS IoT cloud), or GGShadowService
.