nodes
Creates, updates, deletes, gets or lists a nodes resource.
Overview
| Name | nodes |
| Type | Resource |
| Id | aws.managedblockchain.nodes |
Fields
The following fields are returned by SELECT queries:
- get_node
- list_nodes
| Name | Datatype | Description |
|---|---|---|
arn | string | The 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_zone | string | The Availability Zone in which the node exists. Required for Ethereum nodes. |
creation_date | string (date-time) | The date and time that the node was created. |
framework_attributes | object | Attributes of the blockchain framework being used. |
id | string | The unique identifier of the node. |
instance_type | string | The instance type of the node. |
kms_key_arn | string | The 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_configuration | object | Configuration properties for logging events associated with a peer node on a Hyperledger Fabric network on Managed Blockchain. |
member_id | string | The unique identifier of the member to which the node belongs. Applies only to Hyperledger Fabric. |
network_id | string | The unique identifier of the network that the node is on. |
state_db | string | The state database that the node uses. Values are LevelDB or CouchDB. Applies only to Hyperledger Fabric. (LevelDB, CouchDB) |
status | string | The 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) |
tags | object | Tags 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. |
| Name | Datatype | Description |
|---|---|---|
next_token | string | The pagination token that indicates the next set of results to retrieve. |
nodes | array | An array of NodeSummary objects that contain configuration properties for each node. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_node | select | network_id, node_id, region | memberId | Returns detailed information about a node. Applies to Hyperledger Fabric and Ethereum. |
list_nodes | select | network_id, region | memberId, status, maxResults, nextToken | Returns information about the nodes within a network. Applies to Hyperledger Fabric and Ethereum. |
create_node | insert | network_id, region, ClientRequestToken, NodeConfiguration | Creates a node on the specified blockchain network. Applies to Hyperledger Fabric and Ethereum. | |
update_node | update | network_id, node_id, region | Updates a node configuration with new parameters. Applies only to Hyperledger Fabric. | |
delete_node | delete | network_id, node_id, region | memberId | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
network_id | string | The unique identifier of the network that the node is on. Ethereum public networks have the following NetworkIds: n-ethereum-mainnet |
node_id | string | The unique identifier of the node. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of nodes to list. |
memberId | string | The unique identifier of the member that owns this node. Applies only to Hyperledger Fabric and is required for Hyperledger Fabric. |
nextToken | string | The pagination token that indicates the next set of results to retrieve. |
status | string | An optional status specifier. If provided, only nodes currently in this status are listed. |
SELECT examples
- get_node
- list_nodes
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 }}'
;
Returns information about the nodes within a network. Applies to Hyperledger Fabric and Ethereum.
SELECT
next_token,
nodes
FROM aws.managedblockchain.nodes
WHERE network_id = '{{ network_id }}' -- required
AND region = '{{ region }}' -- required
AND memberId = '{{ memberId }}'
AND status = '{{ status }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_node
- Manifest
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
;
# Description fields are for documentation purposes
- name: nodes
props:
- name: network_id
value: "{{ network_id }}"
description: Required parameter for the nodes resource.
- name: region
value: "{{ region }}"
description: Required parameter for the nodes resource.
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
- name: MemberId
value: "{{ MemberId }}"
- name: NodeConfiguration
description: |
Configuration properties of a node.
value:
InstanceType: "{{ InstanceType }}"
AvailabilityZone: "{{ AvailabilityZone }}"
LogPublishingConfiguration:
Fabric:
ChaincodeLogs:
Cloudwatch:
Enabled: {{ Enabled }}
PeerLogs:
Cloudwatch:
Enabled: {{ Enabled }}
StateDB: "{{ StateDB }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_node
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
- delete_node
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 }}'
;