AWS::Greengrass::ConnectorDefinition - AWS CloudFormation

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. 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, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Greengrass::ConnectorDefinition Properties: InitialVersion: ConnectorDefinitionVersion Name: String Tags: - Tag

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

Tags

Application-specific metadata to attach to the connector definition. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tagging Your AWS IoT Greengrass Resources in the AWS IoT Greengrass Version 1 Developer Guide .

This Json property type is processed as a map of key-value pairs. It uses the following format, which is different from most Tags implementations in AWS CloudFormation templates.

"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" }

Required: No

Type: Array of Tag

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref 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

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

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

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

Id

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

LatestVersionArn

The 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.

Name

The name of the ConnectorDefinition, such as MyConnectorDefinition.

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 AWS::Greengrass::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