io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork Maven / Gradle / Ivy
Show all versions of cdk-hyperledger-fabric-network Show documentation
package io.github.cdklabs.cdkhyperledgerfabricnetwork;
/**
* Creates a Hyperledger Fabric network on Amazon Managed Blockchain.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-14T00:24:56.702Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkhyperledgerfabricnetwork.$Module.class, fqn = "@cdklabs/cdk-hyperledger-fabric-network.HyperledgerFabricNetwork")
public class HyperledgerFabricNetwork extends software.constructs.Construct {
protected HyperledgerFabricNetwork(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected HyperledgerFabricNetwork(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public HyperledgerFabricNetwork(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetworkProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* Secret ARN for the Hyperledger Fabric admin password.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.secretsmanager.Secret getAdminPasswordSecret() {
return software.amazon.jsii.Kernel.get(this, "adminPasswordSecret", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.Secret.class));
}
/**
* Secret for Hyperledger Fabric admin private key.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.secretsmanager.Secret getAdminPrivateKeySecret() {
return software.amazon.jsii.Kernel.get(this, "adminPrivateKeySecret", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.Secret.class));
}
/**
* Secret for Hyperledger Fabric admin signed certificate.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.secretsmanager.Secret getAdminSignedCertSecret() {
return software.amazon.jsii.Kernel.get(this, "adminSignedCertSecret", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.Secret.class));
}
/**
* Managed Blockchain member CA endpoint.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getCaEndpoint() {
return software.amazon.jsii.Kernel.get(this, "caEndpoint", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The client network to interact with the Hyperledger Fabric network.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricClient getClient() {
return software.amazon.jsii.Kernel.get(this, "client", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricClient.class));
}
/**
* The configuration to enable or disable certificate authority logging.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Boolean getEnableCaLogging() {
return software.amazon.jsii.Kernel.get(this, "enableCaLogging", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* Configuration to enable/disable admin user enrollment.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Boolean getEnrollAdmin() {
return software.amazon.jsii.Kernel.get(this, "enrollAdmin", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* Hyperledger Fabric framework version.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.FrameworkVersion getFrameworkVersion() {
return software.amazon.jsii.Kernel.get(this, "frameworkVersion", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.FrameworkVersion.class));
}
/**
* Managed Blockchain member description.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getMemberDescription() {
return software.amazon.jsii.Kernel.get(this, "memberDescription", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Managed Blockchain member identifier generated on construction.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getMemberId() {
return software.amazon.jsii.Kernel.get(this, "memberId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Managed Blockchain member name.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getMemberName() {
return software.amazon.jsii.Kernel.get(this, "memberName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Managed Blockchain network description.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getNetworkDescription() {
return software.amazon.jsii.Kernel.get(this, "networkDescription", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Managed Blockchain network edition.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.NetworkEdition getNetworkEdition() {
return software.amazon.jsii.Kernel.get(this, "networkEdition", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.NetworkEdition.class));
}
/**
* Managed Blockchain network identifier generated on construction.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getNetworkId() {
return software.amazon.jsii.Kernel.get(this, "networkId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Managed Blockchain network name.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getNetworkName() {
return software.amazon.jsii.Kernel.get(this, "networkName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* List of nodes created in the network.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.util.List getNodes() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "nodes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNode.class))));
}
/**
* Managed Blockchain network ordering service endpoint.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getOrdererEndpoint() {
return software.amazon.jsii.Kernel.get(this, "ordererEndpoint", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The duration from the time that a proposal is created until it expires.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Number getProposalDurationInHours() {
return software.amazon.jsii.Kernel.get(this, "proposalDurationInHours", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
}
/**
* 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.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkhyperledgerfabricnetwork.ThresholdComparator getThresholdComparator() {
return software.amazon.jsii.Kernel.get(this, "thresholdComparator", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.ThresholdComparator.class));
}
/**
* The percentage of votes among all members that must be yes for a proposal to be approved.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Number getThresholdPercentage() {
return software.amazon.jsii.Kernel.get(this, "thresholdPercentage", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
}
/**
* List of users registered with CA.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.util.List getUsers() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "users", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUser.class))));
}
/**
* Managed Blockchain network VPC endpoint service name.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getVpcEndpointServiceName() {
return software.amazon.jsii.Kernel.get(this, "vpcEndpointServiceName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* A fluent builder for {@link io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetworkProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetworkProps.Builder();
}
/**
* Managed Blockchain member name.
*
* @return {@code this}
* @param memberName Managed Blockchain member name. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder memberName(final java.lang.String memberName) {
this.props.memberName(memberName);
return this;
}
/**
* Managed Blockchain network name.
*
* @return {@code this}
* @param networkName Managed Blockchain network name. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder networkName(final java.lang.String networkName) {
this.props.networkName(networkName);
return this;
}
/**
* The Client network to interact with the Hyperledger Fabric network.
*
* Default: - Client network with Default properties
* (CIDR-`10.0.0.0/16` and subnets of type `PRIVATE_ISOLATED`)
*
* @return {@code this}
* @param client The Client network to interact with the Hyperledger Fabric network. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder client(final io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricClientProps client) {
this.props.client(client);
return this;
}
/**
* The configuration to enable or disable certificate authority logging.
*
* Default: - true
*
* @return {@code this}
* @param enableCaLogging The configuration to enable or disable certificate authority logging. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enableCaLogging(final java.lang.Boolean enableCaLogging) {
this.props.enableCaLogging(enableCaLogging);
return this;
}
/**
* Configuration to enable/disable enrollment of admin user.
*
* Default: - true
*
* @return {@code this}
* @param enrollAdmin Configuration to enable/disable enrollment of admin user. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enrollAdmin(final java.lang.Boolean enrollAdmin) {
this.props.enrollAdmin(enrollAdmin);
return this;
}
/**
* Hyperledger Fabric framework version.
*
* Default: - FrameworkVersion.VERSION_1_4
*
* @return {@code this}
* @param frameworkVersion Hyperledger Fabric framework version. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder frameworkVersion(final io.github.cdklabs.cdkhyperledgerfabricnetwork.FrameworkVersion frameworkVersion) {
this.props.frameworkVersion(frameworkVersion);
return this;
}
/**
* Managed Blockchain member description.
*
* Default: - Set to match member name
*
* @return {@code this}
* @param memberDescription Managed Blockchain member description. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder memberDescription(final java.lang.String memberDescription) {
this.props.memberDescription(memberDescription);
return this;
}
/**
* Managed Blockchain network description.
*
* Default: - Set to match network name
*
* @return {@code this}
* @param networkDescription Managed Blockchain network description. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder networkDescription(final java.lang.String networkDescription) {
this.props.networkDescription(networkDescription);
return this;
}
/**
* Managed Blockchain network edition.
*
* Default: - NetworkEdition.STANDARD
*
* @return {@code this}
* @param networkEdition Managed Blockchain network edition. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder networkEdition(final io.github.cdklabs.cdkhyperledgerfabricnetwork.NetworkEdition networkEdition) {
this.props.networkEdition(networkEdition);
return this;
}
/**
* List of nodes to create on the network.
*
* Default: - One node with default configuration
*
* @return {@code this}
* @param nodes List of nodes to create on the network. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder nodes(final java.util.List extends io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNodeProps> nodes) {
this.props.nodes(nodes);
return this;
}
/**
* The duration from the time that a proposal is created until it expires.
*
* Default: - 24 hours
*
* @return {@code this}
* @param proposalDurationInHours The duration from the time that a proposal is created until it expires. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder proposalDurationInHours(final java.lang.Number proposalDurationInHours) {
this.props.proposalDurationInHours(proposalDurationInHours);
return this;
}
/**
* 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.
*
* Default: - GREATER_THAN
*
* @return {@code this}
* @param 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. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder thresholdComparator(final io.github.cdklabs.cdkhyperledgerfabricnetwork.ThresholdComparator thresholdComparator) {
this.props.thresholdComparator(thresholdComparator);
return this;
}
/**
* The percentage of votes among all members that must be yes for a proposal to be approved.
*
* Default: - 50 percent
*
* @return {@code this}
* @param thresholdPercentage The percentage of votes among all members that must be yes for a proposal to be approved. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder thresholdPercentage(final java.lang.Number thresholdPercentage) {
this.props.thresholdPercentage(thresholdPercentage);
return this;
}
/**
* List of users to register with Fabric CA Note: enrollAdmin property has to be enabled for registering users.
*
* @return {@code this}
* @param users List of users to register with Fabric CA Note: enrollAdmin property has to be enabled for registering users. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder users(final java.util.List extends io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricUserProps> users) {
this.props.users(users);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork build() {
return new io.github.cdklabs.cdkhyperledgerfabricnetwork.HyperledgerFabricNetwork(
this.scope,
this.id,
this.props.build()
);
}
}
}