AWS::Greengrass::ConnectorDefinitionVersion
The AWS::Greengrass::ConnectorDefinitionVersion
resource represents a
connector definition version for AWS IoT Greengrass. A connector definition version
contains a list of connectors.
Note
To create a connector definition version, you must specify the ID of the connector
definition that you want to associate with the version. For information about creating a
connector definition, see AWS::Greengrass::ConnectorDefinition
.
After you create a 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::ConnectorDefinitionVersion", "Properties" : { "ConnectorDefinitionId" :
String
, "Connectors" :[ Connector, ... ]
} }
YAML
Type: AWS::Greengrass::ConnectorDefinitionVersion Properties: ConnectorDefinitionId:
String
Connectors:- Connector
Properties
ConnectorDefinitionId
-
The ID of the connector definition associated with this version. This value is a GUID.
Required: Yes
Type: String
Update requires: Replacement
Connectors
-
The connectors in this version. Only one instance of a given connector can be added to the connector definition version at a time.
Required: Yes
Type: Array of Connector
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the Amazon Resource Name (ARN) of the connector definition
version, such as arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/connectors/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2
.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
Examples
Connector Definition Version Snippet
The following snippet defines connector definition and connector definition version resources. The connector definition version references the connector definition and contains a connector.
For an example of a complete template, see the AWS::Greengrass::Group
resource.
JSON
"TestConnectorDefinition": { "Type": "AWS::Greengrass::ConnectorDefinition", "Properties": { "Name": "DemoTestConnectorDefinition" } }, "TestConnectorDefinitionVersion": { "Type": "AWS::Greengrass::ConnectorDefinitionVersion", "Properties": { "ConnectorDefinitionId": { "Ref": "TestConnectorDefinition" }, "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 TestConnectorDefinitionVersion: Type: 'AWS::Greengrass::ConnectorDefinitionVersion' Properties: ConnectorDefinitionId: !Ref TestConnectorDefinition 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
-
CreateConnectorDefinitionVersion in the AWS IoT Greengrass Version 1 API Reference