Skip to content

Latest commit

 

History

History
1056 lines (627 loc) · 46.7 KB

File metadata and controls

1056 lines (627 loc) · 46.7 KB

API Reference

Constructs

HyperledgerFabricClient

Creates a VPC and endpoint that allows Hyperledger Fabric client to interact with the Hyperledger Fabric endpoints that Amazon Managed Blockchain exposes for the member and network resources.

Initializers

import { HyperledgerFabricClient } from 'cdk-hyperledger-fabric-network'

new HyperledgerFabricClient(scope: HyperledgerFabricNetwork, id: string, props?: HyperledgerFabricClientProps)
Name Type Description
scope* cdk-hyperledger-fabric-network.HyperledgerFabricNetwork No description.
id* string No description.
props cdk-hyperledger-fabric-network.HyperledgerFabricClientProps No description.

scopeRequired

idRequired
  • Type: string

propsOptional

Properties

Name Type Description
secretsManagerVpcEndpoint* aws-cdk-lib.aws_ec2.VpcEndpoint VPC endpoint to access Secret Manager.
vpc* aws-cdk-lib.aws_ec2.IVpc The client VPC that has endpoint to access the Amazon Managed Blockchain.
vpcEndpoint* aws-cdk-lib.aws_ec2.VpcEndpoint Managed Blockchain network VPC endpoint.

secretsManagerVpcEndpointRequired
public readonly secretsManagerVpcEndpoint: VpcEndpoint;

VPC endpoint to access Secret Manager.


vpcRequired
public readonly vpc: IVpc;

The client VPC that has endpoint to access the Amazon Managed Blockchain.


vpcEndpointRequired
public readonly vpcEndpoint: VpcEndpoint;

Managed Blockchain network VPC endpoint.


HyperledgerFabricNetwork

Creates a Hyperledger Fabric network on Amazon Managed Blockchain.

Initializers

import { HyperledgerFabricNetwork } from 'cdk-hyperledger-fabric-network'

new HyperledgerFabricNetwork(scope: Construct, id: string, props: HyperledgerFabricNetworkProps)
Name Type Description
scope* constructs.Construct No description.
id* string No description.
props* cdk-hyperledger-fabric-network.HyperledgerFabricNetworkProps No description.

scopeRequired

idRequired
  • Type: string

propsRequired

Properties

Name Type Description
adminPasswordSecret* aws-cdk-lib.aws_secretsmanager.Secret Secret ARN for the Hyperledger Fabric admin password.
adminPrivateKeySecret* aws-cdk-lib.aws_secretsmanager.Secret Secret for Hyperledger Fabric admin private key.
adminSignedCertSecret* aws-cdk-lib.aws_secretsmanager.Secret Secret for Hyperledger Fabric admin signed certificate.
caEndpoint* string Managed Blockchain member CA endpoint.
client* cdk-hyperledger-fabric-network.HyperledgerFabricClient The client network to interact with the Hyperledger Fabric network.
enableCaLogging* boolean The configuration to enable or disable certificate authority logging.
frameworkVersion* cdk-hyperledger-fabric-network.FrameworkVersion Hyperledger Fabric framework version.
memberDescription* string Managed Blockchain member description.
memberId* string Managed Blockchain member identifier generated on construction.
memberName* string Managed Blockchain member name.
networkDescription* string Managed Blockchain network description.
networkEdition* cdk-hyperledger-fabric-network.NetworkEdition Managed Blockchain network edition.
networkId* string Managed Blockchain network identifier generated on construction.
networkName* string Managed Blockchain network name.
nodes* cdk-hyperledger-fabric-network.HyperledgerFabricNode[] List of nodes created in the network.
ordererEndpoint* string Managed Blockchain network ordering service endpoint.
proposalDurationInHours* number The duration from the time that a proposal is created until it expires.
thresholdComparator* cdk-hyperledger-fabric-network.ThresholdComparator Determines whether the yes votes must be greater than the threshold percentage or must be greater than or equal to the threhold percentage to be approved.
thresholdPercentage* number The percentage of votes among all members that must be yes for a proposal to be approved.
vpcEndpointServiceName* string Managed Blockchain network VPC endpoint service name.

adminPasswordSecretRequired
public readonly adminPasswordSecret: Secret;

Secret ARN for the Hyperledger Fabric admin password.


adminPrivateKeySecretRequired
public readonly adminPrivateKeySecret: Secret;

Secret for Hyperledger Fabric admin private key.


adminSignedCertSecretRequired
public readonly adminSignedCertSecret: Secret;

Secret for Hyperledger Fabric admin signed certificate.


caEndpointRequired
public readonly caEndpoint: string;
  • Type: string

Managed Blockchain member CA endpoint.


clientRequired
public readonly client: HyperledgerFabricClient;

The client network to interact with the Hyperledger Fabric network.


enableCaLoggingRequired
public readonly enableCaLogging: boolean;
  • Type: boolean

The configuration to enable or disable certificate authority logging.


frameworkVersionRequired
public readonly frameworkVersion: FrameworkVersion;

Hyperledger Fabric framework version.


memberDescriptionRequired
public readonly memberDescription: string;
  • Type: string

Managed Blockchain member description.


memberIdRequired
public readonly memberId: string;
  • Type: string

Managed Blockchain member identifier generated on construction.


memberNameRequired
public readonly memberName: string;
  • Type: string

Managed Blockchain member name.


networkDescriptionRequired
public readonly networkDescription: string;
  • Type: string

Managed Blockchain network description.


networkEditionRequired
public readonly networkEdition: NetworkEdition;

Managed Blockchain network edition.


networkIdRequired
public readonly networkId: string;
  • Type: string

Managed Blockchain network identifier generated on construction.


networkNameRequired
public readonly networkName: string;
  • Type: string

Managed Blockchain network name.


nodesRequired
public readonly nodes: HyperledgerFabricNode[];

List of nodes created in the network.


ordererEndpointRequired
public readonly ordererEndpoint: string;
  • Type: string

Managed Blockchain network ordering service endpoint.


proposalDurationInHoursRequired
public readonly proposalDurationInHours: number;
  • Type: number

The duration from the time that a proposal is created until it expires.


thresholdComparatorRequired
public readonly thresholdComparator: ThresholdComparator;

Determines whether the yes votes must be greater than the threshold percentage or must be greater than or equal to the threhold percentage to be approved.


thresholdPercentageRequired
public readonly thresholdPercentage: number;
  • Type: number

The percentage of votes among all members that must be yes for a proposal to be approved.


vpcEndpointServiceNameRequired
public readonly vpcEndpointServiceName: string;
  • Type: string

Managed Blockchain network VPC endpoint service name.


HyperledgerFabricNode

Creates a Hyperledger Fabric node on an Amazon Managed Blockchain network.

Initializers

import { HyperledgerFabricNode } from 'cdk-hyperledger-fabric-network'

new HyperledgerFabricNode(scope: HyperledgerFabricNetwork, id: string, props?: HyperledgerFabricNodeProps)
Name Type Description
scope* cdk-hyperledger-fabric-network.HyperledgerFabricNetwork No description.
id* string No description.
props cdk-hyperledger-fabric-network.HyperledgerFabricNodeProps No description.

scopeRequired

idRequired
  • Type: string

propsOptional

Methods

Name Description
configureLogging No description.
fetchData No description.

configureLogging
public configureLogging(sdkCallPolicy: AwsCustomResourcePolicy)
sdkCallPolicyRequired

fetchData
public fetchData(dataSdkCallPolicy: AwsCustomResourcePolicy)
dataSdkCallPolicyRequired

Static Functions

Name Description
constructNodes No description.

constructNodes
import { HyperledgerFabricNode } from 'cdk-hyperledger-fabric-network'

HyperledgerFabricNode.constructNodes(scope: HyperledgerFabricNetwork, nodeProps?: HyperledgerFabricNodeProps[])
scopeRequired

nodePropsOptional

Properties

Name Type Description
availabilityZone* string The Availability Zone in which the node exists.
enableChaincodeLogging* boolean The configuration to enable or disable chaincode logging.
enableNodeLogging* boolean The configuration to enable or disable node logging.
instanceType* cdk-hyperledger-fabric-network.InstanceType The Amazon Managed Blockchain instance type for the node.
memberId* string Managed Blockchain member identifier.
networkId* string Managed Blockchain network identifier.
nodeId* string Managed Blockchain node identifier generated on construction.
endpoint* string No description.
eventEndpoint* string No description.

availabilityZoneRequired
public readonly availabilityZone: string;
  • Type: string

The Availability Zone in which the node exists.


enableChaincodeLoggingRequired
public readonly enableChaincodeLogging: boolean;
  • Type: boolean

The configuration to enable or disable chaincode logging.


enableNodeLoggingRequired
public readonly enableNodeLogging: boolean;
  • Type: boolean

The configuration to enable or disable node logging.


instanceTypeRequired
public readonly instanceType: InstanceType;

The Amazon Managed Blockchain instance type for the node.


memberIdRequired
public readonly memberId: string;
  • Type: string

Managed Blockchain member identifier.


networkIdRequired
public readonly networkId: string;
  • Type: string

Managed Blockchain network identifier.


nodeIdRequired
public readonly nodeId: string;
  • Type: string

Managed Blockchain node identifier generated on construction.


endpointRequired
public readonly endpoint: string;
  • Type: string

eventEndpointRequired
public readonly eventEndpoint: string;
  • Type: string

Structs

HyperledgerFabricClientProps

Construct properties for HyperledgerFabricVpc.

Initializer

import { HyperledgerFabricClientProps } from 'cdk-hyperledger-fabric-network'

const hyperledgerFabricClientProps: HyperledgerFabricClientProps = { ... }

Properties

Name Type Description
vpc aws-cdk-lib.aws_ec2.IVpc Client VPC to create the endpoints.

vpcOptional
public readonly vpc: IVpc;

Client VPC to create the endpoints.

If not provided, VPC will be created with the default properties (CIDR-10.0.0.0/16 and subnets of type PRIVATE_ISOLATED)


HyperledgerFabricNetworkProps

Construct properties for HyperledgerFabricNetwork.

Initializer

import { HyperledgerFabricNetworkProps } from 'cdk-hyperledger-fabric-network'

const hyperledgerFabricNetworkProps: HyperledgerFabricNetworkProps = { ... }

Properties

Name Type Description
memberName* string Managed Blockchain member name.
networkName* string Managed Blockchain network name.
client cdk-hyperledger-fabric-network.HyperledgerFabricClientProps The Client network to interact with the Hyperledger Fabric network.
enableCaLogging boolean The configuration to enable or disable certificate authority logging.
frameworkVersion cdk-hyperledger-fabric-network.FrameworkVersion Hyperledger Fabric framework version.
memberDescription string Managed Blockchain member description.
networkDescription string Managed Blockchain network description.
networkEdition cdk-hyperledger-fabric-network.NetworkEdition Managed Blockchain network edition.
nodes cdk-hyperledger-fabric-network.HyperledgerFabricNodeProps[] List of nodes to create on the network.
proposalDurationInHours number The duration from the time that a proposal is created until it expires.
thresholdComparator cdk-hyperledger-fabric-network.ThresholdComparator Determines whether the yes votes must be greater than the threshold percentage or must be greater than or equal to the threhold percentage to be approved.
thresholdPercentage number The percentage of votes among all members that must be yes for a proposal to be approved.

memberNameRequired
public readonly memberName: string;
  • Type: string

Managed Blockchain member name.


networkNameRequired
public readonly networkName: string;
  • Type: string

Managed Blockchain network name.


clientOptional
public readonly client: HyperledgerFabricClientProps;

The Client network to interact with the Hyperledger Fabric network.


enableCaLoggingOptional
public readonly enableCaLogging: boolean;
  • Type: boolean
  • Default: true

The configuration to enable or disable certificate authority logging.


frameworkVersionOptional
public readonly frameworkVersion: FrameworkVersion;

Hyperledger Fabric framework version.


memberDescriptionOptional
public readonly memberDescription: string;
  • Type: string
  • Default: Set to match member name

Managed Blockchain member description.


networkDescriptionOptional
public readonly networkDescription: string;
  • Type: string
  • Default: Set to match network name

Managed Blockchain network description.


networkEditionOptional
public readonly networkEdition: NetworkEdition;

Managed Blockchain network edition.


nodesOptional
public readonly nodes: HyperledgerFabricNodeProps[];

List of nodes to create on the network.


proposalDurationInHoursOptional
public readonly proposalDurationInHours: number;
  • Type: number
  • Default: 24 hours

The duration from the time that a proposal is created until it expires.


thresholdComparatorOptional
public readonly thresholdComparator: ThresholdComparator;

Determines whether the yes votes must be greater than the threshold percentage or must be greater than or equal to the threhold percentage to be approved.


thresholdPercentageOptional
public readonly thresholdPercentage: number;
  • Type: number
  • Default: 50 percent

The percentage of votes among all members that must be yes for a proposal to be approved.


HyperledgerFabricNodeProps

Construct properties for HyperledgerFabricNode.

Initializer

import { HyperledgerFabricNodeProps } from 'cdk-hyperledger-fabric-network'

const hyperledgerFabricNodeProps: HyperledgerFabricNodeProps = { ... }

Properties

Name Type Description
availabilityZone string The Availability Zone in which the node will be created.
enableChaincodeLogging boolean The configuration to enable or disable chaincode logging.
enableNodeLogging boolean The configuration to enable or disable node logging.
instanceType cdk-hyperledger-fabric-network.InstanceType The Amazon Managed Blockchain instance type for the node.

availabilityZoneOptional
public readonly availabilityZone: string;
  • Type: string
  • Default: The first AZ in the region

The Availability Zone in which the node will be created.


enableChaincodeLoggingOptional
public readonly enableChaincodeLogging: boolean;
  • Type: boolean
  • Default: true

The configuration to enable or disable chaincode logging.


enableNodeLoggingOptional
public readonly enableNodeLogging: boolean;
  • Type: boolean
  • Default: true

The configuration to enable or disable node logging.


instanceTypeOptional
public readonly instanceType: InstanceType;

The Amazon Managed Blockchain instance type for the node.


Enums

FrameworkVersion

Name Description
VERSION_1_2 No description.
VERSION_1_4 No description.

VERSION_1_2


VERSION_1_4


InstanceType

Name Description
BURSTABLE3_SMALL No description.
BURSTABLE3_MEDIUM No description.
BURSTABLE3_LARGE No description.
BURSTABLE3_XLARGE No description.
STANDARD5_LARGE No description.
STANDARD5_XLARGE No description.
STANDARD5_XLARGE2 No description.
STANDARD5_XLARGE4 No description.
COMPUTE5_LARGE No description.
COMPUTE5_XLARGE No description.
COMPUTE5_XLARGE2 No description.
COMPUTE5_XLARGE4 No description.

Supported instance types for Managed Blockchain nodes.

BURSTABLE3_SMALL


BURSTABLE3_MEDIUM


BURSTABLE3_LARGE


BURSTABLE3_XLARGE


STANDARD5_LARGE


STANDARD5_XLARGE


STANDARD5_XLARGE2


STANDARD5_XLARGE4


COMPUTE5_LARGE


COMPUTE5_XLARGE


COMPUTE5_XLARGE2


COMPUTE5_XLARGE4


NetworkEdition

Name Description
STARTER No description.
STANDARD No description.

STARTER


STANDARD


ThresholdComparator

Name Description
GREATER_THAN No description.
GREATER_THAN_OR_EQUAL_TO No description.

GREATER_THAN


GREATER_THAN_OR_EQUAL_TO