VotingPolicyProperty Struct
The voting rules for the network to decide if a proposal is accepted.
Applies only to Hyperledger Fabric.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_managedblockchain as managedblockchain } from 'aws-cdk-lib';
const votingPolicyProperty: managedblockchain.CfnMember.VotingPolicyProperty = {
approvalThresholdPolicy: {
proposalDurationInHours: 123,
thresholdComparator: 'thresholdComparator',
thresholdPercentage: 123,
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_managedblockchain as managedblockchain
voting_policy_property = managedblockchain.CfnMember.VotingPolicyProperty(
approval_threshold_policy=managedblockchain.CfnMember.ApprovalThresholdPolicyProperty(
proposal_duration_in_hours=123,
threshold_comparator="thresholdComparator",
threshold_percentage=123
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.managedblockchain.*;
VotingPolicyProperty votingPolicyProperty = VotingPolicyProperty.builder()
.approvalThresholdPolicy(ApprovalThresholdPolicyProperty.builder()
.proposalDurationInHours(123)
.thresholdComparator("thresholdComparator")
.thresholdPercentage(123)
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ManagedBlockchain;
var votingPolicyProperty = new VotingPolicyProperty {
ApprovalThresholdPolicy = new ApprovalThresholdPolicyProperty {
ProposalDurationInHours = 123,
ThresholdComparator = "thresholdComparator",
ThresholdPercentage = 123
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
votingPolicyProperty := &VotingPolicyProperty{
ApprovalThresholdPolicy: &ApprovalThresholdPolicyProperty{
ProposalDurationInHours: jsii.Number(123),
ThresholdComparator: jsii.String("thresholdComparator"),
ThresholdPercentage: jsii.Number(123),
},
}
Properties
approvalThresholdPolicyoptionalIResolvable | CfnMember.approval_threshold_policyoptionaltyping.Union[IResolvable, ApprovalThresholdPolicyProperty]approvalThresholdPolicyoptionalIResolvableApprovalThresholdPolicyoptionalIResolvableApprovalThresholdPolicyoptionalinterface{} #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.