Class: Google::Apis::ContainerV1beta1::ContainerService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::ContainerV1beta1::ContainerService
- 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.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
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
-
#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.
-
#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.
-
#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.
-
#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.
-
#initialize ⇒ ContainerService
constructor
A new instance of ContainerService.
-
#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.
-
#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.
-
#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.
-
#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.
Methods inherited from Google::Apis::Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Google::Apis::Core::Logging
Constructor Details
#initialize ⇒ ContainerService
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
#key ⇒ String
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.
39 40 41 |
# File 'generated/google/apis/container_v1beta1/service.rb', line 39 def key @key end |
#quota_user ⇒ String
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.
45 46 47 |
# File 'generated/google/apis/container_v1beta1/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns 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.
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, ) 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.
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, ) 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.
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, ) 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.
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, ) 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.
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, ) 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.
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, ) 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.
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, ) 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.
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, ) 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 |