CfnSubscriptionDefinitionVersionPropsMixin

class aws_cdk.mixins_preview.aws_greengrass.mixins.CfnSubscriptionDefinitionVersionPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Greengrass::SubscriptionDefinitionVersion resource represents a subscription definition version for AWS IoT Greengrass .

A subscription definition version contains a list of subscriptions. .. epigraph:

To create a subscription definition version, you must specify the ID of the subscription definition that you want to associate with the version. For information about creating a subscription definition, see ```AWS::Greengrass::SubscriptionDefinition`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinition.html>`_ .

After you create a subscription definition version that contains the subscriptions you want to deploy, you must add it to your group version. For more information, see ```AWS::Greengrass::Group`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinitionversion.html

CloudformationResource:

AWS::Greengrass::SubscriptionDefinitionVersion

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

cfn_subscription_definition_version_props_mixin = greengrass_mixins.CfnSubscriptionDefinitionVersionPropsMixin(greengrass_mixins.CfnSubscriptionDefinitionVersionMixinProps(
    subscription_definition_id="subscriptionDefinitionId",
    subscriptions=[greengrass_mixins.CfnSubscriptionDefinitionVersionPropsMixin.SubscriptionProperty(
        id="id",
        source="source",
        subject="subject",
        target="target"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Greengrass::SubscriptionDefinitionVersion.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['subscriptionDefinitionId', 'subscriptions']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

SubscriptionProperty

class CfnSubscriptionDefinitionVersionPropsMixin.SubscriptionProperty(*, id=None, source=None, subject=None, target=None)

Bases: object

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 <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinitionversion.html>`_ resource contains a list of Subscription property types.

Parameters:
  • id (Optional[str]) – 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 (Optional[str]) – 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 (Optional[str]) – The MQTT topic used to route the message.

  • target (Optional[str]) – 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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinitionversion-subscription.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

subscription_property = greengrass_mixins.CfnSubscriptionDefinitionVersionPropsMixin.SubscriptionProperty(
    id="id",
    source="source",
    subject="subject",
    target="target"
)

Attributes

id

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:_-]+ .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinitionversion-subscription.html#cfn-greengrass-subscriptiondefinitionversion-subscription-id

source

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinitionversion-subscription.html#cfn-greengrass-subscriptiondefinitionversion-subscription-source

subject

The MQTT topic used to route the message.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinitionversion-subscription.html#cfn-greengrass-subscriptiondefinitionversion-subscription-subject

target

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinitionversion-subscription.html#cfn-greengrass-subscriptiondefinitionversion-subscription-target