AWS::ManagedBlockchain::Node
Creates a node on the specified blockchain network.
Applies to Hyperledger Fabric and Ethereum.
Syntax
To declare this entity in your Amazon 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:StringNetworkId:StringNodeConfiguration: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
NetworkIds:-
n-ethereum-mainnet -
n-ethereum-goerli -
n-ethereum-rinkeby
Required: Yes
Type: String
Minimum:
1Maximum:
32Update 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 Reffunction, Refreturns the node ID.
For more information about using the Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic 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::GetAttintrinsic function, see Fn::GetAtt.
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" } } } } }