interface SubscriptionProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Greengrass.CfnSubscriptionDefinition.SubscriptionProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsgreengrass#CfnSubscriptionDefinition_SubscriptionProperty |
Java | software.amazon.awscdk.services.greengrass.CfnSubscriptionDefinition.SubscriptionProperty |
Python | aws_cdk.aws_greengrass.CfnSubscriptionDefinition.SubscriptionProperty |
TypeScript | aws-cdk-lib » aws_greengrass » 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.
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.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_greengrass as greengrass } from 'aws-cdk-lib';
const subscriptionProperty: greengrass.CfnSubscriptionDefinition.SubscriptionProperty = {
id: 'id',
source: 'source',
subject: 'subject',
target: 'target',
};
Properties
Name | Type | Description |
---|---|---|
id | string | A descriptive or arbitrary ID for the subscription. |
source | string | The originator of the message. |
subject | string | The MQTT topic used to route the message. |
target | string | The destination of the message. |
id
Type:
string
A descriptive or arbitrary ID for the subscription.
This value must be unique within the subscription definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+
.
source
Type:
string
The originator of the message.
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
Type:
string
The MQTT topic used to route the message.
target
Type:
string
The destination of the message.
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
.