Skip to main content

nodes

Creates, updates, deletes, gets or lists a nodes resource.

Overview

Namenodes
TypeResource
Idaws.managedblockchain.nodes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the node. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference. (pattern: <code>^arn:.+:.+:.+:.+:.+</code>)
availability_zonestringThe Availability Zone in which the node exists. Required for Ethereum nodes.
creation_datestring (date-time)The date and time that the node was created.
framework_attributesobjectAttributes of the blockchain framework being used.
idstringThe unique identifier of the node.
instance_typestringThe instance type of the node.
kms_key_arnstringThe Amazon Resource Name (ARN) of the customer managed key in Key Management Service (KMS) that the node uses for encryption at rest. If the value of this parameter is "AWS Owned KMS Key", the node uses an Amazon Web Services owned KMS key for encryption. The node inherits this parameter from the member that it belongs to. For more information, see Encryption at Rest in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide. Applies only to Hyperledger Fabric.
log_publishing_configurationobjectConfiguration properties for logging events associated with a peer node on a Hyperledger Fabric network on Managed Blockchain.
member_idstringThe unique identifier of the member to which the node belongs. Applies only to Hyperledger Fabric.
network_idstringThe unique identifier of the network that the node is on.
state_dbstringThe state database that the node uses. Values are LevelDB or CouchDB. Applies only to Hyperledger Fabric. (LevelDB, CouchDB)
statusstringThe status of the node. CREATING - The Amazon Web Services account is in the process of creating a node. AVAILABLE - The node has been created and can participate in the network. UNHEALTHY - The node is impaired and might not function as expected. Amazon Managed Blockchain automatically finds nodes in this state and tries to recover them. If a node is recoverable, it returns to AVAILABLE. Otherwise, it moves to FAILED status. CREATE_FAILED - The Amazon Web Services account attempted to create a node and creation failed. UPDATING - The node is in the process of being updated. DELETING - The node is in the process of being deleted. DELETED - The node can no longer participate on the network. FAILED - The node is no longer functional, cannot be recovered, and must be deleted. INACCESSIBLE_ENCRYPTION_KEY - The node is impaired and might not function as expected because it cannot access the specified customer managed key in KMS for encryption at rest. Either the KMS key was disabled or deleted, or the grants on the key were revoked. The effect of disabling or deleting a key or of revoking a grant isn't immediate. It might take some time for the node resource to discover that the key is inaccessible. When a resource is in this state, we recommend deleting and recreating the resource. (CREATING, AVAILABLE, UNHEALTHY, CREATE_FAILED, UPDATING, DELETING, DELETED, FAILED, INACCESSIBLE_ENCRYPTION_KEY)
tagsobjectTags assigned to the node. Each tag consists of a key and optional value. For more information about tags, see Tagging Resources in the Amazon Managed Blockchain Ethereum Developer Guide, or Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_nodeselectnetwork_id, node_id, regionmemberIdReturns detailed information about a node. Applies to Hyperledger Fabric and Ethereum.
list_nodesselectnetwork_id, regionmemberId, status, maxResults, nextTokenReturns information about the nodes within a network. Applies to Hyperledger Fabric and Ethereum.
create_nodeinsertnetwork_id, region, ClientRequestToken, NodeConfigurationCreates a node on the specified blockchain network. Applies to Hyperledger Fabric and Ethereum.
update_nodeupdatenetwork_id, node_id, regionUpdates a node configuration with new parameters. Applies only to Hyperledger Fabric.
delete_nodedeletenetwork_id, node_id, regionmemberIdDeletes a node that your Amazon Web Services account owns. All data on the node is lost and cannot be recovered. Applies to Hyperledger Fabric and Ethereum.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
network_idstringThe unique identifier of the network that the node is on. Ethereum public networks have the following NetworkIds: n-ethereum-mainnet
node_idstringThe unique identifier of the node.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of nodes to list.
memberIdstringThe unique identifier of the member that owns this node. Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.
nextTokenstringThe pagination token that indicates the next set of results to retrieve.
statusstringAn optional status specifier. If provided, only nodes currently in this status are listed.

SELECT examples

Returns detailed information about a node. Applies to Hyperledger Fabric and Ethereum.

SELECT
arn,
availability_zone,
creation_date,
framework_attributes,
id,
instance_type,
kms_key_arn,
log_publishing_configuration,
member_id,
network_id,
state_db,
status,
tags
FROM aws.managedblockchain.nodes
WHERE network_id = '{{ network_id }}' -- required
AND node_id = '{{ node_id }}' -- required
AND region = '{{ region }}' -- required
AND memberId = '{{ memberId }}'
;

INSERT examples

Creates a node on the specified blockchain network. Applies to Hyperledger Fabric and Ethereum.

INSERT INTO aws.managedblockchain.nodes (
ClientRequestToken,
MemberId,
NodeConfiguration,
Tags,
network_id,
region
)
SELECT
'{{ ClientRequestToken }}' /* required */,
'{{ MemberId }}',
'{{ NodeConfiguration }}' /* required */,
'{{ Tags }}',
'{{ network_id }}',
'{{ region }}'
RETURNING
node_id
;

UPDATE examples

Updates a node configuration with new parameters. Applies only to Hyperledger Fabric.

UPDATE aws.managedblockchain.nodes
SET
MemberId = '{{ MemberId }}',
LogPublishingConfiguration = '{{ LogPublishingConfiguration }}'
WHERE
network_id = '{{ network_id }}' --required
AND node_id = '{{ node_id }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes a node that your Amazon Web Services account owns. All data on the node is lost and cannot be recovered. Applies to Hyperledger Fabric and Ethereum.

DELETE FROM aws.managedblockchain.nodes
WHERE network_id = '{{ network_id }}' --required
AND node_id = '{{ node_id }}' --required
AND region = '{{ region }}' --required
AND memberId = '{{ memberId }}'
;