Class: AWSCDK::ManagedBlockchain::CfnAccessorProps

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

Overview

Properties for defining a CfnAccessor.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(accessor_type:, network_type: nil, tags: nil) ⇒ CfnAccessorProps

Returns a new instance of CfnAccessorProps.

Parameters:

  • accessor_type (String)

    The type of the accessor.

  • network_type (String, nil) (defaults to: nil)

    The blockchain network that the Accessor token is created for.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags assigned to the Accessor.



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

def initialize(accessor_type:, network_type: nil, tags: nil)
  @accessor_type = accessor_type
  Jsii::Type.check_type(@accessor_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessorType")
  @network_type = network_type
  Jsii::Type.check_type(@network_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkType") unless @network_type.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#accessor_typeString (readonly)

The type of the accessor.

Currently, accessor type is restricted to BILLING_TOKEN .



27
28
29
# File 'managed_blockchain/cfn_accessor_props.rb', line 27

def accessor_type
  @accessor_type
end

#network_typeString? (readonly)

The blockchain network that the Accessor token is created for.

We recommend using the appropriate network_type value for the blockchain network that you are creating the Accessor token for. You cannot use the value ETHEREUM_MAINNET_AND_GOERLI to specify a network_type for your Accessor token.

The default value of ETHEREUM_MAINNET_AND_GOERLI is only applied:

  • when the CreateAccessor action does not set a network_type .
  • to all existing Accessor tokens that were created before the network_type property was introduced.


39
40
41
# File 'managed_blockchain/cfn_accessor_props.rb', line 39

def network_type
  @network_type
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags assigned to the Accessor.

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 .



46
47
48
# File 'managed_blockchain/cfn_accessor_props.rb', line 46

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



48
49
50
51
52
53
54
# File 'managed_blockchain/cfn_accessor_props.rb', line 48

def self.jsii_properties
  {
    :accessor_type => "accessorType",
    :network_type => "networkType",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
# File 'managed_blockchain/cfn_accessor_props.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "accessorType" => @accessor_type,
    "networkType" => @network_type,
    "tags" => @tags,
  })
  result.compact
end