Skip to content

Commit

Permalink
feat: Added ClusterView supporting more granular view of continuous b…
Browse files Browse the repository at this point in the history
…ackups

feat: Added new SSL modes ALLOW_UNENCRYPTED_AND_ENCRYPTED, ENCRYPTED_ONLY
feat: Added users API
feat: Added fault injection API
feat: Added instance update policy
feat: Added cluster network config
fix: Deprecated SSL modes SSL_MODE_ALLOW, SSL_MODE_REQUIRE, SSL_MODE_VERIFY_CA

PiperOrigin-RevId: 539726243

Source-Link: googleapis/googleapis@277df0e

Source-Link: googleapis/googleapis-gen@e7ec1f4
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQWxsb3lEYi5WMUFscGhhLy5Pd2xCb3QueWFtbCIsImgiOiJlN2VjMWY0Nzg4ZTYyOGM2ODZkZmU0YjUwOTZiZDQ4OTRjMGNjNTRjIn0=
  • Loading branch information
gcf-owl-bot[bot] authored and anuragsrivstv committed Jun 13, 2023
1 parent debc17d commit 027919d
Show file tree
Hide file tree
Showing 47 changed files with 10,665 additions and 975 deletions.
@@ -0,0 +1,46 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_async_flattened]
using Google.Cloud.AlloyDb.V1Alpha;
using System.Threading.Tasks;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
/// <summary>Snippet for CreateUserAsync</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 CreateUserAsync()
{
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
User user = new User();
string userId = "";
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(parent, user, userId);
}
}
// [END alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_async_flattened]
}
@@ -0,0 +1,51 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_async]
using Google.Cloud.AlloyDb.V1Alpha;
using System.Threading.Tasks;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
/// <summary>Snippet for CreateUserAsync</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 CreateUserRequestObjectAsync()
{
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateUserRequest request = new CreateUserRequest
{
ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
UserId = "",
User = new User(),
RequestId = "",
ValidateOnly = false,
};
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(request);
}
}
// [END alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_async]
}
@@ -0,0 +1,50 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_sync]
using Google.Cloud.AlloyDb.V1Alpha;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
/// <summary>Snippet for CreateUser</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 void CreateUserRequestObject()
{
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
CreateUserRequest request = new CreateUserRequest
{
ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
UserId = "",
User = new User(),
RequestId = "",
ValidateOnly = false,
};
// Make the request
User response = alloyDBAdminClient.CreateUser(request);
}
}
// [END alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_sync]
}
@@ -0,0 +1,46 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_async_flattened_resourceNames]
using Google.Cloud.AlloyDb.V1Alpha;
using System.Threading.Tasks;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
/// <summary>Snippet for CreateUserAsync</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 CreateUserResourceNamesAsync()
{
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
User user = new User();
string userId = "";
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(parent, user, userId);
}
}
// [END alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_async_flattened_resourceNames]
}
@@ -0,0 +1,45 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_sync_flattened_resourceNames]
using Google.Cloud.AlloyDb.V1Alpha;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
/// <summary>Snippet for CreateUser</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 void CreateUserResourceNames()
{
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
User user = new User();
string userId = "";
// Make the request
User response = alloyDBAdminClient.CreateUser(parent, user, userId);
}
}
// [END alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_sync_flattened_resourceNames]
}
@@ -0,0 +1,45 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_sync_flattened]
using Google.Cloud.AlloyDb.V1Alpha;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
/// <summary>Snippet for CreateUser</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 void CreateUser()
{
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
User user = new User();
string userId = "";
// Make the request
User response = alloyDBAdminClient.CreateUser(parent, user, userId);
}
}
// [END alloydb_v1alpha_generated_AlloyDBAdmin_CreateUser_sync_flattened]
}
@@ -0,0 +1,44 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START alloydb_v1alpha_generated_AlloyDBAdmin_DeleteUser_async_flattened]
using Google.Cloud.AlloyDb.V1Alpha;
using System.Threading.Tasks;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
/// <summary>Snippet for DeleteUserAsync</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 DeleteUserAsync()
{
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/users/[USER]";
// Make the request
await alloyDBAdminClient.DeleteUserAsync(name);
}
}
// [END alloydb_v1alpha_generated_AlloyDBAdmin_DeleteUser_async_flattened]
}
@@ -0,0 +1,49 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START alloydb_v1alpha_generated_AlloyDBAdmin_DeleteUser_async]
using Google.Cloud.AlloyDb.V1Alpha;
using System.Threading.Tasks;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
/// <summary>Snippet for DeleteUserAsync</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 DeleteUserRequestObjectAsync()
{
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteUserRequest request = new DeleteUserRequest
{
UserName = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]"),
RequestId = "",
ValidateOnly = false,
};
// Make the request
await alloyDBAdminClient.DeleteUserAsync(request);
}
}
// [END alloydb_v1alpha_generated_AlloyDBAdmin_DeleteUser_async]
}

0 comments on commit 027919d

Please sign in to comment.