Table of Contents
A low-level client representing Amazon Managed Blockchain (ManagedBlockchain)
Amazon Managed Blockchain is a fully managed service for creating and managing blockchain networks using open-source frameworks. Blockchain allows you to build applications where multiple parties can securely and transparently run transactions and share data without the need for a trusted, central authority.
Managed Blockchain supports the Hyperledger Fabric and Ethereum open-source frameworks. Because of fundamental differences between the frameworks, some API actions or data types may only apply in the context of one framework and not the other. For example, actions related to Hyperledger Fabric network members such as CreateMember and DeleteMember do not apply to Ethereum.
The description for each action indicates the framework or frameworks to which it applies. Data types and properties that apply only in the context of a particular framework are similarly indicated.
import boto3
client = boto3.client('managedblockchain')
These are the available methods:
Check if an operation can be paginated.
Creates a member within a Managed Blockchain network.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.create_member(
ClientRequestToken='string',
InvitationId='string',
NetworkId='string',
MemberConfiguration={
'Name': 'string',
'Description': 'string',
'FrameworkConfiguration': {
'Fabric': {
'AdminUsername': 'string',
'AdminPassword': 'string'
}
},
'LogPublishingConfiguration': {
'Fabric': {
'CaLogs': {
'Cloudwatch': {
'Enabled': True|False
}
}
}
},
'Tags': {
'string': 'string'
},
'KmsKeyArn': 'string'
}
)
[REQUIRED]
A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an AWS SDK or the AWS CLI.
This field is autopopulated if not provided.
[REQUIRED]
The unique identifier of the invitation that is sent to the member to join the network.
[REQUIRED]
The unique identifier of the network in which the member is created.
[REQUIRED]
Member configuration parameters.
The name of the member.
An optional description of the member.
Configuration properties of the blockchain framework relevant to the member.
Attributes of Hyperledger Fabric for a member on a Managed Blockchain network that uses Hyperledger Fabric.
The user name for the member's initial administrative user.
The password for the member's initial administrative user. The AdminPassword must be at least eight characters long and no more than 32 characters. It must contain at least one uppercase letter, one lowercase letter, and one digit. It cannot have a single quotation mark (‘), a double quotation marks (“), a forward slash(/), a backward slash(), @, or a space.
Configuration properties for logging events associated with a member of a Managed Blockchain network.
Configuration properties for logging events associated with a member of a Managed Blockchain network using the Hyperledger Fabric framework.
Configuration properties for logging events associated with a member's Certificate Authority (CA). CA logs help you determine when a member in your account joins the network, or when new peers register with a member CA.
Parameters for publishing logs to Amazon CloudWatch Logs.
Indicates whether logging is enabled.
Tags assigned to the member. Tags consist of a key and optional value. For more information about tags, see Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide .
When specifying tags during creation, you can specify multiple key-value pairs in a single request, with an overall maximum of 50 tags added to each resource.
The Amazon Resource Name (ARN) of the customer managed key in AWS Key Management Service (AWS KMS) to use for encryption at rest in the member. This parameter is inherited by any nodes that this member creates.
Use one of the following options to specify this parameter:
dict
Response Syntax
{
'MemberId': 'string'
}
Response Structure
(dict) --
MemberId (string) --
The unique identifier of the member.
Exceptions
Creates a new blockchain network using Amazon Managed Blockchain.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.create_network(
ClientRequestToken='string',
Name='string',
Description='string',
Framework='HYPERLEDGER_FABRIC'|'ETHEREUM',
FrameworkVersion='string',
FrameworkConfiguration={
'Fabric': {
'Edition': 'STARTER'|'STANDARD'
}
},
VotingPolicy={
'ApprovalThresholdPolicy': {
'ThresholdPercentage': 123,
'ProposalDurationInHours': 123,
'ThresholdComparator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUAL_TO'
}
},
MemberConfiguration={
'Name': 'string',
'Description': 'string',
'FrameworkConfiguration': {
'Fabric': {
'AdminUsername': 'string',
'AdminPassword': 'string'
}
},
'LogPublishingConfiguration': {
'Fabric': {
'CaLogs': {
'Cloudwatch': {
'Enabled': True|False
}
}
}
},
'Tags': {
'string': 'string'
},
'KmsKeyArn': 'string'
},
Tags={
'string': 'string'
}
)
[REQUIRED]
A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an AWS SDK or the AWS CLI.
This field is autopopulated if not provided.
[REQUIRED]
The name of the network.
[REQUIRED]
The blockchain framework that the network uses.
[REQUIRED]
The version of the blockchain framework that the network uses.
Configuration properties of the blockchain framework relevant to the network configuration.
Hyperledger Fabric configuration properties for a Managed Blockchain network that uses Hyperledger Fabric.
The edition of Amazon Managed Blockchain that the network uses. For more information, see Amazon Managed Blockchain Pricing .
[REQUIRED]
The voting rules used by the network to determine if a proposal is approved.
Defines the rules for the network for voting on proposals, such as the percentage of YES votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created.
The percentage of votes among all members that must be YES for a proposal to be approved. For example, a ThresholdPercentage value of 50 indicates 50%. The ThresholdComparator determines the precise comparison. If a ThresholdPercentage value of 50 is specified on a network with 10 members, along with a ThresholdComparator value of GREATER_THAN , this indicates that 6 YES votes are required for the proposal to be approved.
The duration from the time that a proposal is created until it expires. If members cast neither the required number of YES votes to approve the proposal nor the number of NO votes required to reject it before the duration expires, the proposal is EXPIRED and ProposalActions are not carried out.
Determines whether the vote percentage must be greater than the ThresholdPercentage or must be greater than or equal to the ThreholdPercentage to be approved.
[REQUIRED]
Configuration properties for the first member within the network.
The name of the member.
An optional description of the member.
Configuration properties of the blockchain framework relevant to the member.
Attributes of Hyperledger Fabric for a member on a Managed Blockchain network that uses Hyperledger Fabric.
The user name for the member's initial administrative user.
The password for the member's initial administrative user. The AdminPassword must be at least eight characters long and no more than 32 characters. It must contain at least one uppercase letter, one lowercase letter, and one digit. It cannot have a single quotation mark (‘), a double quotation marks (“), a forward slash(/), a backward slash(), @, or a space.
Configuration properties for logging events associated with a member of a Managed Blockchain network.
Configuration properties for logging events associated with a member of a Managed Blockchain network using the Hyperledger Fabric framework.
Configuration properties for logging events associated with a member's Certificate Authority (CA). CA logs help you determine when a member in your account joins the network, or when new peers register with a member CA.
Parameters for publishing logs to Amazon CloudWatch Logs.
Indicates whether logging is enabled.
Tags assigned to the member. Tags consist of a key and optional value. For more information about tags, see Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide .
When specifying tags during creation, you can specify multiple key-value pairs in a single request, with an overall maximum of 50 tags added to each resource.
The Amazon Resource Name (ARN) of the customer managed key in AWS Key Management Service (AWS KMS) to use for encryption at rest in the member. This parameter is inherited by any nodes that this member creates.
Use one of the following options to specify this parameter:
Tags to assign to the network. Each tag consists of a key and optional value.
When specifying tags during creation, you can specify multiple key-value pairs in a single request, with an overall maximum of 50 tags added to each resource.
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 .
dict
Response Syntax
{
'NetworkId': 'string',
'MemberId': 'string'
}
Response Structure
(dict) --
NetworkId (string) --
The unique identifier for the network.
MemberId (string) --
The unique identifier for the first member within the network.
Exceptions
Creates a node on the specified blockchain network.
Applies to Hyperledger Fabric and Ethereum.
See also: AWS API Documentation
Request Syntax
response = client.create_node(
ClientRequestToken='string',
NetworkId='string',
MemberId='string',
NodeConfiguration={
'InstanceType': 'string',
'AvailabilityZone': 'string',
'LogPublishingConfiguration': {
'Fabric': {
'ChaincodeLogs': {
'Cloudwatch': {
'Enabled': True|False
}
},
'PeerLogs': {
'Cloudwatch': {
'Enabled': True|False
}
}
}
},
'StateDB': 'LevelDB'|'CouchDB'
},
Tags={
'string': 'string'
}
)
[REQUIRED]
A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an AWS SDK or the AWS CLI.
This field is autopopulated if not provided.
[REQUIRED]
The unique identifier of the network for the node.
Ethereum public networks have the following NetworkId s:
The unique identifier of the member that owns this node.
Applies only to Hyperledger Fabric.
[REQUIRED]
The properties of a node configuration.
The Amazon Managed Blockchain instance type for the node.
The Availability Zone in which the node exists. Required for Ethereum nodes.
Configuration properties for logging events associated with a peer node on a Hyperledger Fabric network on Managed Blockchain.
Configuration properties for logging events associated with a node that is owned by a member of a Managed Blockchain network using the Hyperledger Fabric framework.
Configuration properties for logging events associated with chaincode execution on a peer node. Chaincode logs contain the results of instantiating, invoking, and querying the chaincode. A peer can run multiple instances of chaincode. When enabled, a log stream is created for all chaincodes, with an individual log stream for each chaincode.
Parameters for publishing logs to Amazon CloudWatch Logs.
Indicates whether logging is enabled.
Configuration properties for a peer node log. Peer node logs contain messages generated when your client submits transaction proposals to peer nodes, requests to join channels, enrolls an admin peer, and lists the chaincode instances on a peer node.
Parameters for publishing logs to Amazon CloudWatch Logs.
Indicates whether logging is enabled.
The state database that the node uses. Values are LevelDB or CouchDB . When using an Amazon Managed Blockchain network with Hyperledger Fabric version 1.4 or later, the default is CouchDB .
Applies only to Hyperledger Fabric.
Tags to assign to the node. Each tag consists of a key and optional value.
When specifying tags during creation, you can specify multiple key-value pairs in a single request, with an overall maximum of 50 tags added to each resource.
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 .
dict
Response Syntax
{
'NodeId': 'string'
}
Response Structure
(dict) --
NodeId (string) --
The unique identifier of the node.
Exceptions
Creates a proposal for a change to the network that other members of the network can vote on, for example, a proposal to add a new member to the network. Any member can create a proposal.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.create_proposal(
ClientRequestToken='string',
NetworkId='string',
MemberId='string',
Actions={
'Invitations': [
{
'Principal': 'string'
},
],
'Removals': [
{
'MemberId': 'string'
},
]
},
Description='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an AWS SDK or the AWS CLI.
This field is autopopulated if not provided.
[REQUIRED]
The unique identifier of the network for which the proposal is made.
[REQUIRED]
The unique identifier of the member that is creating the proposal. This identifier is especially useful for identifying the member making the proposal when multiple members exist in a single AWS account.
[REQUIRED]
The type of actions proposed, such as inviting a member or removing a member. The types of Actions in a proposal are mutually exclusive. For example, a proposal with Invitations actions cannot also contain Removals actions.
The actions to perform for an APPROVED proposal to invite an AWS account to create a member and join the network.
An action to invite a specific AWS account to create a member and join the network. The InviteAction is carried out when a Proposal is APPROVED .
Applies only to Hyperledger Fabric.
The AWS account ID to invite.
The actions to perform for an APPROVED proposal to remove a member from the network, which deletes the member and all associated member resources from the network.
An action to remove a member from a Managed Blockchain network as the result of a removal proposal that is APPROVED . The member and all associated resources are deleted from the network.
Applies only to Hyperledger Fabric.
The unique identifier of the member to remove.
Tags to assign to the proposal. Each tag consists of a key and optional value.
When specifying tags during creation, you can specify multiple key-value pairs in a single request, with an overall maximum of 50 tags added to each resource. If the proposal is for a network invitation, the invitation inherits the tags added to the proposal.
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 .
dict
Response Syntax
{
'ProposalId': 'string'
}
Response Structure
(dict) --
ProposalId (string) --
The unique identifier of the proposal.
Exceptions
Deletes a member. Deleting a member removes the member and all associated resources from the network. DeleteMember can only be called for a specified MemberId if the principal performing the action is associated with the AWS account that owns the member. In all other cases, the DeleteMember action is carried out as the result of an approved proposal to remove a member. If MemberId is the last member in a network specified by the last AWS account, the network is deleted also.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.delete_member(
NetworkId='string',
MemberId='string'
)
[REQUIRED]
The unique identifier of the network from which the member is removed.
[REQUIRED]
The unique identifier of the member to remove.
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes a node that your AWS account owns. All data on the node is lost and cannot be recovered.
Applies to Hyperledger Fabric and Ethereum.
See also: AWS API Documentation
Request Syntax
response = client.delete_node(
NetworkId='string',
MemberId='string',
NodeId='string'
)
[REQUIRED]
The unique identifier of the network that the node is on.
Ethereum public networks have the following NetworkId s:
The unique identifier of the member that owns this node.
Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.
[REQUIRED]
The unique identifier of the node.
dict
Response Syntax
{}
Response Structure
Exceptions
Generate a presigned url given a client, its method, and arguments
The presigned url
Returns detailed information about a member.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.get_member(
NetworkId='string',
MemberId='string'
)
[REQUIRED]
The unique identifier of the network to which the member belongs.
[REQUIRED]
The unique identifier of the member.
dict
Response Syntax
{
'Member': {
'NetworkId': 'string',
'Id': 'string',
'Name': 'string',
'Description': 'string',
'FrameworkAttributes': {
'Fabric': {
'AdminUsername': 'string',
'CaEndpoint': 'string'
}
},
'LogPublishingConfiguration': {
'Fabric': {
'CaLogs': {
'Cloudwatch': {
'Enabled': True|False
}
}
}
},
'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'UPDATING'|'DELETING'|'DELETED'|'INACCESSIBLE_ENCRYPTION_KEY',
'CreationDate': datetime(2015, 1, 1),
'Tags': {
'string': 'string'
},
'Arn': 'string',
'KmsKeyArn': 'string'
}
}
Response Structure
(dict) --
Member (dict) --
The properties of a member.
NetworkId (string) --
The unique identifier of the network to which the member belongs.
Id (string) --
The unique identifier of the member.
Name (string) --
The name of the member.
Description (string) --
An optional description for the member.
FrameworkAttributes (dict) --
Attributes relevant to a member for the blockchain framework that the Managed Blockchain network uses.
Fabric (dict) --
Attributes of Hyperledger Fabric relevant to a member on a Managed Blockchain network that uses Hyperledger Fabric.
AdminUsername (string) --
The user name for the initial administrator user for the member.
CaEndpoint (string) --
The endpoint used to access the member's certificate authority.
LogPublishingConfiguration (dict) --
Configuration properties for logging events associated with a member.
Fabric (dict) --
Configuration properties for logging events associated with a member of a Managed Blockchain network using the Hyperledger Fabric framework.
CaLogs (dict) --
Configuration properties for logging events associated with a member's Certificate Authority (CA). CA logs help you determine when a member in your account joins the network, or when new peers register with a member CA.
Cloudwatch (dict) --
Parameters for publishing logs to Amazon CloudWatch Logs.
Enabled (boolean) --
Indicates whether logging is enabled.
Status (string) --
The status of a member.
CreationDate (datetime) --
The date and time that the member was created.
Tags (dict) --
Tags assigned to the member. Tags consist of a key and optional value. For more information about tags, see Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide .
Arn (string) --
The Amazon Resource Name (ARN) of the member. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
KmsKeyArn (string) --
The Amazon Resource Name (ARN) of the customer managed key in AWS Key Management Service (AWS KMS) that the member uses for encryption at rest. If the value of this parameter is "AWS Owned KMS Key" , the member uses an AWS owned KMS key for encryption. This parameter is inherited by the nodes that this member owns.
Exceptions
Returns detailed information about a network.
Applies to Hyperledger Fabric and Ethereum.
See also: AWS API Documentation
Request Syntax
response = client.get_network(
NetworkId='string'
)
[REQUIRED]
The unique identifier of the network to get information about.
{
'Network': {
'Id': 'string',
'Name': 'string',
'Description': 'string',
'Framework': 'HYPERLEDGER_FABRIC'|'ETHEREUM',
'FrameworkVersion': 'string',
'FrameworkAttributes': {
'Fabric': {
'OrderingServiceEndpoint': 'string',
'Edition': 'STARTER'|'STANDARD'
},
'Ethereum': {
'ChainId': 'string'
}
},
'VpcEndpointServiceName': 'string',
'VotingPolicy': {
'ApprovalThresholdPolicy': {
'ThresholdPercentage': 123,
'ProposalDurationInHours': 123,
'ThresholdComparator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUAL_TO'
}
},
'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED',
'CreationDate': datetime(2015, 1, 1),
'Tags': {
'string': 'string'
},
'Arn': 'string'
}
}
Response Structure
An object containing network configuration parameters.
The unique identifier of the network.
The name of the network.
Attributes of the blockchain framework for the network.
The blockchain framework that the network uses.
The version of the blockchain framework that the network uses.
Attributes of the blockchain framework that the network uses.
Attributes of Hyperledger Fabric for a Managed Blockchain network that uses Hyperledger Fabric.
The endpoint of the ordering service for the network.
The edition of Amazon Managed Blockchain that Hyperledger Fabric uses. For more information, see Amazon Managed Blockchain Pricing .
Attributes of an Ethereum network for Managed Blockchain resources participating in an Ethereum network.
The Ethereum CHAIN_ID associated with the Ethereum network. Chain IDs are as follows:
The VPC endpoint service name of the VPC endpoint service of the network. Members use the VPC endpoint service name to create a VPC endpoint to access network resources.
The voting rules for the network to decide if a proposal is accepted.
Defines the rules for the network for voting on proposals, such as the percentage of YES votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created.
The percentage of votes among all members that must be YES for a proposal to be approved. For example, a ThresholdPercentage value of 50 indicates 50%. The ThresholdComparator determines the precise comparison. If a ThresholdPercentage value of 50 is specified on a network with 10 members, along with a ThresholdComparator value of GREATER_THAN , this indicates that 6 YES votes are required for the proposal to be approved.
The duration from the time that a proposal is created until it expires. If members cast neither the required number of YES votes to approve the proposal nor the number of NO votes required to reject it before the duration expires, the proposal is EXPIRED and ProposalActions are not carried out.
Determines whether the vote percentage must be greater than the ThresholdPercentage or must be greater than or equal to the ThreholdPercentage to be approved.
The current status of the network.
The date and time that the network was created.
Tags assigned to the network. 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 .
The Amazon Resource Name (ARN) of the network. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
Exceptions
Returns detailed information about a node.
Applies to Hyperledger Fabric and Ethereum.
See also: AWS API Documentation
Request Syntax
response = client.get_node(
NetworkId='string',
MemberId='string',
NodeId='string'
)
[REQUIRED]
The unique identifier of the network that the node is on.
The unique identifier of the member that owns the node.
Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.
[REQUIRED]
The unique identifier of the node.
dict
Response Syntax
{
'Node': {
'NetworkId': 'string',
'MemberId': 'string',
'Id': 'string',
'InstanceType': 'string',
'AvailabilityZone': 'string',
'FrameworkAttributes': {
'Fabric': {
'PeerEndpoint': 'string',
'PeerEventEndpoint': 'string'
},
'Ethereum': {
'HttpEndpoint': 'string',
'WebSocketEndpoint': 'string'
}
},
'LogPublishingConfiguration': {
'Fabric': {
'ChaincodeLogs': {
'Cloudwatch': {
'Enabled': True|False
}
},
'PeerLogs': {
'Cloudwatch': {
'Enabled': True|False
}
}
}
},
'StateDB': 'LevelDB'|'CouchDB',
'Status': 'CREATING'|'AVAILABLE'|'UNHEALTHY'|'CREATE_FAILED'|'UPDATING'|'DELETING'|'DELETED'|'FAILED'|'INACCESSIBLE_ENCRYPTION_KEY',
'CreationDate': datetime(2015, 1, 1),
'Tags': {
'string': 'string'
},
'Arn': 'string',
'KmsKeyArn': 'string'
}
}
Response Structure
(dict) --
Node (dict) --
Properties of the node configuration.
NetworkId (string) --
The unique identifier of the network that the node is on.
MemberId (string) --
The unique identifier of the member to which the node belongs.
Applies only to Hyperledger Fabric.
Id (string) --
The unique identifier of the node.
InstanceType (string) --
The instance type of the node.
AvailabilityZone (string) --
The Availability Zone in which the node exists. Required for Ethereum nodes.
FrameworkAttributes (dict) --
Attributes of the blockchain framework being used.
Fabric (dict) --
Attributes of Hyperledger Fabric for a peer node on a Managed Blockchain network that uses Hyperledger Fabric.
PeerEndpoint (string) --
The endpoint that identifies the peer node for all services except peer channel-based event services.
PeerEventEndpoint (string) --
The endpoint that identifies the peer node for peer channel-based event services.
Ethereum (dict) --
Attributes of Ethereum for a node on a Managed Blockchain network that uses Ethereum.
HttpEndpoint (string) --
The endpoint on which the Ethereum node listens to run Ethereum JSON-RPC methods over HTTP connections from a client. Use this endpoint in client code for smart contracts when using an HTTP connection. Connections to this endpoint are authenticated using Signature Version 4 .
WebSocketEndpoint (string) --
The endpoint on which the Ethereum node listens to run Ethereum JSON-RPC methods over WebSockets connections from a client. Use this endpoint in client code for smart contracts when using a WebSockets connection. Connections to this endpoint are authenticated using Signature Version 4 .
LogPublishingConfiguration (dict) --
Configuration properties for logging events associated with a peer node on a Hyperledger Fabric network on Managed Blockchain.
Fabric (dict) --
Configuration properties for logging events associated with a node that is owned by a member of a Managed Blockchain network using the Hyperledger Fabric framework.
ChaincodeLogs (dict) --
Configuration properties for logging events associated with chaincode execution on a peer node. Chaincode logs contain the results of instantiating, invoking, and querying the chaincode. A peer can run multiple instances of chaincode. When enabled, a log stream is created for all chaincodes, with an individual log stream for each chaincode.
Cloudwatch (dict) --
Parameters for publishing logs to Amazon CloudWatch Logs.
Enabled (boolean) --
Indicates whether logging is enabled.
PeerLogs (dict) --
Configuration properties for a peer node log. Peer node logs contain messages generated when your client submits transaction proposals to peer nodes, requests to join channels, enrolls an admin peer, and lists the chaincode instances on a peer node.
Cloudwatch (dict) --
Parameters for publishing logs to Amazon CloudWatch Logs.
Enabled (boolean) --
Indicates whether logging is enabled.
StateDB (string) --
The state database that the node uses. Values are LevelDB or CouchDB .
Applies only to Hyperledger Fabric.
Status (string) --
The status of the node.
CreationDate (datetime) --
The date and time that the node was created.
Tags (dict) --
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 .
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 AWS General Reference .
KmsKeyArn (string) --
The Amazon Resource Name (ARN) of the customer managed key in AWS Key Management Service (AWS KMS) that the node uses for encryption at rest. If the value of this parameter is "AWS Owned KMS Key" , the node uses an AWS owned KMS key for encryption. The node inherits this parameter from the member that it belongs to.
Applies only to Hyperledger Fabric.
Exceptions
Create a paginator for an operation.
Returns detailed information about a proposal.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.get_proposal(
NetworkId='string',
ProposalId='string'
)
[REQUIRED]
The unique identifier of the network for which the proposal is made.
[REQUIRED]
The unique identifier of the proposal.
dict
Response Syntax
{
'Proposal': {
'ProposalId': 'string',
'NetworkId': 'string',
'Description': 'string',
'Actions': {
'Invitations': [
{
'Principal': 'string'
},
],
'Removals': [
{
'MemberId': 'string'
},
]
},
'ProposedByMemberId': 'string',
'ProposedByMemberName': 'string',
'Status': 'IN_PROGRESS'|'APPROVED'|'REJECTED'|'EXPIRED'|'ACTION_FAILED',
'CreationDate': datetime(2015, 1, 1),
'ExpirationDate': datetime(2015, 1, 1),
'YesVoteCount': 123,
'NoVoteCount': 123,
'OutstandingVoteCount': 123,
'Tags': {
'string': 'string'
},
'Arn': 'string'
}
}
Response Structure
(dict) --
Proposal (dict) --
Information about a proposal.
ProposalId (string) --
The unique identifier of the proposal.
NetworkId (string) --
The unique identifier of the network for which the proposal is made.
Description (string) --
The description of the proposal.
Actions (dict) --
The actions to perform on the network if the proposal is APPROVED .
Invitations (list) --
The actions to perform for an APPROVED proposal to invite an AWS account to create a member and join the network.
(dict) --
An action to invite a specific AWS account to create a member and join the network. The InviteAction is carried out when a Proposal is APPROVED .
Applies only to Hyperledger Fabric.
Principal (string) --
The AWS account ID to invite.
Removals (list) --
The actions to perform for an APPROVED proposal to remove a member from the network, which deletes the member and all associated member resources from the network.
(dict) --
An action to remove a member from a Managed Blockchain network as the result of a removal proposal that is APPROVED . The member and all associated resources are deleted from the network.
Applies only to Hyperledger Fabric.
MemberId (string) --
The unique identifier of the member to remove.
ProposedByMemberId (string) --
The unique identifier of the member that created the proposal.
ProposedByMemberName (string) --
The name of the member that created the proposal.
Status (string) --
The status of the proposal. Values are as follows:
CreationDate (datetime) --
The date and time that the proposal was created.
ExpirationDate (datetime) --
The date and time that the proposal expires. This is the CreationDate plus the ProposalDurationInHours that is specified in the ProposalThresholdPolicy . After this date and time, if members have not cast enough votes to determine the outcome according to the voting policy, the proposal is EXPIRED and Actions are not carried out.
YesVoteCount (integer) --
The current total of YES votes cast on the proposal by members.
NoVoteCount (integer) --
The current total of NO votes cast on the proposal by members.
OutstandingVoteCount (integer) --
The number of votes remaining to be cast on the proposal by members. In other words, the number of members minus the sum of YES votes and NO votes.
Tags (dict) --
Tags assigned to the proposal. 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 .
Arn (string) --
The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
Exceptions
Returns an object that can wait for some condition.
Returns a list of all invitations for the current AWS account.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.list_invitations(
MaxResults=123,
NextToken='string'
)
dict
Response Syntax
{
'Invitations': [
{
'InvitationId': 'string',
'CreationDate': datetime(2015, 1, 1),
'ExpirationDate': datetime(2015, 1, 1),
'Status': 'PENDING'|'ACCEPTED'|'ACCEPTING'|'REJECTED'|'EXPIRED',
'NetworkSummary': {
'Id': 'string',
'Name': 'string',
'Description': 'string',
'Framework': 'HYPERLEDGER_FABRIC'|'ETHEREUM',
'FrameworkVersion': 'string',
'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED',
'CreationDate': datetime(2015, 1, 1),
'Arn': 'string'
},
'Arn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Invitations (list) --
The invitations for the network.
(dict) --
An invitation to an AWS account to create a member and join the network.
Applies only to Hyperledger Fabric.
InvitationId (string) --
The unique identifier for the invitation.
CreationDate (datetime) --
The date and time that the invitation was created.
ExpirationDate (datetime) --
The date and time that the invitation expires. This is the CreationDate plus the ProposalDurationInHours that is specified in the ProposalThresholdPolicy . After this date and time, the invitee can no longer create a member and join the network using this InvitationId .
Status (string) --
The status of the invitation:
NetworkSummary (dict) --
A summary of network configuration properties.
Id (string) --
The unique identifier of the network.
Name (string) --
The name of the network.
Description (string) --
An optional description of the network.
Framework (string) --
The blockchain framework that the network uses.
FrameworkVersion (string) --
The version of the blockchain framework that the network uses.
Status (string) --
The current status of the network.
CreationDate (datetime) --
The date and time that the network was created.
Arn (string) --
The Amazon Resource Name (ARN) of the network. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
Arn (string) --
The Amazon Resource Name (ARN) of the invitation. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
NextToken (string) --
The pagination token that indicates the next set of results to retrieve.
Exceptions
Returns a list of the members in a network and properties of their configurations.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.list_members(
NetworkId='string',
Name='string',
Status='CREATING'|'AVAILABLE'|'CREATE_FAILED'|'UPDATING'|'DELETING'|'DELETED'|'INACCESSIBLE_ENCRYPTION_KEY',
IsOwned=True|False,
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The unique identifier of the network for which to list members.
dict
Response Syntax
{
'Members': [
{
'Id': 'string',
'Name': 'string',
'Description': 'string',
'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'UPDATING'|'DELETING'|'DELETED'|'INACCESSIBLE_ENCRYPTION_KEY',
'CreationDate': datetime(2015, 1, 1),
'IsOwned': True|False,
'Arn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Members (list) --
An array of MemberSummary objects. Each object contains details about a network member.
(dict) --
A summary of configuration properties for a member.
Applies only to Hyperledger Fabric.
Id (string) --
The unique identifier of the member.
Name (string) --
The name of the member.
Description (string) --
An optional description of the member.
Status (string) --
The status of the member.
CreationDate (datetime) --
The date and time that the member was created.
IsOwned (boolean) --
An indicator of whether the member is owned by your AWS account or a different AWS account.
Arn (string) --
The Amazon Resource Name (ARN) of the member. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
NextToken (string) --
The pagination token that indicates the next set of results to retrieve.
Exceptions
Returns information about the networks in which the current AWS account participates.
Applies to Hyperledger Fabric and Ethereum.
See also: AWS API Documentation
Request Syntax
response = client.list_networks(
Name='string',
Framework='HYPERLEDGER_FABRIC'|'ETHEREUM',
Status='CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED',
MaxResults=123,
NextToken='string'
)
An optional status specifier. If provided, only networks currently in this status are listed.
Applies only to Hyperledger Fabric.
dict
Response Syntax
{
'Networks': [
{
'Id': 'string',
'Name': 'string',
'Description': 'string',
'Framework': 'HYPERLEDGER_FABRIC'|'ETHEREUM',
'FrameworkVersion': 'string',
'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED',
'CreationDate': datetime(2015, 1, 1),
'Arn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Networks (list) --
An array of NetworkSummary objects that contain configuration properties for each network.
(dict) --
A summary of network configuration properties.
Id (string) --
The unique identifier of the network.
Name (string) --
The name of the network.
Description (string) --
An optional description of the network.
Framework (string) --
The blockchain framework that the network uses.
FrameworkVersion (string) --
The version of the blockchain framework that the network uses.
Status (string) --
The current status of the network.
CreationDate (datetime) --
The date and time that the network was created.
Arn (string) --
The Amazon Resource Name (ARN) of the network. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
NextToken (string) --
The pagination token that indicates the next set of results to retrieve.
Exceptions
Returns information about the nodes within a network.
Applies to Hyperledger Fabric and Ethereum.
See also: AWS API Documentation
Request Syntax
response = client.list_nodes(
NetworkId='string',
MemberId='string',
Status='CREATING'|'AVAILABLE'|'UNHEALTHY'|'CREATE_FAILED'|'UPDATING'|'DELETING'|'DELETED'|'FAILED'|'INACCESSIBLE_ENCRYPTION_KEY',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The unique identifier of the network for which to list nodes.
The unique identifier of the member who owns the nodes to list.
Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.
dict
Response Syntax
{
'Nodes': [
{
'Id': 'string',
'Status': 'CREATING'|'AVAILABLE'|'UNHEALTHY'|'CREATE_FAILED'|'UPDATING'|'DELETING'|'DELETED'|'FAILED'|'INACCESSIBLE_ENCRYPTION_KEY',
'CreationDate': datetime(2015, 1, 1),
'AvailabilityZone': 'string',
'InstanceType': 'string',
'Arn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Nodes (list) --
An array of NodeSummary objects that contain configuration properties for each node.
(dict) --
A summary of configuration properties for a node.
Id (string) --
The unique identifier of the node.
Status (string) --
The status of the node.
CreationDate (datetime) --
The date and time that the node was created.
AvailabilityZone (string) --
The Availability Zone in which the node exists.
InstanceType (string) --
The EC2 instance type for the node.
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 AWS General Reference .
NextToken (string) --
The pagination token that indicates the next set of results to retrieve.
Exceptions
Returns the list of votes for a specified proposal, including the value of each vote and the unique identifier of the member that cast the vote.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.list_proposal_votes(
NetworkId='string',
ProposalId='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The unique identifier of the network.
[REQUIRED]
The unique identifier of the proposal.
dict
Response Syntax
{
'ProposalVotes': [
{
'Vote': 'YES'|'NO',
'MemberName': 'string',
'MemberId': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ProposalVotes (list) --
The list of votes.
(dict) --
Properties of an individual vote that a member cast for a proposal.
Applies only to Hyperledger Fabric.
Vote (string) --
The vote value, either YES or NO .
MemberName (string) --
The name of the member that cast the vote.
MemberId (string) --
The unique identifier of the member that cast the vote.
NextToken (string) --
The pagination token that indicates the next set of results to retrieve.
Exceptions
Returns a list of proposals for the network.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.list_proposals(
NetworkId='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The unique identifier of the network.
dict
Response Syntax
{
'Proposals': [
{
'ProposalId': 'string',
'Description': 'string',
'ProposedByMemberId': 'string',
'ProposedByMemberName': 'string',
'Status': 'IN_PROGRESS'|'APPROVED'|'REJECTED'|'EXPIRED'|'ACTION_FAILED',
'CreationDate': datetime(2015, 1, 1),
'ExpirationDate': datetime(2015, 1, 1),
'Arn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Proposals (list) --
The summary of each proposal made on the network.
(dict) --
Properties of a proposal.
Applies only to Hyperledger Fabric.
ProposalId (string) --
The unique identifier of the proposal.
Description (string) --
The description of the proposal.
ProposedByMemberId (string) --
The unique identifier of the member that created the proposal.
ProposedByMemberName (string) --
The name of the member that created the proposal.
Status (string) --
The status of the proposal. Values are as follows:
CreationDate (datetime) --
The date and time that the proposal was created.
ExpirationDate (datetime) --
The date and time that the proposal expires. This is the CreationDate plus the ProposalDurationInHours that is specified in the ProposalThresholdPolicy . After this date and time, if members have not cast enough votes to determine the outcome according to the voting policy, the proposal is EXPIRED and Actions are not carried out.
Arn (string) --
The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
NextToken (string) --
The pagination token that indicates the next set of results to retrieve.
Exceptions
Returns a list of tags for the specified resource. 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 .
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
{
'Tags': {
'string': 'string'
}
}
Response Structure
The tags assigned to the resource.
Exceptions
Rejects an invitation to join a network. This action can be called by a principal in an AWS account that has received an invitation to create a member and join a network.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.reject_invitation(
InvitationId='string'
)
[REQUIRED]
The unique identifier of the invitation to reject.
{}
Response Structure
Exceptions
Adds or overwrites the specified tags for the specified Amazon Managed Blockchain resource. Each tag consists of a key and optional value.
When you specify a tag key that already exists, the tag value is overwritten with the new value. Use UntagResource to remove tag keys.
A resource can have up to 50 tags. If you try to create more than 50 tags for a resource, your request fails and returns an error.
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 .
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
[REQUIRED]
The tags to assign to the specified resource. Tag values can be empty, for example, "MyTagKey" : "" . You can specify multiple key-value pairs in a single request, with an overall maximum of 50 tags added to each resource.
dict
Response Syntax
{}
Response Structure
Exceptions
Removes the specified tags from the Amazon Managed Blockchain resource.
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 .
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceArn='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource. For more information about ARNs and their format, see Amazon Resource Names (ARNs) in the AWS General Reference .
[REQUIRED]
The tag keys.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates a member configuration with new parameters.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.update_member(
NetworkId='string',
MemberId='string',
LogPublishingConfiguration={
'Fabric': {
'CaLogs': {
'Cloudwatch': {
'Enabled': True|False
}
}
}
}
)
[REQUIRED]
The unique identifier of the Managed Blockchain network to which the member belongs.
[REQUIRED]
The unique identifier of the member.
Configuration properties for publishing to Amazon CloudWatch Logs.
Configuration properties for logging events associated with a member of a Managed Blockchain network using the Hyperledger Fabric framework.
Configuration properties for logging events associated with a member's Certificate Authority (CA). CA logs help you determine when a member in your account joins the network, or when new peers register with a member CA.
Parameters for publishing logs to Amazon CloudWatch Logs.
Indicates whether logging is enabled.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates a node configuration with new parameters.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.update_node(
NetworkId='string',
MemberId='string',
NodeId='string',
LogPublishingConfiguration={
'Fabric': {
'ChaincodeLogs': {
'Cloudwatch': {
'Enabled': True|False
}
},
'PeerLogs': {
'Cloudwatch': {
'Enabled': True|False
}
}
}
}
)
[REQUIRED]
The unique identifier of the network that the node is on.
The unique identifier of the member that owns the node.
Applies only to Hyperledger Fabric.
[REQUIRED]
The unique identifier of the node.
Configuration properties for publishing to Amazon CloudWatch Logs.
Configuration properties for logging events associated with a node that is owned by a member of a Managed Blockchain network using the Hyperledger Fabric framework.
Configuration properties for logging events associated with chaincode execution on a peer node. Chaincode logs contain the results of instantiating, invoking, and querying the chaincode. A peer can run multiple instances of chaincode. When enabled, a log stream is created for all chaincodes, with an individual log stream for each chaincode.
Parameters for publishing logs to Amazon CloudWatch Logs.
Indicates whether logging is enabled.
Configuration properties for a peer node log. Peer node logs contain messages generated when your client submits transaction proposals to peer nodes, requests to join channels, enrolls an admin peer, and lists the chaincode instances on a peer node.
Parameters for publishing logs to Amazon CloudWatch Logs.
Indicates whether logging is enabled.
dict
Response Syntax
{}
Response Structure
Exceptions
Casts a vote for a specified ProposalId on behalf of a member. The member to vote as, specified by VoterMemberId , must be in the same AWS account as the principal that calls the action.
Applies only to Hyperledger Fabric.
See also: AWS API Documentation
Request Syntax
response = client.vote_on_proposal(
NetworkId='string',
ProposalId='string',
VoterMemberId='string',
Vote='YES'|'NO'
)
[REQUIRED]
The unique identifier of the network.
[REQUIRED]
The unique identifier of the proposal.
[REQUIRED]
The unique identifier of the member casting the vote.
[REQUIRED]
The value of the vote.
dict
Response Syntax
{}
Response Structure
Exceptions
The available paginators are: