Class: AWSCDK::Greengrass::CfnSubscriptionDefinitionVersion::SubscriptionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrass::CfnSubscriptionDefinitionVersion::SubscriptionProperty
- Defined in:
- greengrass/cfn_subscription_definition_version.rb
Overview
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 CloudFormation template, the Subscriptions property of the AWS::Greengrass::SubscriptionDefinitionVersion resource contains a list of Subscription property types.
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
A descriptive or arbitrary ID for the subscription.
-
#source ⇒ String
readonly
The originator of the message.
-
#subject ⇒ String
readonly
The MQTT topic used to route the message.
-
#target ⇒ String
readonly
The destination of the message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, source:, subject:, target:) ⇒ SubscriptionProperty
constructor
A new instance of SubscriptionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(id:, source:, subject:, target:) ⇒ SubscriptionProperty
Returns a new instance of SubscriptionProperty.
524 525 526 527 528 529 530 531 532 533 |
# File 'greengrass/cfn_subscription_definition_version.rb', line 524 def initialize(id:, source:, subject:, target:) @id = id Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") @source = source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source") @subject = subject Jsii::Type.check_type(@subject, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subject") @target = target Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "target") end |
Instance Attribute Details
#id ⇒ String (readonly)
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:_-]+ .
541 542 543 |
# File 'greengrass/cfn_subscription_definition_version.rb', line 541 def id @id end |
#source ⇒ String (readonly)
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 .
548 549 550 |
# File 'greengrass/cfn_subscription_definition_version.rb', line 548 def source @source end |
#subject ⇒ String (readonly)
The MQTT topic used to route the message.
553 554 555 |
# File 'greengrass/cfn_subscription_definition_version.rb', line 553 def subject @subject end |
#target ⇒ String (readonly)
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 .
560 561 562 |
# File 'greengrass/cfn_subscription_definition_version.rb', line 560 def target @target end |
Class Method Details
.jsii_properties ⇒ Object
562 563 564 565 566 567 568 569 |
# File 'greengrass/cfn_subscription_definition_version.rb', line 562 def self.jsii_properties { :id => "id", :source => "source", :subject => "subject", :target => "target", } end |
Instance Method Details
#to_jsii ⇒ Object
571 572 573 574 575 576 577 578 579 580 |
# File 'greengrass/cfn_subscription_definition_version.rb', line 571 def to_jsii result = {} result.merge!({ "id" => @id, "source" => @source, "subject" => @subject, "target" => @target, }) result.compact end |