/// <summary>Snippet for CreateDatabase</summary> public void CreateDatabase_RequestObject() { // Snippet: CreateDatabase(CreateDatabaseRequest,CallSettings) // Create client DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.Create(); // Initialize request argument(s) CreateDatabaseRequest request = new CreateDatabaseRequest { ParentAsInstanceName = new InstanceName("[PROJECT]", "[INSTANCE]"), CreateStatement = "", }; // Make the request Operation <Database, CreateDatabaseMetadata> response = databaseAdminClient.CreateDatabase(request); // Poll until the returned long-running operation is complete Operation <Database, CreateDatabaseMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Database 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 <Database, CreateDatabaseMetadata> retrievedResponse = databaseAdminClient.PollOnceCreateDatabase(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Database retrievedResult = retrievedResponse.Result; } // End snippet }