Create VM clusters

This page describes how to create a VM Cluster in Google Cloud.

In Oracle Database@Google Cloud, you can create a VM Cluster in Google Cloud using Google Cloud console or the Oracle Database@Google Cloud API. You'll need to create an Exadata Infrastructure instance before you can create a VM Cluster. To learn more about how to create a Exadata Infrastructure instance, see Create instances .

After you create a VM Cluster, you can create an Oracle Database for your VM Cluster with Oracle Cloud Infrastructure (OCI).

To learn more about Oracle Database@Google Cloud, see Product overview . For a list of available regions, see Available configurations .

Before you begin

Create a VM cluster

To create a VM Cluster, do the following:

Console

  1. Go to the Exadata Database Servicepage.

    Go to Exadata Database Service

  2. Select the Exadata VM Clusterstab.

  3. In the Exadata VM Clusterssection, click Create.

  4. In the Infrastructure projectselector, select the Google Cloud project that contains the Exadata Infrastructure in which you want to create your VM Cluster.

    The project selector doesn't display the resources of a project. Therefore, know the name of your project that contains your Exadata Infrastructure. By default, the current project is selected.

    The project selector shows projects based on the IAM roles and permissions that you have. If you don't have the required permissions to view a project, then that project doesn't appear in the list. Contact your administrator to grant you the required permissions .

  5. From the Oracle Exadata Databasedrop-down list, select your Exadata Infrastructure. If the project that you selected doesn't contain any Exadata Infrastructure, this field is disabled.

  6. In the Basic detailssection, do the following:

    1. Enter a Display namefor your VM Cluster. This name appears in the Google Cloud console. The display name must be unique within your Google Cloud project.

    2. Enter a VM Cluster IDas a unique identifier for your cluster. The VM Cluster ID can't be changed later.

    3. Optional: Enter a name for your cluster.

  7. From the menu, select the Oracle Grid Infrastructure version.

  8. To select an Exadata guest OS version that's optimized for your VMs, do the following:

    • Click Change image.
    • On the Change imagepage, select the Oracle Exadata image version.
    • Click Save.
  9. In the VM Cluster configurationsection, do the following:

    1. To select the database servers for VM placement, click Change DB Servers. You must select at least one database server.

      Only database servers that are available in the Exadata Infrastructure can be selected. Once you select the DB servers, click Submitto save.

    2. Enter the OCPU count per VMfor your cluster. The OCPU count can range from 2 to 126.

    3. Enter the Memory per VMfor your cluster. The memory count can range from 30GB to 1,390GB.

    4. Enter the Local storage per VMfor your cluster. The local storage count can range from 60GB to 1,800GB.

  10. In the Exadata storage configurationsection, do the following:

    1. Enter the Usable Exadata Storagefor your cluster. This can range from 2TB to 100TB and must be specified in multiples of 1TB.

    2. Check the box for Allocate storage for sparse snapshotsto allow storage to be utilized for sparse snapshots. This setting can't be changed after the VM Cluster has been created.

    3. Check the box for Allocate storage for local backupsto allow your cluster storage to be used for local backups. This setting can't be changed after the VM Cluster has been created.

  11. In the Networkingsection, define the network configuration for the VM Cluster by completing the following:

    1. From the Network projectlist, select the project that contains your ODB Network.

    2. Select the ODB Network.

    3. Select a Client subnet.

    4. Select a Backup subnet.

    5. In the Hostname prefix, specify a prefix you want to use to generate hostnames for the VM Cluster virtual machines. This prefix can only contain letters, numbers, or hyphens, and must start with a letter. The maximum allowed length is 12 characters.

  12. In the SSH keyssection, add the public SSH keys you'd like to use for the cluster. To add a key, enter the SSH key name in the SSH Key 1field. For each additional key, click ADD ITEM.

    For more information on how to generate SSH keys, see Generate SSH keys .

  13. In the License typesection, select the type of Oracle license you're using for your cluster. Select one of the following:

    1. License includedif you use a new license purchased as part of the Google Cloud marketplace order.

    2. Bring your own license (BYOL)if you use an existing Oracle license.

  14. In the Diagnostics collectionsection, do the following to configure monitoring for your VM Cluster:

    1. Select the Enable diagnostic eventscheckbox to track all cluster diagnostic events.

    2. Select the Enable health monitoringcheckbox to use the monitoring console to monitor cluster health metrics.

    3. Select the Enable incident logs and trace collectioncheckbox to enable incident logging for your cluster.

  15. In the Advanced fieldssection, do the following:

    1. From the Timezonedrop-down, select the timezone you'd like to use for diagnostic collection. This timezone is used for event timestamps.

    2. In the SCAN Listener Port (TCP/IP)field, enter a value to assign a SCAN listener port to your cluster. The port value can range from 1,024 to 8,000, and the default value is 1,521.

  16. Click Createto create the VM Cluster.

gcloud

Use the gcloud oracle-database cloud-vm-clusters create command to create a cluster.

  gcloud 
  
 oracle 
 - 
 database 
  
 cloud 
 - 
 vm 
 - 
 clusters 
  
 create 
  
  CLUSTER_ID 
 
  
\  
 -- 
 exadata 
 - 
 infrastructure 
 = 
 projects 
 / 
  PROJECT_ID 
 
 / 
 locations 
 / 
  REGION 
 
 / 
 cloudExadataInfrastructures 
 / 
  EXADATA_INSTANCE_ID 
 
  
\  
 -- 
 project 
 = 
  PROJECT_ID 
 
  
\  
 -- 
 location 
 = 
  REGION 
 
  
\  
 -- 
 display 
 - 
 name 
 = 
 " DISPLAY_NAME 
" 
  
\  
 -- 
 odb 
 - 
 subnet 
 = 
 projects 
 / 
  ODB_NETWORK_PROJECT_ID 
 
 / 
 locations 
 / 
  REGION 
 
 / 
 odbNetworks 
 / 
  ODB_NETWORK_ID 
 
 / 
 odbSubnets 
 / 
  CLIENT_ODB_SUBNET_ID 
 
  
\  
 -- 
 backup 
 - 
 odb 
 - 
 subnet 
 = 
 projects 
 / 
  ODB_NETWORK_PROJECT_ID 
 
 / 
 locations 
 / 
  REGION 
 
 / 
 odbNetworks 
 / 
  ODB_NETWORK_ID 
 
 / 
 odbSubnets 
 / 
  BACKUP_ODB_SUBNET_ID 
 
  
\  
 -- 
 properties 
 - 
 license 
 - 
 type 
 = 
  LICENSE_TYPE 
 
  
\  
 -- 
 properties 
 - 
 ssh 
 - 
 public 
 - 
 keys 
 = 
 " SSH_KEYS 
" 
  
\  
 -- 
 properties 
 - 
 gi 
 - 
 version 
 = 
  GI_VERSION 
 
  
\  
 -- 
 properties 
 - 
 hostname 
 - 
 prefix 
 = 
  HOSTNAME_PREFIX_NAME 
 
  
\  
 -- 
 properties 
 - 
 cpu 
 - 
 core 
 - 
 count 
 = 
  CPU_CORE_COUNT 
 
 

Replace the following:

  • CLUSTER_ID : a unique identifier for your cluster. The cluster ID can't be changed once set.
  • For exadata_infrastructure parameter, replace the following:
    • PROJECT_ID : the ID of your Google Cloud project which contains the Exadata Database for which you want to create the cluster.
    • REGION : the region of your Exadata Database.
    • EXADATA_INSTANCE_ID : the ID of your Exadata Database.
  • PROJECT_ID : the ID of your Google Cloud project.
  • REGION : the region for your cluster. The region is permanent and can't be changed later. The region must match the region used to create the Exadata Infrastructure instance. For a list of available regions, see Available configurations .
  • DISPLAY_NAME : a name to identify your cluster and is displayed in the Google Cloud console. The name must be unique within your Google Cloud project.
  • For odb-subnet and backup-odb-subnet parameters, replace the following:
    • ODB_NETWORK_PROJECT_ID : the ID of your Google Cloud project which contains your ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
    • REGION : the region of your ODB Network.
    • ODB_NETWORK_ID : the ID of your ODB Network.
    • CLIENT_ODB_SUBNET_ID : the ID of your client ODB Subnet.
    • BACKUP_ODB_SUBNET_ID : the ID of your backup ODB Subnet.
  • LICENSE_TYPE : the license type associated with your Oracle Database@Google Cloud order. Only accepted values are bring-your-own-license or license-included .

  • SSH_KEYS : the public SSH keys you want stored with your cluster. You can enter a single value for a single key, or an array of values for multiple keys.

  • GI_VERSION : the grid infrastructure version for your cluster. To get a list of all available grid infrastructure versions, run the following command in gcloud CLI:

     gcloud oracle-database gi-versions list --location= REGION 
     
    

    Replace the following:

    • REGION : the region where you're creating your cluster. For a list of available regions, see Available configurations .
  • HOSTNAME_PREFIX_NAME : the prefix you want to use to generate hostnames for the VM Cluster. This prefix can only contain letters, numbers, or hyphens, and must start with a letter. The maximum allowed length is 12 characters.

  • CPU_CORE_COUNT : the number of enabled CPU cores you want for your cluster.

API

To create an VM Cluster, run the following curl command:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://oracledatabase.googleapis.com/v1/projects/ PROJECT_ID 
/locations/ REGION 
/cloudVmClusters/ CLUSTER_ID 
"
-d \
'{
  "exadata_infrastructure": "projects/ PROJECT_ID 
/locations/ REGION 
/cloudExadataInfrastructures/ EXADATA_INSTANCE_ID 
"
  "displayName": " DISPLAY_NAME 
",
  "properties": {
    "odb_network": "projects/ ODB_NETWORK_PROJECT_ID 
/locations/ REGION 
/odbNetworks/ ODB_NETWORK_ID 
",
    "odb_subnet": "projects/ ODB_NETWORK_PROJECT_ID 
/locations/ REGION 
/odbNetworks/ ODB_NETWORK_ID 
/odbSubnets/ CLIENT_ODB_SUBNET_ID 
",
    "backup_odb_subnet": "projects/ ODB_NETWORK_PROJECT_ID 
/locations/ REGION 
/odbNetworks/ ODB_NETWORK_ID 
/odbSubnets/ BACKUP_ODB_SUBNET_ID 
",
    "licenseType": " LICENSE_TYPE 
",
    "ssh_public_keys": [" SSH_PUBLIC_KEY 
"],
    "cpu_core_count": CPU_CORE_COUNT 
,
    "gi_version": " GI_VERSION 
",
    "hostname_prefix": " HOSTNAME_PREFIX 
"
   }
}'

Replace the following:

  • PROJECT_ID : the ID of your Google Cloud project in which to create the VM Cluster.
  • REGION : the region in which to create the VM Cluster.
  • CLUSTER_ID : a unique identifier for your VM Cluster.
  • For exadata_infrastructure parameter, replace the following:
    • PROJECT_ID : the ID of your Google Cloud project which contains the Exadata Database for which you want to create the cluster.
    • REGION : the region of your Exadata Database.
    • EXADATA_INSTANCE_ID : the ID of your Exadata Database.
  • DISPLAY_NAME : a name for your VM Cluster to be displayed in the Google Cloud console.
  • For odb_network , odb_subnet , and backup_odb_subnet properties, replace the following:
    • ODB_NETWORK_PROJECT_ID : the ID of your Google Cloud project which contains your ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
    • REGION : the region of your ODB Network.
    • ODB_NETWORK_ID : the ID of your ODB Network.
    • CLIENT_ODB_SUBNET_ID : the ID of your client ODB Subnet.
    • BACKUP_ODB_SUBNET_ID : the ID of your backup ODB Subnet.
  • LICENSE_TYPE : the license type associated with your Oracle Database@Google Cloud order. Only accepted values are bring-your-own-license or license-included .
  • SSH_PUBLIC_KEY : the SSH public keys for your cluster. You can enter a single value for a single key, or an array of values for multiple keys.
  • CPU_CORE_COUNT : the number of enabled CPU cores required for your cluster.
  • GI_VERSION : the grid infrastructure version for your cluster.
  • HOSTNAME_PREFIX : the prefix you want to use to generate hostnames for the cluster. This prefix can only contain letters, numbers, or hyphens, and must start with a letter. The maximum allowed length is 12 characters.

C#

  using 
  
  Google.Cloud.OracleDatabase.V1 
 
 ; 
 using 
  
  Google.LongRunning 
 
 ; 
 using 
  
 System.Threading.Tasks 
 ; 
 public 
  
 sealed 
  
 partial 
  
 class 
  
 GeneratedOracleDatabaseClientSnippets 
 { 
  
 /// <summary>Snippet for CreateCloudVmClusterAsync</summary> 
  
 /// <remarks> 
  
 /// This snippet has been automatically generated and should be regarded as a code template only. 
  
 /// It will require modifications to work: 
  
 /// - It may require correct/in-range values for request initialization. 
  
 /// - It may require specifying regional endpoints when creating the service client as shown in 
  
 ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. 
  
 /// </remarks> 
  
 public 
  
 async 
  
 Task 
  
 CreateCloudVmClusterAsync 
 () 
  
 { 
  
 // Create client 
  
  OracleDatabaseClient 
 
  
 oracleDatabaseClient 
  
 = 
  
 await 
  
  OracleDatabaseClient 
 
 . 
  CreateAsync 
 
 (); 
  
 // Initialize request argument(s) 
  
 string 
  
 parent 
  
 = 
  
 "projects/[PROJECT]/locations/[LOCATION]" 
 ; 
  
  CloudVmCluster 
 
  
 cloudVmCluster 
  
 = 
  
 new 
  
  CloudVmCluster 
 
 (); 
  
 string 
  
 cloudVmClusterId 
  
 = 
  
 "" 
 ; 
  
 // Make the request 
  
 Operation<CloudVmCluster 
 , 
  
 OperationMetadata 
>  
 response 
  
 = 
  
 await 
  
 oracleDatabaseClient 
 . 
  CreateCloudVmClusterAsync 
 
 ( 
 parent 
 , 
  
 cloudVmCluster 
 , 
  
 cloudVmClusterId 
 ); 
  
 // Poll until the returned long-running operation is complete 
  
 Operation<CloudVmCluster 
 , 
  
 OperationMetadata 
>  
 completedResponse 
  
 = 
  
 await 
  
 response 
 . 
 PollUntilCompletedAsync 
 (); 
  
 // Retrieve the operation result 
  
  CloudVmCluster 
 
  
 result 
  
 = 
  
 completedResponse 
 . 
 Result 
 ; 
  
 // Or get the name of the operation 
  
 string 
  
 operationName 
  
 = 
  
 response 
 . 
 Name 
 ; 
  
 // This name can be stored, then the long-running operation retrieved later by name 
  
 Operation<CloudVmCluster 
 , 
  
 OperationMetadata 
>  
 retrievedResponse 
  
 = 
  
 await 
  
 oracleDatabaseClient 
 . 
  PollOnceCreateCloudVmClusterAsync 
 
 ( 
 operationName 
 ); 
  
 // Check if the retrieved long-running operation has completed 
  
 if 
  
 ( 
 retrievedResponse 
 . 
 IsCompleted 
 ) 
  
 { 
  
 // If it has completed, then access the result 
  
  CloudVmCluster 
 
  
 retrievedResult 
  
 = 
  
 retrievedResponse 
 . 
 Result 
 ; 
  
 } 
  
 } 
 } 
 

Go

  package 
  
 main 
 import 
  
 ( 
  
 "context" 
  
 oracledatabase 
  
 "cloud.google.com/go/oracledatabase/apiv1" 
  
 oracledatabasepb 
  
 "cloud.google.com/go/oracledatabase/apiv1/oracledatabasepb" 
 ) 
 func 
  
 main 
 () 
  
 { 
  
 ctx 
  
 := 
  
 context 
 . 
 Background 
 () 
  
 // This snippet has been automatically generated and should be regarded as a code template only. 
  
 // It will require modifications to work: 
  
 // - It may require correct/in-range values for request initialization. 
  
 // - It may require specifying regional endpoints when creating the service client as shown in: 
  
 //   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options 
  
 c 
 , 
  
 err 
  
 := 
  
 oracledatabase 
 . 
 NewClient 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 defer 
  
 c 
 . 
  Close 
 
 () 
  
 req 
  
 := 
  
& oracledatabasepb 
 . 
 CreateCloudVmClusterRequest 
 { 
  
 // TODO: Fill request struct fields. 
  
 // See https://pkg.go.dev/cloud.google.com/go/oracledatabase/apiv1/oracledatabasepb#CreateCloudVmClusterRequest. 
  
 } 
  
 op 
 , 
  
 err 
  
 := 
  
 c 
 . 
 CreateCloudVmCluster 
 ( 
 ctx 
 , 
  
 req 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 resp 
 , 
  
 err 
  
 := 
  
 op 
 . 
 Wait 
 ( 
 ctx 
 ) 
  
 if 
  
 err 
  
 != 
  
 nil 
  
 { 
  
 // TODO: Handle error. 
  
 } 
  
 // TODO: Use resp. 
  
 _ 
  
 = 
  
 resp 
 } 
 

Java

  import 
  
 com.google.api.core. ApiFuture 
 
 ; 
 import 
  
 com.google.cloud.oracledatabase.v1. CloudVmCluster 
 
 ; 
 import 
  
 com.google.cloud.oracledatabase.v1. CreateCloudVmClusterRequest 
 
 ; 
 import 
  
 com.google.cloud.oracledatabase.v1. LocationName 
 
 ; 
 import 
  
 com.google.cloud.oracledatabase.v1. OracleDatabaseClient 
 
 ; 
 import 
  
 com.google.longrunning. Operation 
 
 ; 
 public 
  
 class 
 AsyncCreateCloudVmCluster 
  
 { 
  
 public 
  
 static 
  
 void 
  
 main 
 ( 
 String 
 [] 
  
 args 
 ) 
  
 throws 
  
 Exception 
  
 { 
  
 asyncCreateCloudVmCluster 
 (); 
  
 } 
  
 public 
  
 static 
  
 void 
  
 asyncCreateCloudVmCluster 
 () 
  
 throws 
  
 Exception 
  
 { 
  
 // This snippet has been automatically generated and should be regarded as a code template only. 
  
 // It will require modifications to work: 
  
 // - It may require correct/in-range values for request initialization. 
  
 // - It may require specifying regional endpoints when creating the service client as shown in 
  
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 
  
 try 
  
 ( 
  OracleDatabaseClient 
 
  
 oracleDatabaseClient 
  
 = 
  
  OracleDatabaseClient 
 
 . 
 create 
 ()) 
  
 { 
  
  CreateCloudVmClusterRequest 
 
  
 request 
  
 = 
  
  CreateCloudVmClusterRequest 
 
 . 
 newBuilder 
 () 
  
 . 
 setParent 
 ( 
  LocationName 
 
 . 
 of 
 ( 
 "[PROJECT]" 
 , 
  
 "[LOCATION]" 
 ). 
 toString 
 ()) 
  
 . 
  setCloudVmClusterId 
 
 ( 
 "cloudVmClusterId-1217103287" 
 ) 
  
 . 
 setCloudVmCluster 
 ( 
  CloudVmCluster 
 
 . 
 newBuilder 
 (). 
 build 
 ()) 
  
 . 
 setRequestId 
 ( 
 "requestId693933066" 
 ) 
  
 . 
 build 
 (); 
  
 ApiFuture<Operation> 
  
 future 
  
 = 
  
 oracleDatabaseClient 
 . 
  createCloudVmClusterCallable 
 
 (). 
 futureCall 
 ( 
 request 
 ); 
  
 // Do something. 
  
  Operation 
 
  
 response 
  
 = 
  
 future 
 . 
 get 
 (); 
  
 } 
  
 } 
 } 
 

Node.js

  /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
 /** 
 *  Required. The name of the parent in the following format: 
 *  projects/{project}/locations/{location}. 
 */ 
 // const parent = 'abc123' 
 /** 
 *  Required. The ID of the VM Cluster to create. This value is restricted 
 *  to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 
 *  characters in length. The value must start with a letter and end with 
 *  a letter or a number. 
 */ 
 // const cloudVmClusterId = 'abc123' 
 /** 
 *  Required. The resource being created 
 */ 
 // const cloudVmCluster = {} 
 /** 
 *  Optional. An optional ID to identify the request. This value is used to 
 *  identify duplicate requests. If you make a request with the same request ID 
 *  and the original request is still in progress or completed, the server 
 *  ignores the second request. This prevents clients from 
 *  accidentally creating duplicate commitments. 
 *  The request ID must be a valid UUID with the exception that zero UUID is 
 *  not supported (00000000-0000-0000-0000-000000000000). 
 */ 
 // const requestId = 'abc123' 
 // Imports the Oracledatabase library 
 const 
  
 { 
 OracleDatabaseClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/oracledatabase 
' 
 ). 
 v1 
 ; 
 // Instantiates a client 
 const 
  
 oracledatabaseClient 
  
 = 
  
 new 
  
  OracleDatabaseClient 
 
 (); 
 async 
  
 function 
  
 callCreateCloudVmCluster 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 cloudVmClusterId 
 , 
  
 cloudVmCluster 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 oracledatabaseClient 
 . 
 createCloudVmCluster 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
 } 
 callCreateCloudVmCluster 
 (); 
 

PHP

  use Google\ApiCore\ApiException; 
 use Google\ApiCore\OperationResponse; 
 use Google\Cloud\OracleDatabase\V1\Client\OracleDatabaseClient; 
 use Google\Cloud\OracleDatabase\V1\CloudVmCluster; 
 use Google\Cloud\OracleDatabase\V1\CreateCloudVmClusterRequest; 
 use Google\Rpc\Status; 
 /** 
 * Creates a new VM Cluster in a given project and location. 
 * 
 * @param string $formattedParent                              The name of the parent in the following format: 
 *                                                             projects/{project}/locations/{location}. Please see 
 *                                                             {@see OracleDatabaseClient::locationName()} for help formatting this field. 
 * @param string $cloudVmClusterId                             The ID of the VM Cluster to create. This value is restricted 
 *                                                             to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 
 *                                                             characters in length. The value must start with a letter and end with 
 *                                                             a letter or a number. 
 * @param string $formattedCloudVmClusterExadataInfrastructure The name of the Exadata Infrastructure resource on which VM 
 *                                                             cluster resource is created, in the following format: 
 *                                                             projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} 
 *                                                             Please see {@see OracleDatabaseClient::cloudExadataInfrastructureName()} for help formatting this field. 
 * @param string $cloudVmClusterCidr                           Network settings. CIDR to use for cluster IP allocation. 
 * @param string $cloudVmClusterBackupSubnetCidr               CIDR range of the backup subnet. 
 * @param string $formattedCloudVmClusterNetwork               The name of the VPC network. 
 *                                                             Format: projects/{project}/global/networks/{network} 
 *                                                             Please see {@see OracleDatabaseClient::networkName()} for help formatting this field. 
 */ 
 function create_cloud_vm_cluster_sample( 
 string $formattedParent, 
 string $cloudVmClusterId, 
 string $formattedCloudVmClusterExadataInfrastructure, 
 string $cloudVmClusterCidr, 
 string $cloudVmClusterBackupSubnetCidr, 
 string $formattedCloudVmClusterNetwork 
 ): void { 
 // Create a client. 
 $oracleDatabaseClient = new OracleDatabaseClient(); 
 // Prepare the request message. 
 $cloudVmCluster = (new CloudVmCluster()) 
 ->setExadataInfrastructure($formattedCloudVmClusterExadataInfrastructure) 
 ->setCidr($cloudVmClusterCidr) 
 ->setBackupSubnetCidr($cloudVmClusterBackupSubnetCidr) 
 ->setNetwork($formattedCloudVmClusterNetwork); 
 $request = (new CreateCloudVmClusterRequest()) 
 ->setParent($formattedParent) 
 ->setCloudVmClusterId($cloudVmClusterId) 
 ->setCloudVmCluster($cloudVmCluster); 
 // Call the API and handle any network failures. 
 try { 
 /** @var OperationResponse $response */ 
 $response = $oracleDatabaseClient->createCloudVmCluster($request); 
 $response->pollUntilComplete(); 
 if ($response->operationSucceeded()) { 
 /** @var CloudVmCluster $result */ 
 $result = $response->getResult(); 
 printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); 
 } else { 
 /** @var Status $error */ 
 $error = $response->getError(); 
 printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); 
 } 
 } catch (ApiException $ex) { 
 printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); 
 } 
 } 
 /** 
 * Helper to execute the sample. 
 * 
 * This sample has been automatically generated and should be regarded as a code 
 * template only. It will require modifications to work: 
 *  - It may require correct/in-range values for request initialization. 
 *  - It may require specifying regional endpoints when creating the service client, 
 *    please see the apiEndpoint client configuration option for more details. 
 */ 
 function callSample(): void 
 { 
 $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); 
 $cloudVmClusterId = '[CLOUD_VM_CLUSTER_ID]'; 
 $formattedCloudVmClusterExadataInfrastructure = OracleDatabaseClient::cloudExadataInfrastructureName( 
 '[PROJECT]', 
 '[LOCATION]', 
 '[CLOUD_EXADATA_INFRASTRUCTURE]' 
 ); 
 $cloudVmClusterCidr = '[CIDR]'; 
 $cloudVmClusterBackupSubnetCidr = '[BACKUP_SUBNET_CIDR]'; 
 $formattedCloudVmClusterNetwork = OracleDatabaseClient::networkName('[PROJECT]', '[NETWORK]'); 
 create_cloud_vm_cluster_sample( 
 $formattedParent, 
 $cloudVmClusterId, 
 $formattedCloudVmClusterExadataInfrastructure, 
 $cloudVmClusterCidr, 
 $cloudVmClusterBackupSubnetCidr, 
 $formattedCloudVmClusterNetwork 
 ); 
 } 
 

Python

  # This snippet has been automatically generated and should be regarded as a 
 # code template only. 
 # It will require modifications to work: 
 # - It may require correct/in-range values for request initialization. 
 # - It may require specifying regional endpoints when creating the service 
 #   client as shown in: 
 #   https://googleapis.dev/python/google-api-core/latest/client_options.html 
 from 
  
 google.cloud 
  
 import 
  oracledatabase_v1 
 
 def 
  
 sample_create_cloud_vm_cluster 
 (): 
 # Create a client 
 client 
 = 
  oracledatabase_v1 
 
 . 
  OracleDatabaseClient 
 
 () 
 # Initialize request argument(s) 
 cloud_vm_cluster 
 = 
  oracledatabase_v1 
 
 . 
  CloudVmCluster 
 
 () 
 cloud_vm_cluster 
 . 
 exadata_infrastructure 
 = 
 "exadata_infrastructure_value" 
 cloud_vm_cluster 
 . 
 cidr 
 = 
 "cidr_value" 
 cloud_vm_cluster 
 . 
 backup_subnet_cidr 
 = 
 "backup_subnet_cidr_value" 
 cloud_vm_cluster 
 . 
 network 
 = 
 "network_value" 
 request 
 = 
  oracledatabase_v1 
 
 . 
  CreateCloudVmClusterRequest 
 
 ( 
 parent 
 = 
 "parent_value" 
 , 
 cloud_vm_cluster_id 
 = 
 "cloud_vm_cluster_id_value" 
 , 
 cloud_vm_cluster 
 = 
 cloud_vm_cluster 
 , 
 ) 
 # Make the request 
 operation 
 = 
 client 
 . 
  create_cloud_vm_cluster 
 
 ( 
 request 
 = 
 request 
 ) 
 print 
 ( 
 "Waiting for operation to complete..." 
 ) 
 response 
 = 
 operation 
 . 
 result 
 () 
 # Handle the response 
 print 
 ( 
 response 
 ) 
 

Ruby

  require 
  
 "google/cloud/oracle_database/v1" 
 ## 
 # Snippet for the create_cloud_vm_cluster call in the OracleDatabase service 
 # 
 # This snippet has been automatically generated and should be regarded as a code 
 # template only. It will require modifications to work: 
 # - It may require correct/in-range values for request initialization. 
 # - It may require specifying regional endpoints when creating the service 
 # client as shown in https://cloud.google.com/ruby/docs/reference. 
 # 
 # This is an auto-generated example demonstrating basic usage of 
 # Google::Cloud::OracleDatabase::V1::OracleDatabase::Client#create_cloud_vm_cluster. 
 # 
 def 
  
 create_cloud_vm_cluster 
  
 # Create a client object. The client can be reused for multiple calls. 
  
 client 
  
 = 
  
 Google 
 :: 
 Cloud 
 :: 
 OracleDatabase 
 :: 
 V1 
 :: 
 OracleDatabase 
 :: 
 Client 
 . 
 new 
  
 # Create a request. To set request fields, pass in keyword arguments. 
  
 request 
  
 = 
  
 Google 
 :: 
 Cloud 
 :: 
 OracleDatabase 
 :: 
 V1 
 :: 
 CreateCloudVmClusterRequest 
 . 
 new 
  
 # Call the create_cloud_vm_cluster method. 
  
 result 
  
 = 
  
 client 
 . 
 create_cloud_vm_cluster 
  
 request 
  
 # The returned object is of type Gapic::Operation. You can use it to 
  
 # check the status of an operation, cancel it, or wait for results. 
  
 # Here is how to wait for a response. 
  
 result 
 . 
 wait_until_done! 
  
 timeout 
 : 
  
 60 
  
 if 
  
 result 
 . 
 response? 
  
 p 
  
 result 
 . 
 response 
  
 else 
  
 puts 
  
 "No response received." 
  
 end 
 end 
 

What's next

Design a Mobile Site
View Site in Mobile | Classic
Share by: