# 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
ocvp_client = OCI::Ocvp::SddcClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
create_sddc_response =
  ocvp_client.create_sddc(
    OCI::Ocvp::Models::CreateSddcDetails.new(
      vmware_software_version: 'EXAMPLE-vmwareSoftwareVersion-Value',
      compartment_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
      hcx_mode: 'ENTERPRISE',
      initial_configuration:
        OCI::Ocvp::Models::InitialConfiguration.new(
          initial_cluster_configurations: [
            OCI::Ocvp::Models::InitialClusterConfiguration.new(
              vsphere_type: 'MANAGEMENT',
              compute_availability_domain:
                'EXAMPLE-computeAvailabilityDomain-Value',
              esxi_hosts_count: 5,
              network_configuration:
                OCI::Ocvp::Models::NetworkConfiguration.new(
                  provisioning_subnet_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-provisioningSubnetId-Value',
                  vmotion_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-vmotionVlanId-Value',
                  vsan_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-vsanVlanId-Value',
                  nsx_v_tep_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-nsxVTepVlanId-Value',
                  nsx_edge_v_tep_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-nsxEdgeVTepVlanId-Value',
                  vsphere_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-vsphereVlanId-Value',
                  nsx_edge_uplink1_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-nsxEdgeUplink1VlanId-Value',
                  nsx_edge_uplink2_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-nsxEdgeUplink2VlanId-Value',
                  replication_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-replicationVlanId-Value',
                  provisioning_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-provisioningVlanId-Value',
                  hcx_vlan_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-hcxVlanId-Value'
                ),
              display_name: 'EXAMPLE-displayName-Value',
              instance_display_name_prefix:
                'EXAMPLE-instanceDisplayNamePrefix-Value',
              initial_commitment: 'MONTH',
              workload_network_cidr: 'EXAMPLE-workloadNetworkCidr-Value',
              initial_host_shape_name: 'EXAMPLE-initialHostShapeName-Value',
              initial_host_ocpu_count: 1454.8116,
              is_shielded_instance_enabled: true,
              capacity_reservation_id:
                'ocid1.test.oc1..<unique_ID>EXAMPLE-capacityReservationId-Value',
              datastores: [
                OCI::Ocvp::Models::DatastoreInfo.new(
                  block_volume_ids: %w[EXAMPLE--Value],
                  datastore_type: 'WORKLOAD'
                )
              ],
              datastore_cluster_ids: %w[EXAMPLE--Value],
              cluster_byol_allocation_details:
                OCI::Ocvp::Models::ClusterByolAllocationDetails.new(
                  vsan_byol_allocation_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-vsanByolAllocationId-Value',
                  firewall_byol_allocation_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-firewallByolAllocationId-Value'
                ),
              initial_vcf_byol_allocation_id:
                'ocid1.test.oc1..<unique_ID>EXAMPLE-initialVcfByolAllocationId-Value'
            )
          ]
        ),
      ssh_authorized_keys: 'EXAMPLE-sshAuthorizedKeys-Value',
      display_name: 'EXAMPLE-displayName-Value',
      esxi_software_version: 'EXAMPLE-esxiSoftwareVersion-Value',
      is_single_host_sddc: true,
      sddc_byol_allocation_details:
        OCI::Ocvp::Models::SddcByolAllocationDetails.new(
          load_balancer_byol_allocation_id:
            'ocid1.test.oc1..<unique_ID>EXAMPLE-loadBalancerByolAllocationId-Value',
          load_balancer_instance_count: 792
        ),
      freeform_tags: {
        'EXAMPLE_KEY_v0e7y' => 'EXAMPLE_VALUE_mx307mW9hX9HTOXpYFco'
      },
      defined_tags: {
        'EXAMPLE_KEY_jDV7Y' => { 'EXAMPLE_KEY_cqURi' => 'EXAMPLE--Value' }
      }
    )
  )

# Get the data from response
puts "#{create_sddc_response.headers}"