CfnSubscriptionDefinitionPropsMixin

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

Bases: Mixin

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

Subscription definitions are used to organize your subscription definition versions.

Subscription definitions can reference multiple subscription definition versions. All subscription definition versions must be associated with a subscription definition. Each subscription definition version can contain one or more subscriptions. .. epigraph:

When you create a subscription definition, you can optionally include an initial subscription definition version. To associate a subscription definition version later, create an ```AWS::Greengrass::SubscriptionDefinitionVersion`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinitionversion.html>`_ resource and specify the ID of this subscription definition.

After you create the 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-subscriptiondefinition.html

CloudformationResource:

AWS::Greengrass::SubscriptionDefinition

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

# tags: Any

cfn_subscription_definition_props_mixin = greengrass_mixins.CfnSubscriptionDefinitionPropsMixin(greengrass_mixins.CfnSubscriptionDefinitionMixinProps(
    initial_version=greengrass_mixins.CfnSubscriptionDefinitionPropsMixin.SubscriptionDefinitionVersionProperty(
        subscriptions=[greengrass_mixins.CfnSubscriptionDefinitionPropsMixin.SubscriptionProperty(
            id="id",
            source="source",
            subject="subject",
            target="target"
        )]
    ),
    name="name",
    tags=tags
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

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

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 = ['initialVersion', 'name', 'tags']

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

SubscriptionDefinitionVersionProperty

class CfnSubscriptionDefinitionPropsMixin.SubscriptionDefinitionVersionProperty(*, subscriptions=None)

Bases: object

A subscription definition version contains a list of subscriptions .

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>`_ .

In an CloudFormation template, SubscriptionDefinitionVersion is the property type of the InitialVersion property in the `AWS::Greengrass::SubscriptionDefinition <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinition.html>`_ resource.

Parameters:

subscriptions (Union[IResolvable, Sequence[Union[IResolvable, SubscriptionProperty, Dict[str, Any]]], None]) – The subscriptions in this version.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion.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_definition_version_property = greengrass_mixins.CfnSubscriptionDefinitionPropsMixin.SubscriptionDefinitionVersionProperty(
    subscriptions=[greengrass_mixins.CfnSubscriptionDefinitionPropsMixin.SubscriptionProperty(
        id="id",
        source="source",
        subject="subject",
        target="target"
    )]
)

Attributes

subscriptions

The subscriptions in this version.

See:

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

SubscriptionProperty

class CfnSubscriptionDefinitionPropsMixin.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 `SubscriptionDefinitionVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion.html>`_ property type 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-subscriptiondefinition-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.CfnSubscriptionDefinitionPropsMixin.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-subscriptiondefinition-subscription.html#cfn-greengrass-subscriptiondefinition-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-subscriptiondefinition-subscription.html#cfn-greengrass-subscriptiondefinition-subscription-source

subject

The MQTT topic used to route the message.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscription.html#cfn-greengrass-subscriptiondefinition-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-subscriptiondefinition-subscription.html#cfn-greengrass-subscriptiondefinition-subscription-target