Class: AWSCDK::ManagedBlockchain::CfnNodeProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
managed_blockchain/cfn_node_props.rb

Overview

Properties for defining a CfnNode.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(network_id:, node_configuration:, member_id: nil) ⇒ CfnNodeProps

Returns a new instance of CfnNodeProps.

Parameters:



12
13
14
15
16
17
18
19
# File 'managed_blockchain/cfn_node_props.rb', line 12

def initialize(network_id:, node_configuration:, member_id: nil)
  @network_id = network_id
  Jsii::Type.check_type(@network_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkId")
  @node_configuration = node_configuration.is_a?(Hash) ? ::AWSCDK::ManagedBlockchain::CfnNode::NodeConfigurationProperty.new(**node_configuration.transform_keys(&:to_sym)) : node_configuration
  Jsii::Type.check_type(@node_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19tYW5hZ2VkYmxvY2tjaGFpbi5DZm5Ob2RlLk5vZGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "nodeConfiguration")
  @member_id = member_id
  Jsii::Type.check_type(@member_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "memberId") unless @member_id.nil?
end

Instance Attribute Details

#member_idString? (readonly)

The unique identifier of the member to which the node belongs.

Applies only to Hyperledger Fabric.



41
42
43
# File 'managed_blockchain/cfn_node_props.rb', line 41

def member_id
  @member_id
end

#network_idString (readonly)

The unique identifier of the network for the node.

Ethereum public networks have the following NetworkId s:

  • n-ethereum-mainnet


29
30
31
# File 'managed_blockchain/cfn_node_props.rb', line 29

def network_id
  @network_id
end

#node_configurationAWSCDK::IResolvable, AWSCDK::ManagedBlockchain::CfnNode::NodeConfigurationProperty (readonly)

Configuration properties of a peer node.



34
35
36
# File 'managed_blockchain/cfn_node_props.rb', line 34

def node_configuration
  @node_configuration
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
# File 'managed_blockchain/cfn_node_props.rb', line 43

def self.jsii_properties
  {
    :network_id => "networkId",
    :node_configuration => "nodeConfiguration",
    :member_id => "memberId",
  }
end

Instance Method Details

#to_jsiiObject



51
52
53
54
55
56
57
58
59
# File 'managed_blockchain/cfn_node_props.rb', line 51

def to_jsii
  result = {}
  result.merge!({
    "networkId" => @network_id,
    "nodeConfiguration" => @node_configuration,
    "memberId" => @member_id,
  })
  result.compact
end