blob: e5ea93cb9bf0cc7afb74ce8e24273213e235b441 [file] [log] [blame]
// Copyright 2024 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.
// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package container_test
import (
"context"
container "cloud.google.com/go/container/apiv1"
containerpb "cloud.google.com/go/container/apiv1/containerpb"
"google.golang.org/api/iterator"
)
func ExampleNewClusterManagerClient() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func ExampleClusterManagerClient_CancelOperation() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClusterManagerClient_CheckAutopilotCompatibility() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.CheckAutopilotCompatibilityRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#CheckAutopilotCompatibilityRequest.
}
resp, err := c.CheckAutopilotCompatibility(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_CompleteIPRotation() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.CompleteIPRotationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#CompleteIPRotationRequest.
}
resp, err := c.CompleteIPRotation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_CompleteNodePoolUpgrade() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.CompleteNodePoolUpgradeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#CompleteNodePoolUpgradeRequest.
}
err = c.CompleteNodePoolUpgrade(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClusterManagerClient_CreateCluster() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.CreateClusterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#CreateClusterRequest.
}
resp, err := c.CreateCluster(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_CreateNodePool() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.CreateNodePoolRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#CreateNodePoolRequest.
}
resp, err := c.CreateNodePool(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_DeleteCluster() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.DeleteClusterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#DeleteClusterRequest.
}
resp, err := c.DeleteCluster(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_DeleteNodePool() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.DeleteNodePoolRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#DeleteNodePoolRequest.
}
resp, err := c.DeleteNodePool(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_GetCluster() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.GetClusterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#GetClusterRequest.
}
resp, err := c.GetCluster(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_GetJSONWebKeys() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.GetJSONWebKeysRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#GetJSONWebKeysRequest.
}
resp, err := c.GetJSONWebKeys(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_GetNodePool() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.GetNodePoolRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#GetNodePoolRequest.
}
resp, err := c.GetNodePool(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_GetOperation() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_GetServerConfig() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.GetServerConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#GetServerConfigRequest.
}
resp, err := c.GetServerConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_ListClusters() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.ListClustersRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#ListClustersRequest.
}
resp, err := c.ListClusters(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_ListNodePools() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.ListNodePoolsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#ListNodePoolsRequest.
}
resp, err := c.ListNodePools(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_ListOperations() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#ListOperationsRequest.
}
resp, err := c.ListOperations(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_ListUsableSubnetworks() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.ListUsableSubnetworksRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#ListUsableSubnetworksRequest.
}
it := c.ListUsableSubnetworks(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*containerpb.ListUsableSubnetworksResponse)
}
}
func ExampleClusterManagerClient_RollbackNodePoolUpgrade() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.RollbackNodePoolUpgradeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#RollbackNodePoolUpgradeRequest.
}
resp, err := c.RollbackNodePoolUpgrade(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetAddonsConfig() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetAddonsConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetAddonsConfigRequest.
}
resp, err := c.SetAddonsConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetLabels() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetLabelsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetLabelsRequest.
}
resp, err := c.SetLabels(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetLegacyAbac() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetLegacyAbacRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetLegacyAbacRequest.
}
resp, err := c.SetLegacyAbac(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetLocations() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetLocationsRequest.
}
resp, err := c.SetLocations(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetLoggingService() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetLoggingServiceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetLoggingServiceRequest.
}
resp, err := c.SetLoggingService(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetMaintenancePolicy() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetMaintenancePolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetMaintenancePolicyRequest.
}
resp, err := c.SetMaintenancePolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetMasterAuth() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetMasterAuthRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetMasterAuthRequest.
}
resp, err := c.SetMasterAuth(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetMonitoringService() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetMonitoringServiceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetMonitoringServiceRequest.
}
resp, err := c.SetMonitoringService(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetNetworkPolicy() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetNetworkPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetNetworkPolicyRequest.
}
resp, err := c.SetNetworkPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetNodePoolAutoscaling() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetNodePoolAutoscalingRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetNodePoolAutoscalingRequest.
}
resp, err := c.SetNodePoolAutoscaling(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetNodePoolManagement() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetNodePoolManagementRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetNodePoolManagementRequest.
}
resp, err := c.SetNodePoolManagement(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_SetNodePoolSize() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.SetNodePoolSizeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#SetNodePoolSizeRequest.
}
resp, err := c.SetNodePoolSize(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_StartIPRotation() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.StartIPRotationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#StartIPRotationRequest.
}
resp, err := c.StartIPRotation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_UpdateCluster() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.UpdateClusterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#UpdateClusterRequest.
}
resp, err := c.UpdateCluster(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_UpdateMaster() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.UpdateMasterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#UpdateMasterRequest.
}
resp, err := c.UpdateMaster(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClusterManagerClient_UpdateNodePool() {
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 := container.NewClusterManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &containerpb.UpdateNodePoolRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/container/apiv1/containerpb#UpdateNodePoolRequest.
}
resp, err := c.UpdateNodePool(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}