# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).
require 'oci'
# Create a default config using DEFAULT profile in default location
# Refer to https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File for more info
config = OCI::ConfigFileLoader.load_config
# Initialize service client with default config file
blockchain_client =
OCI::Blockchain::BlockchainPlatformClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
scale_blockchain_platform_response =
blockchain_client.scale_blockchain_platform(
'ocid1.test.oc1..<unique_ID>EXAMPLE-blockchainPlatformId-Value',
OCI::Blockchain::Models::ScaleBlockchainPlatformDetails.new(
add_osns: [
OCI::Blockchain::Models::CreateOsnDetails.new(
ad: 'AD3',
ocpu_allocation_param:
OCI::Blockchain::Models::OcpuAllocationNumberParam.new(
ocpu_allocation_number: 5.5096016
)
)
],
add_replicas:
OCI::Blockchain::Models::ReplicaDetails.new(
proxy_count: 3, ca_count: 2, console_count: 6
),
add_peers: [
OCI::Blockchain::Models::CreatePeerDetails.new(
role: 'ADMIN',
ocpu_allocation_param:
OCI::Blockchain::Models::OcpuAllocationNumberParam.new(
ocpu_allocation_number: 40.82605
),
ad: 'AD2',
alias: 'EXAMPLE-alias-Value'
)
],
add_storage:
OCI::Blockchain::Models::ScaleStorageDetails.new(
storage_size_in_tbs: 66
),
modify_peers: [
OCI::Blockchain::Models::ModifyPeerDetails.new(
peer_name: 'EXAMPLE-peerName-Value',
ocpu_allocation_param:
OCI::Blockchain::Models::OcpuAllocationNumberParam.new(
ocpu_allocation_number: 42.93121
)
)
],
remove_replicas:
OCI::Blockchain::Models::ReplicaDetails.new(
proxy_count: 2, ca_count: 3, console_count: 9
),
remove_osns: %w[EXAMPLE--Value],
remove_peers: %w[EXAMPLE--Value]
)
)
# Get the data from response
puts "#{scale_blockchain_platform_response.headers}"