AWS::ManagedBlockchain::Node
Creates a node on the specified blockchain network.
Applies to Hyperledger Fabric and Ethereum.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ManagedBlockchain::Node", "Properties" : { "MemberId" :
String
, "NetworkId" :String
, "NodeConfiguration" :NodeConfiguration
} }
YAML
Type: AWS::ManagedBlockchain::Node Properties: MemberId:
String
NetworkId:String
NodeConfiguration:NodeConfiguration
Properties
MemberId
-
The unique identifier of the member to which the node belongs. Applies only to Hyperledger Fabric.
Required: No
Type: String
Update requires: No interruption
NetworkId
-
The unique identifier of the network for the node.
Ethereum public networks have the following
NetworkId
s:-
n-ethereum-mainnet
Required: Yes
Type: String
Minimum:
1
Maximum:
32
Update requires: No interruption
-
NodeConfiguration
-
Configuration properties of a peer node.
Required: Yes
Type: NodeConfiguration
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the node ID.
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 node.
MemberId
-
The unique identifier of the member in which the node is created. Applies only to Hyperledger Fabric.
NetworkId
-
The unique identifier of the network that the node is in.
NodeId
-
The unique identifier of the node.
Examples
Create a node on an Ethereum network
YAML
Description: "Basic Ethereum node template" Parameters: NetworkId: Type: String InstanceType: Type: String AvailabilityZone: Type: String Resources: Node: Type: "AWS::ManagedBlockchain::Node" Properties: NetworkId: !Ref NetworkId NodeConfiguration: InstanceType: !Ref InstanceType AvailabilityZone: !Ref AvailabilityZone
JSON
{ "Description": "Basic Ethereum node template", "Parameters": { "NetworkId": { "Type": "String" }, "InstanceType": { "Type": "String" }, "AvailabilityZone": { "Type": "String" } }, "Resources": { "Node": { "Type": "AWS::ManagedBlockchain::Node", "Properties": { "NetworkId": "NetworkId", "NodeConfiguration": { "InstanceType": "InstanceType", "AvailabilityZone": "AvailabilityZone" } } } } }
Create a node in a Hyperledger Fabric network member
YAML
Description: "Basic Hyperledger Fabric node template" Parameters: NetworkId: Type: String MemberId: Type: String InstanceType: Type: String AvailabilityZone: Type: String Resources: InitialNode: Type: "AWS::ManagedBlockchain::Node" Properties: NetworkId: !Ref NetworkId MemberId: !Ref MemberId NodeConfiguration: InstanceType: !Ref InstanceType AvailabilityZone: !Ref AvailabilityZone
JSON
{ "Description": "Basic Hyperledger Fabric node template", "Parameters": { "NetworkId": { "Type": "String" }, "MemberId": { "Type": "String" }, "InstanceType": { "Type": "String" }, "AvailabilityZone": { "Type": "String" } }, "Resources": { "InitialNode": { "Type": "AWS::ManagedBlockchain::Node", "Properties": { "NetworkId": "NetworkId", "MemberId": "MemberId", "NodeConfiguration": { "InstanceType": "InstanceType", "AvailabilityZone": "AvailabilityZone" } } } } }