AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::Greengrass::ConnectorDefinition

The AWS::Greengrass::ConnectorDefinition resource represents a connector definition for AWS IoT Greengrass. Connector definitions are used to organize your connector definition versions.

Connector definitions can reference multiple connector definition versions.

A connector definition hierarchy with associated connector definition versions and connectors.

All connector definition versions must be associated with a connector definition. Each connector definition version can contain one or more connectors.

Note

When you create a connector definition, you can optionally include an initial connector definition version. To associate a connector definition version later, create an AWS::Greengrass::ConnectorDefinitionVersion resource and specify the ID of this connector definition.

After you create the connector definition version that contains the connectors you want to deploy, you must add it to your group version. For more information, see AWS::Greengrass::Group.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Greengrass::ConnectorDefinition", "Properties" : { "InitialVersion" : ConnectorDefinitionVersion, "Name" : String } }

YAML

Type: "AWS::Greengrass::ConnectorDefinition" Properties: InitialVersion: ConnectorDefinitionVersion Name: String

Properties

InitialVersion

The connector definition version to include when the connector definition is created. A connector definition version contains a list of connector property types.

Note

To associate a connector definition version after the connector definition is created, create an AWS::Greengrass::ConnectorDefinitionVersion resource and specify the ID of this connector definition.

Required: No

Type: ConnectorDefinitionVersion

Update requires: Replacement

Name

The name of the connector definition.

Required: Yes

Type: String

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of an AWS::Greengrass::ConnectorDefinition resource to the intrinsic Ref function, the function returns the ID of the connector definition, such as 1234a5b6-78cd-901e-2fgh-3i45j6k178l9.

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

LatestVersionArn

The Amazon Resource Name (ARN) of the last ConnectorDefinitionVersion that was added to the ConnectorDefinition, such as arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/connectors/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2.

Id

The ID of the ConnectorDefinition, such as 1234a5b6-78cd-901e-2fgh-3i45j6k178l9.

Arn

The ARN of the ConnectorDefinition, such as arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/connectors/1234a5b6-78cd-901e-2fgh-3i45j6k178l9.

Name

The name of the ConnectorDefinition, such as MyConnectorDefinition.

For more information about using Fn::GetAtt, see Fn::GetAtt.

Examples

Connector Definition Snippet

The following snippet defines a connector definition resource with an initial version that contains a connector.

For an example of a complete template, see the Group resource.

JSON

"TestConnectorDefinition": { "Type": "AWS::Greengrass::ConnectorDefinition", "Properties": { "Name": "DemoTestConnectorDefinition", "InitialVersion": { "Connectors": [ { "Id": "Connector1", "ConnectorArn": { "Fn::Join": [ ":", [ "arn:aws:greengrass", { "Ref": "AWS::Region" }, ":/connectors/SNS/versions/1" ] ] }, "Parameters": { "DefaultSNSArn": { "Fn::Join": [ ":", [ "arn:aws:sns", { "Ref": "AWS::Region" }, { "Ref": "AWS::AccountId" }, "defaultSns" ] ] } } } ] } } }

YAML

TestConnectorDefinition: Type: 'AWS::Greengrass::ConnectorDefinition' Properties: Name: DemoTestConnectorDefinition InitialVersion: Connectors: - Id: Connector1 ConnectorArn: !Join - ':' - - 'arn:aws:greengrass' - !Ref 'AWS::Region' - ':/connectors/SNS/versions/1' Parameters: DefaultSNSArn: !Join - ':' - - 'arn:aws:sns' - !Ref 'AWS::Region' - !Ref 'AWS::AccountId' - defaultSns

See Also