Class: Google::Apis::ContainerV1beta1::ContainerService

Inherits:
Google::Apis::Core::BaseService show all
Defined in:
generated/google/apis/container_v1beta1/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_v1beta1'

Container = Google::Apis::ContainerV1beta1 # 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



52
53
54
# File 'generated/google/apis/container_v1beta1/service.rb', line 52

def initialize
  super('https://www.googleapis.com/', 'container/v1beta1/projects/')
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_v1beta1/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. Overrides userIp if both are provided.

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. Overrides userIp if both are provided.



45
46
47
# File 'generated/google/apis/container_v1beta1/service.rb', line 45

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



50
51
52
# File 'generated/google/apis/container_v1beta1/service.rb', line 50

def user_ip
  @user_ip
end

Instance Method Details

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

Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master instance. The cluster is created in the project's default network. A firewall is added that allows traffic into port 443 on the master, which enables HTTPS. A firewall and a route is added 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_id (String)

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

  • create_cluster_request_object (Google::Apis::ContainerV1beta1::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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'generated/google/apis/container_v1beta1/service.rb', line 162

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

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

Deletes the cluster, including the Kubernetes master and all worker nodes. Firewalls and routes that were configured at cluster creation are also deleted.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone_id (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'generated/google/apis/container_v1beta1/service.rb', line 206

def delete_zone_cluster(project_id, zone_id, cluster_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  path = '{projectId}/zones/{zoneId}/clusters/{clusterId}'
  command =  make_simple_command(:delete, path, options)
  command.response_representation = Google::Apis::ContainerV1beta1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1beta1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zoneId'] = zone_id unless zone_id.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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Gets a specific cluster.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone_id (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'generated/google/apis/container_v1beta1/service.rb', line 248

def get_zone_cluster(project_id, zone_id, cluster_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  path = '{projectId}/zones/{zoneId}/clusters/{clusterId}'
  command =  make_simple_command(:get, path, options)
  command.response_representation = Google::Apis::ContainerV1beta1::Cluster::Representation
  command.response_class = Google::Apis::ContainerV1beta1::Cluster
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zoneId'] = zone_id unless zone_id.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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Gets the specified operation.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone_id (String)

    The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated.

  • 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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'generated/google/apis/container_v1beta1/service.rb', line 331

def get_zone_operation(project_id, zone_id, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  path = '{projectId}/zones/{zoneId}/operations/{operationId}'
  command =  make_simple_command(:get, path, options)
  command.response_representation = Google::Apis::ContainerV1beta1::Operation::Representation
  command.response_class = Google::Apis::ContainerV1beta1::Operation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['zoneId'] = zone_id unless zone_id.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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_clusters(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse

Lists all clusters owned by a project across all zones.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • 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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



80
81
82
83
84
85
86
87
88
89
90
# File 'generated/google/apis/container_v1beta1/service.rb', line 80

def list_clusters(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  path = '{projectId}/clusters'
  command =  make_simple_command(:get, path, options)
  command.response_representation = Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse::Representation
  command.response_class = Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_operations(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse

Lists all operations in a project, across all zones.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • 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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



116
117
118
119
120
121
122
123
124
125
126
# File 'generated/google/apis/container_v1beta1/service.rb', line 116

def list_operations(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  path = '{projectId}/operations'
  command =  make_simple_command(:get, path, options)
  command.response_representation = Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse::Representation
  command.response_class = Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

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

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone_id (String)

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

  • 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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



288
289
290
291
292
293
294
295
296
297
298
299
# File 'generated/google/apis/container_v1beta1/service.rb', line 288

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

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

Lists all operations in a project in a specific zone.

Parameters:

  • project_id (String)

    The Google Developers Console project ID or project number.

  • zone_id (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



371
372
373
374
375
376
377
378
379
380
381
382
# File 'generated/google/apis/container_v1beta1/service.rb', line 371

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