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.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Greengrass
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnSubscriptionDefinition.SubscriptionProperty : CfnSubscriptionDefinition.ISubscriptionProperty
Syntax (vb)
Public Class CfnSubscriptionDefinition.SubscriptionProperty 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() | 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. |
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()
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.
public SubscriptionProperty()
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"
};
Properties
Id
A descriptive or arbitrary ID for the subscription.
public string Id { get; set; }
Property Value
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
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
Remarks
Target
The destination of the message.
public string Target { get; set; }
Property Value
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
.