Class: Google::Apis::ContainerV1::ContainerService

Inherits:
Google::Apis::Core::BaseService show all
Defined in:
generated/google/apis/container_v1/service.rb

Overview

Google Container Engine API

The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.

Examples:

require 'google/apis/container_v1'

Container = Google::Apis::ContainerV1 # Alias the module
service = Container::ContainerService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Google::Apis::Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Google::Apis::Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Google::Apis::Core::Logging

#logger

Constructor Details

#initializeContainerService

Returns a new instance of ContainerService



46
47
48
49
# File 'generated/google/apis/container_v1/service.rb', line 46

def initialize
  super('https://container.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



39
40
41
# File 'generated/google/apis/container_v1/service.rb', line 39

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



44
45
46
# File 'generated/google/apis/container_v1/service.rb', line 44

def quota_user
  @quota_user
end

Instance Method Details

#cancel_operation(project_id, zone, operation_id, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Empty

Cancels the specified operation.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the operation resides.

  • operation_id (String)

    The server-assigned name of the operation.

  • cancel_operation_request_object (Google::Apis::ContainerV1::CancelOperationRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



866
867
868
869
870
871
872
873
874
875
876
877
878
# File 'generated/google/apis/container_v1/service.rb', line 866

def cancel_operation(project_id, zone, operation_id, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel', options)
  command.request_representation = Google::Apis::ContainerV1::CancelOperationRequest::Representation
  command.request_object = cancel_operation_request_object
  command.response_representation = Google::Apis::ContainerV1::Empty::Representation
  command.response_class = Google::Apis::ContainerV1::Empty
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['operationId'] = operation_id unless operation_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#complete_cluster_ip_rotation(project_id, zone, cluster_id, complete_ip_rotation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Completes master IP rotation.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster.

  • complete_ip_rotation_request_object (Google::Apis::ContainerV1::CompleteIpRotationRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'generated/google/apis/container_v1/service.rb', line 241

def complete_cluster_ip_rotation(project_id, zone, cluster_id, complete_ip_rotation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation', options)
  command.request_representation = Google::Apis::ContainerV1::CompleteIpRotationRequest::Representation
  command.request_object = complete_ip_rotation_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_cluster(project_id, zone, create_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's default network. One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • create_cluster_request_object (Google::Apis::ContainerV1::CreateClusterRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



200
201
202
203
204
205
206
207
208
209
210
211
# File 'generated/google/apis/container_v1/service.rb', line 200

def create_cluster(project_id, zone, create_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters', options)
  command.request_representation = Google::Apis::ContainerV1::CreateClusterRequest::Representation
  command.request_object = create_cluster_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_node_pool(project_id, zone, cluster_id, create_node_pool_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Creates a node pool for a cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster.

  • create_node_pool_request_object (Google::Apis::ContainerV1::CreateNodePoolRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



709
710
711
712
713
714
715
716
717
718
719
720
721
# File 'generated/google/apis/container_v1/service.rb', line 709

def create_node_pool(project_id, zone, cluster_id, create_node_pool_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools', options)
  command.request_representation = Google::Apis::ContainerV1::CreateNodePoolRequest::Representation
  command.request_object = create_node_pool_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Deletes a node pool from a cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster.

  • node_pool_id (String)

    The name of the node pool to delete.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



538
539
540
541
542
543
544
545
546
547
548
549
# File 'generated/google/apis/container_v1/service.rb', line 538

def delete_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}', options)
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.params['nodePoolId'] = node_pool_id unless node_pool_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_zone_cluster(project_id, zone, cluster_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster to delete.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



497
498
499
500
501
502
503
504
505
506
507
# File 'generated/google/apis/container_v1/service.rb', line 497

def delete_zone_cluster(project_id, zone, cluster_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}', options)
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::NodePool

Retrieves the node pool requested.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster.

  • node_pool_id (String)

    The name of the node pool.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



752
753
754
755
756
757
758
759
760
761
762
763
# File 'generated/google/apis/container_v1/service.rb', line 752

def get_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}', options)
  command.response_representation = Google::Apis::ContainerV1::NodePool::Representation
  command.response_class = Google::Apis::ContainerV1::NodePool
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.params['nodePoolId'] = node_pool_id unless node_pool_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_zone_serverconfig(project_id, zone, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::ServerConfig

Returns configuration info about the Container Engine service.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone to return operations for.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



75
76
77
78
79
80
81
82
83
84
# File 'generated/google/apis/container_v1/service.rb', line 75

def get_project_zone_serverconfig(project_id, zone, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/serverconfig', options)
  command.response_representation = Google::Apis::ContainerV1::ServerConfig::Representation
  command.response_class = Google::Apis::ContainerV1::ServerConfig
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_zone_cluster(project_id, zone, cluster_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Cluster

Gets the details of a specific cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster to retrieve.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



324
325
326
327
328
329
330
331
332
333
334
# File 'generated/google/apis/container_v1/service.rb', line 324

def get_zone_cluster(project_id, zone, cluster_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}', options)
  command.response_representation = Google::Apis::ContainerV1::Cluster::Representation
  command.response_class = Google::Apis::ContainerV1::Cluster
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_zone_operation(project_id, zone, operation_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Gets the specified operation.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • operation_id (String)

    The server-assigned name of the operation.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



827
828
829
830
831
832
833
834
835
836
837
# File 'generated/google/apis/container_v1/service.rb', line 827

def get_zone_operation(project_id, zone, operation_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/operations/{operationId}', options)
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['operationId'] = operation_id unless operation_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#legacy_project_zone_cluster_abac(project_id, zone, cluster_id, set_legacy_abac_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Enables or disables the ABAC authorization mechanism on a cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster to update.

  • set_legacy_abac_request_object (Google::Apis::ContainerV1::SetLegacyAbacRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'generated/google/apis/container_v1/service.rb', line 283

def legacy_project_zone_cluster_abac(project_id, zone, cluster_id, set_legacy_abac_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac', options)
  command.request_representation = Google::Apis::ContainerV1::SetLegacyAbacRequest::Representation
  command.request_object = set_legacy_abac_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_zone_cluster_node_pools(project_id, zone, cluster_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::ListNodePoolsResponse

Lists the node pools for a cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



623
624
625
626
627
628
629
630
631
632
633
# File 'generated/google/apis/container_v1/service.rb', line 623

def list_project_zone_cluster_node_pools(project_id, zone, cluster_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools', options)
  command.response_representation = Google::Apis::ContainerV1::ListNodePoolsResponse::Representation
  command.response_class = Google::Apis::ContainerV1::ListNodePoolsResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_zone_clusters(project_id, zone, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::ListClustersResponse

Lists all clusters owned by a project in either the specified zone or all zones.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides, or "-" for all zones.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



112
113
114
115
116
117
118
119
120
121
# File 'generated/google/apis/container_v1/service.rb', line 112

def list_zone_clusters(project_id, zone, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/clusters', options)
  command.response_representation = Google::Apis::ContainerV1::ListClustersResponse::Representation
  command.response_class = Google::Apis::ContainerV1::ListClustersResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_zone_operations(project_id, zone, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::ListOperationsResponse

Lists all operations in a project in a specific zone or all zones.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone to return operations for, or - for all zones.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



789
790
791
792
793
794
795
796
797
798
# File 'generated/google/apis/container_v1/service.rb', line 789

def list_zone_operations(project_id, zone, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/operations', options)
  command.response_representation = Google::Apis::ContainerV1::ListOperationsResponse::Representation
  command.response_class = Google::Apis::ContainerV1::ListOperationsResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#resource_project_zone_cluster_labels(project_id, zone, cluster_id, set_labels_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Sets labels on a cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster.

  • set_labels_request_object (Google::Apis::ContainerV1::SetLabelsRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'generated/google/apis/container_v1/service.rb', line 151

def resource_project_zone_cluster_labels(project_id, zone, cluster_id, set_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels', options)
  command.request_representation = Google::Apis::ContainerV1::SetLabelsRequest::Representation
  command.request_object = set_labels_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#rollback_node_pool_upgrade(project_id, zone, cluster_id, node_pool_id, rollback_node_pool_upgrade_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Roll back the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade successfully completed.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster to rollback.

  • node_pool_id (String)

    The name of the node pool to rollback.

  • rollback_node_pool_upgrade_request_object (Google::Apis::ContainerV1::RollbackNodePoolUpgradeRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



666
667
668
669
670
671
672
673
674
675
676
677
678
679
# File 'generated/google/apis/container_v1/service.rb', line 666

def rollback_node_pool_upgrade(project_id, zone, cluster_id, node_pool_id, rollback_node_pool_upgrade_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback', options)
  command.request_representation = Google::Apis::ContainerV1::RollbackNodePoolUpgradeRequest::Representation
  command.request_object = rollback_node_pool_upgrade_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.params['nodePoolId'] = node_pool_id unless node_pool_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#set_cluster_master_auth(project_id, zone, cluster_id, set_master_auth_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Used to set master auth materials. Currently supports :- Changing the admin password of a specific cluster. This can be either via password generation or explicitly set the password.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster to upgrade.

  • set_master_auth_request_object (Google::Apis::ContainerV1::SetMasterAuthRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'generated/google/apis/container_v1/service.rb', line 450

def set_cluster_master_auth(project_id, zone, cluster_id, set_master_auth_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth', options)
  command.request_representation = Google::Apis::ContainerV1::SetMasterAuthRequest::Representation
  command.request_object = set_master_auth_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#set_project_zone_cluster_node_pool_management(project_id, zone, cluster_id, node_pool_id, set_node_pool_management_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Sets the NodeManagement options for a node pool.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster to update.

  • node_pool_id (String)

    The name of the node pool to update.

  • set_node_pool_management_request_object (Google::Apis::ContainerV1::SetNodePoolManagementRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



581
582
583
584
585
586
587
588
589
590
591
592
593
594
# File 'generated/google/apis/container_v1/service.rb', line 581

def set_project_zone_cluster_node_pool_management(project_id, zone, cluster_id, node_pool_id, set_node_pool_management_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement', options)
  command.request_representation = Google::Apis::ContainerV1::SetNodePoolManagementRequest::Representation
  command.request_object = set_node_pool_management_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.params['nodePoolId'] = node_pool_id unless node_pool_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#start_cluster_ip_rotation(project_id, zone, cluster_id, start_ip_rotation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Start master IP rotation.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster.

  • start_ip_rotation_request_object (Google::Apis::ContainerV1::StartIpRotationRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'generated/google/apis/container_v1/service.rb', line 406

def start_cluster_ip_rotation(project_id, zone, cluster_id, start_ip_rotation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation', options)
  command.request_representation = Google::Apis::ContainerV1::StartIpRotationRequest::Representation
  command.request_object = start_ip_rotation_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_cluster(project_id, zone, cluster_id, update_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1::Operation

Updates the settings of a specific cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone (String)

    The name of the Google Compute Engine zone in which the cluster resides.

  • cluster_id (String)

    The name of the cluster to upgrade.

  • update_cluster_request_object (Google::Apis::ContainerV1::UpdateClusterRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'generated/google/apis/container_v1/service.rb', line 364

def update_cluster(project_id, zone, cluster_id, update_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:put, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}', options)
  command.request_representation = Google::Apis::ContainerV1::UpdateClusterRequest::Representation
  command.request_object = update_cluster_request_object
  command.response_representation = Google::Apis::ContainerV1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zone'] = zone unless zone.nil?
  command.params['clusterId'] = cluster_id unless cluster_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end