google-apis-composer_v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Apis
17
+ module ComposerV1beta1
18
+ # Version of the google-apis-composer_v1beta1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20201208"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,404 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ComposerV1beta1
24
+
25
+ class AllowedIpRange
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class DatabaseConfig
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Date
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Empty
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class EncryptionConfig
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Environment
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class EnvironmentConfig
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class IpAllocationPolicy
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class ImageVersion
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class ListEnvironmentsResponse
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class ListImageVersionsResponse
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class ListOperationsResponse
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class MaintenanceWindow
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class NodeConfig
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class Operation
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class OperationMetadata
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class PrivateClusterConfig
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class PrivateEnvironmentConfig
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class RestartWebServerRequest
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class SoftwareConfig
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class Status
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class WebServerConfig
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class WebServerNetworkAccessControl
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class AllowedIpRange
164
+ # @private
165
+ class Representation < Google::Apis::Core::JsonRepresentation
166
+ property :description, as: 'description'
167
+ property :value, as: 'value'
168
+ end
169
+ end
170
+
171
+ class DatabaseConfig
172
+ # @private
173
+ class Representation < Google::Apis::Core::JsonRepresentation
174
+ property :machine_type, as: 'machineType'
175
+ end
176
+ end
177
+
178
+ class Date
179
+ # @private
180
+ class Representation < Google::Apis::Core::JsonRepresentation
181
+ property :day, as: 'day'
182
+ property :month, as: 'month'
183
+ property :year, as: 'year'
184
+ end
185
+ end
186
+
187
+ class Empty
188
+ # @private
189
+ class Representation < Google::Apis::Core::JsonRepresentation
190
+ end
191
+ end
192
+
193
+ class EncryptionConfig
194
+ # @private
195
+ class Representation < Google::Apis::Core::JsonRepresentation
196
+ property :kms_key_name, as: 'kmsKeyName'
197
+ end
198
+ end
199
+
200
+ class Environment
201
+ # @private
202
+ class Representation < Google::Apis::Core::JsonRepresentation
203
+ property :config, as: 'config', class: Google::Apis::ComposerV1beta1::EnvironmentConfig, decorator: Google::Apis::ComposerV1beta1::EnvironmentConfig::Representation
204
+
205
+ property :create_time, as: 'createTime'
206
+ hash :labels, as: 'labels'
207
+ property :name, as: 'name'
208
+ property :state, as: 'state'
209
+ property :update_time, as: 'updateTime'
210
+ property :uuid, as: 'uuid'
211
+ end
212
+ end
213
+
214
+ class EnvironmentConfig
215
+ # @private
216
+ class Representation < Google::Apis::Core::JsonRepresentation
217
+ property :airflow_uri, as: 'airflowUri'
218
+ property :dag_gcs_prefix, as: 'dagGcsPrefix'
219
+ property :database_config, as: 'databaseConfig', class: Google::Apis::ComposerV1beta1::DatabaseConfig, decorator: Google::Apis::ComposerV1beta1::DatabaseConfig::Representation
220
+
221
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::ComposerV1beta1::EncryptionConfig, decorator: Google::Apis::ComposerV1beta1::EncryptionConfig::Representation
222
+
223
+ property :gke_cluster, as: 'gkeCluster'
224
+ property :maintenance_window, as: 'maintenanceWindow', class: Google::Apis::ComposerV1beta1::MaintenanceWindow, decorator: Google::Apis::ComposerV1beta1::MaintenanceWindow::Representation
225
+
226
+ property :node_config, as: 'nodeConfig', class: Google::Apis::ComposerV1beta1::NodeConfig, decorator: Google::Apis::ComposerV1beta1::NodeConfig::Representation
227
+
228
+ property :node_count, as: 'nodeCount'
229
+ property :private_environment_config, as: 'privateEnvironmentConfig', class: Google::Apis::ComposerV1beta1::PrivateEnvironmentConfig, decorator: Google::Apis::ComposerV1beta1::PrivateEnvironmentConfig::Representation
230
+
231
+ property :software_config, as: 'softwareConfig', class: Google::Apis::ComposerV1beta1::SoftwareConfig, decorator: Google::Apis::ComposerV1beta1::SoftwareConfig::Representation
232
+
233
+ property :web_server_config, as: 'webServerConfig', class: Google::Apis::ComposerV1beta1::WebServerConfig, decorator: Google::Apis::ComposerV1beta1::WebServerConfig::Representation
234
+
235
+ property :web_server_network_access_control, as: 'webServerNetworkAccessControl', class: Google::Apis::ComposerV1beta1::WebServerNetworkAccessControl, decorator: Google::Apis::ComposerV1beta1::WebServerNetworkAccessControl::Representation
236
+
237
+ end
238
+ end
239
+
240
+ class IpAllocationPolicy
241
+ # @private
242
+ class Representation < Google::Apis::Core::JsonRepresentation
243
+ property :cluster_ipv4_cidr_block, as: 'clusterIpv4CidrBlock'
244
+ property :cluster_secondary_range_name, as: 'clusterSecondaryRangeName'
245
+ property :services_ipv4_cidr_block, as: 'servicesIpv4CidrBlock'
246
+ property :services_secondary_range_name, as: 'servicesSecondaryRangeName'
247
+ property :use_ip_aliases, as: 'useIpAliases'
248
+ end
249
+ end
250
+
251
+ class ImageVersion
252
+ # @private
253
+ class Representation < Google::Apis::Core::JsonRepresentation
254
+ property :creation_disabled, as: 'creationDisabled'
255
+ property :image_version_id, as: 'imageVersionId'
256
+ property :is_default, as: 'isDefault'
257
+ property :release_date, as: 'releaseDate', class: Google::Apis::ComposerV1beta1::Date, decorator: Google::Apis::ComposerV1beta1::Date::Representation
258
+
259
+ collection :supported_python_versions, as: 'supportedPythonVersions'
260
+ property :upgrade_disabled, as: 'upgradeDisabled'
261
+ end
262
+ end
263
+
264
+ class ListEnvironmentsResponse
265
+ # @private
266
+ class Representation < Google::Apis::Core::JsonRepresentation
267
+ collection :environments, as: 'environments', class: Google::Apis::ComposerV1beta1::Environment, decorator: Google::Apis::ComposerV1beta1::Environment::Representation
268
+
269
+ property :next_page_token, as: 'nextPageToken'
270
+ end
271
+ end
272
+
273
+ class ListImageVersionsResponse
274
+ # @private
275
+ class Representation < Google::Apis::Core::JsonRepresentation
276
+ collection :image_versions, as: 'imageVersions', class: Google::Apis::ComposerV1beta1::ImageVersion, decorator: Google::Apis::ComposerV1beta1::ImageVersion::Representation
277
+
278
+ property :next_page_token, as: 'nextPageToken'
279
+ end
280
+ end
281
+
282
+ class ListOperationsResponse
283
+ # @private
284
+ class Representation < Google::Apis::Core::JsonRepresentation
285
+ property :next_page_token, as: 'nextPageToken'
286
+ collection :operations, as: 'operations', class: Google::Apis::ComposerV1beta1::Operation, decorator: Google::Apis::ComposerV1beta1::Operation::Representation
287
+
288
+ end
289
+ end
290
+
291
+ class MaintenanceWindow
292
+ # @private
293
+ class Representation < Google::Apis::Core::JsonRepresentation
294
+ property :end_time, as: 'endTime'
295
+ property :recurrence, as: 'recurrence'
296
+ property :start_time, as: 'startTime'
297
+ end
298
+ end
299
+
300
+ class NodeConfig
301
+ # @private
302
+ class Representation < Google::Apis::Core::JsonRepresentation
303
+ property :disk_size_gb, as: 'diskSizeGb'
304
+ property :ip_allocation_policy, as: 'ipAllocationPolicy', class: Google::Apis::ComposerV1beta1::IpAllocationPolicy, decorator: Google::Apis::ComposerV1beta1::IpAllocationPolicy::Representation
305
+
306
+ property :location, as: 'location'
307
+ property :machine_type, as: 'machineType'
308
+ property :max_pods_per_node, as: 'maxPodsPerNode'
309
+ property :network, as: 'network'
310
+ collection :oauth_scopes, as: 'oauthScopes'
311
+ property :service_account, as: 'serviceAccount'
312
+ property :subnetwork, as: 'subnetwork'
313
+ collection :tags, as: 'tags'
314
+ end
315
+ end
316
+
317
+ class Operation
318
+ # @private
319
+ class Representation < Google::Apis::Core::JsonRepresentation
320
+ property :done, as: 'done'
321
+ property :error, as: 'error', class: Google::Apis::ComposerV1beta1::Status, decorator: Google::Apis::ComposerV1beta1::Status::Representation
322
+
323
+ hash :metadata, as: 'metadata'
324
+ property :name, as: 'name'
325
+ hash :response, as: 'response'
326
+ end
327
+ end
328
+
329
+ class OperationMetadata
330
+ # @private
331
+ class Representation < Google::Apis::Core::JsonRepresentation
332
+ property :create_time, as: 'createTime'
333
+ property :end_time, as: 'endTime'
334
+ property :operation_type, as: 'operationType'
335
+ property :resource, as: 'resource'
336
+ property :resource_uuid, as: 'resourceUuid'
337
+ property :state, as: 'state'
338
+ end
339
+ end
340
+
341
+ class PrivateClusterConfig
342
+ # @private
343
+ class Representation < Google::Apis::Core::JsonRepresentation
344
+ property :enable_private_endpoint, as: 'enablePrivateEndpoint'
345
+ property :master_ipv4_cidr_block, as: 'masterIpv4CidrBlock'
346
+ property :master_ipv4_reserved_range, as: 'masterIpv4ReservedRange'
347
+ end
348
+ end
349
+
350
+ class PrivateEnvironmentConfig
351
+ # @private
352
+ class Representation < Google::Apis::Core::JsonRepresentation
353
+ property :cloud_sql_ipv4_cidr_block, as: 'cloudSqlIpv4CidrBlock'
354
+ property :enable_private_environment, as: 'enablePrivateEnvironment'
355
+ property :private_cluster_config, as: 'privateClusterConfig', class: Google::Apis::ComposerV1beta1::PrivateClusterConfig, decorator: Google::Apis::ComposerV1beta1::PrivateClusterConfig::Representation
356
+
357
+ property :web_server_ipv4_cidr_block, as: 'webServerIpv4CidrBlock'
358
+ property :web_server_ipv4_reserved_range, as: 'webServerIpv4ReservedRange'
359
+ end
360
+ end
361
+
362
+ class RestartWebServerRequest
363
+ # @private
364
+ class Representation < Google::Apis::Core::JsonRepresentation
365
+ end
366
+ end
367
+
368
+ class SoftwareConfig
369
+ # @private
370
+ class Representation < Google::Apis::Core::JsonRepresentation
371
+ hash :airflow_config_overrides, as: 'airflowConfigOverrides'
372
+ hash :env_variables, as: 'envVariables'
373
+ property :image_version, as: 'imageVersion'
374
+ hash :pypi_packages, as: 'pypiPackages'
375
+ property :python_version, as: 'pythonVersion'
376
+ end
377
+ end
378
+
379
+ class Status
380
+ # @private
381
+ class Representation < Google::Apis::Core::JsonRepresentation
382
+ property :code, as: 'code'
383
+ collection :details, as: 'details'
384
+ property :message, as: 'message'
385
+ end
386
+ end
387
+
388
+ class WebServerConfig
389
+ # @private
390
+ class Representation < Google::Apis::Core::JsonRepresentation
391
+ property :machine_type, as: 'machineType'
392
+ end
393
+ end
394
+
395
+ class WebServerNetworkAccessControl
396
+ # @private
397
+ class Representation < Google::Apis::Core::JsonRepresentation
398
+ collection :allowed_ip_ranges, as: 'allowedIpRanges', class: Google::Apis::ComposerV1beta1::AllowedIpRange, decorator: Google::Apis::ComposerV1beta1::AllowedIpRange::Representation
399
+
400
+ end
401
+ end
402
+ end
403
+ end
404
+ end
@@ -0,0 +1,484 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module ComposerV1beta1
23
+ # Cloud Composer API
24
+ #
25
+ # Manages Apache Airflow environments on Google Cloud Platform.
26
+ #
27
+ # @example
28
+ # require 'google/apis/composer_v1beta1'
29
+ #
30
+ # Composer = Google::Apis::ComposerV1beta1 # Alias the module
31
+ # service = Composer::CloudComposerService.new
32
+ #
33
+ # @see https://cloud.google.com/composer/
34
+ class CloudComposerService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://composer.googleapis.com/', '',
47
+ client_name: 'google-apis-composer_v1beta1',
48
+ client_version: Google::Apis::ComposerV1beta1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Create a new environment.
53
+ # @param [String] parent
54
+ # The parent must be of the form "projects/`projectId`/locations/`locationId`".
55
+ # @param [Google::Apis::ComposerV1beta1::Environment] environment_object
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::ComposerV1beta1::Operation] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::ComposerV1beta1::Operation]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def create_project_location_environment(parent, environment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:post, 'v1beta1/{+parent}/environments', options)
75
+ command.request_representation = Google::Apis::ComposerV1beta1::Environment::Representation
76
+ command.request_object = environment_object
77
+ command.response_representation = Google::Apis::ComposerV1beta1::Operation::Representation
78
+ command.response_class = Google::Apis::ComposerV1beta1::Operation
79
+ command.params['parent'] = parent unless parent.nil?
80
+ command.query['fields'] = fields unless fields.nil?
81
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
82
+ execute_or_queue_command(command, &block)
83
+ end
84
+
85
+ # Delete an environment.
86
+ # @param [String] name
87
+ # The environment to delete, in the form: "projects/`projectId`/locations/`
88
+ # locationId`/environments/`environmentId`"
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::ComposerV1beta1::Operation] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::ComposerV1beta1::Operation]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def delete_project_location_environment(name, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
108
+ command.response_representation = Google::Apis::ComposerV1beta1::Operation::Representation
109
+ command.response_class = Google::Apis::ComposerV1beta1::Operation
110
+ command.params['name'] = name unless name.nil?
111
+ command.query['fields'] = fields unless fields.nil?
112
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
113
+ execute_or_queue_command(command, &block)
114
+ end
115
+
116
+ # Get an existing environment.
117
+ # @param [String] name
118
+ # The resource name of the environment to get, in the form: "projects/`projectId`
119
+ # /locations/`locationId`/environments/`environmentId`"
120
+ # @param [String] fields
121
+ # Selector specifying which fields to include in a partial response.
122
+ # @param [String] quota_user
123
+ # Available to use for quota purposes for server-side applications. Can be any
124
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
125
+ # @param [Google::Apis::RequestOptions] options
126
+ # Request-specific options
127
+ #
128
+ # @yield [result, err] Result & error if block supplied
129
+ # @yieldparam result [Google::Apis::ComposerV1beta1::Environment] parsed result object
130
+ # @yieldparam err [StandardError] error object if request failed
131
+ #
132
+ # @return [Google::Apis::ComposerV1beta1::Environment]
133
+ #
134
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
135
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
136
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
137
+ def get_project_location_environment(name, fields: nil, quota_user: nil, options: nil, &block)
138
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
139
+ command.response_representation = Google::Apis::ComposerV1beta1::Environment::Representation
140
+ command.response_class = Google::Apis::ComposerV1beta1::Environment
141
+ command.params['name'] = name unless name.nil?
142
+ command.query['fields'] = fields unless fields.nil?
143
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
144
+ execute_or_queue_command(command, &block)
145
+ end
146
+
147
+ # List environments.
148
+ # @param [String] parent
149
+ # List environments in the given project and location, in the form: "projects/`
150
+ # projectId`/locations/`locationId`"
151
+ # @param [Fixnum] page_size
152
+ # The maximum number of environments to return.
153
+ # @param [String] page_token
154
+ # The next_page_token value returned from a previous List request, if any.
155
+ # @param [String] fields
156
+ # Selector specifying which fields to include in a partial response.
157
+ # @param [String] quota_user
158
+ # Available to use for quota purposes for server-side applications. Can be any
159
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
160
+ # @param [Google::Apis::RequestOptions] options
161
+ # Request-specific options
162
+ #
163
+ # @yield [result, err] Result & error if block supplied
164
+ # @yieldparam result [Google::Apis::ComposerV1beta1::ListEnvironmentsResponse] parsed result object
165
+ # @yieldparam err [StandardError] error object if request failed
166
+ #
167
+ # @return [Google::Apis::ComposerV1beta1::ListEnvironmentsResponse]
168
+ #
169
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
170
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
171
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
172
+ def list_project_location_environments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
173
+ command = make_simple_command(:get, 'v1beta1/{+parent}/environments', options)
174
+ command.response_representation = Google::Apis::ComposerV1beta1::ListEnvironmentsResponse::Representation
175
+ command.response_class = Google::Apis::ComposerV1beta1::ListEnvironmentsResponse
176
+ command.params['parent'] = parent unless parent.nil?
177
+ command.query['pageSize'] = page_size unless page_size.nil?
178
+ command.query['pageToken'] = page_token unless page_token.nil?
179
+ command.query['fields'] = fields unless fields.nil?
180
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
181
+ execute_or_queue_command(command, &block)
182
+ end
183
+
184
+ # Update an environment.
185
+ # @param [String] name
186
+ # The relative resource name of the environment to update, in the form: "
187
+ # projects/`projectId`/locations/`locationId`/environments/`environmentId`"
188
+ # @param [Google::Apis::ComposerV1beta1::Environment] environment_object
189
+ # @param [String] update_mask
190
+ # Required. A comma-separated list of paths, relative to `Environment`, of
191
+ # fields to update. For example, to set the version of scikit-learn to install
192
+ # in the environment to 0.19.0 and to remove an existing installation of
193
+ # argparse, the `updateMask` parameter would include the following two `paths`
194
+ # values: "config.softwareConfig.pypiPackages.scikit-learn" and "config.
195
+ # softwareConfig.pypiPackages.argparse". The included patch environment would
196
+ # specify the scikit-learn version as follows: ` "config":` "softwareConfig":` "
197
+ # pypiPackages":` "scikit-learn":"==0.19.0" ` ` ` ` Note that in the above
198
+ # example, any existing PyPI packages other than scikit-learn and argparse will
199
+ # be unaffected. Only one update type may be included in a single request's `
200
+ # updateMask`. For example, one cannot update both the PyPI packages and labels
201
+ # in the same request. However, it is possible to update multiple members of a
202
+ # map field simultaneously in the same request. For example, to set the labels "
203
+ # label1" and "label2" while clearing "label3" (assuming it already exists), one
204
+ # can provide the paths "labels.label1", "labels.label2", and "labels.label3"
205
+ # and populate the patch environment as follows: ` "labels":` "label1":"new-
206
+ # label1-value" "label2":"new-label2-value" ` ` Note that in the above example,
207
+ # any existing labels that are not included in the `updateMask` will be
208
+ # unaffected. It is also possible to replace an entire map field by providing
209
+ # the map field's path in the `updateMask`. The new value of the field will be
210
+ # that which is provided in the patch environment. For example, to delete all
211
+ # pre-existing user-specified PyPI packages and install botocore at version 1.7.
212
+ # 14, the `updateMask` would contain the path "config.softwareConfig.
213
+ # pypiPackages", and the patch environment would be the following: ` "config":` "
214
+ # softwareConfig":` "pypiPackages":` "botocore":"==1.7.14" ` ` ` ` *Note:* Only
215
+ # the following fields can be updated: * config.softwareConfig.pypiPackages *
216
+ # Replace all custom custom PyPI packages. If a replacement package map is not
217
+ # included in `environment`, all custom PyPI packages are cleared. It is an
218
+ # error to provide both this mask and a mask specifying an individual package. *
219
+ # config.softwareConfig.pypiPackages.packagename * Update the custom PyPI
220
+ # package packagename, preserving other packages. To delete the package, include
221
+ # it in `updateMask`, and omit the mapping for it in `environment.config.
222
+ # softwareConfig.pypiPackages`. It is an error to provide both a mask of this
223
+ # form and the "config.softwareConfig.pypiPackages" mask. * labels * Replace all
224
+ # environment labels. If a replacement labels map is not included in `
225
+ # environment`, all labels are cleared. It is an error to provide both this mask
226
+ # and a mask specifying one or more individual labels. * labels.labelName * Set
227
+ # the label named labelName, while preserving other labels. To delete the label,
228
+ # include it in `updateMask` and omit its mapping in `environment.labels`. It is
229
+ # an error to provide both a mask of this form and the "labels" mask. * config.
230
+ # nodeCount * Horizontally scale the number of nodes in the environment. An
231
+ # integer greater than or equal to 3 must be provided in the `config.nodeCount`
232
+ # field. * config.webServerNetworkAccessControl * Replace the environment's
233
+ # current WebServerNetworkAccessControl. * config.softwareConfig.
234
+ # airflowConfigOverrides * Replace all Apache Airflow config overrides. If a
235
+ # replacement config overrides map is not included in `environment`, all config
236
+ # overrides are cleared. It is an error to provide both this mask and a mask
237
+ # specifying one or more individual config overrides. * config.softwareConfig.
238
+ # airflowConfigOverrides.section- name * Override the Apache Airflow config
239
+ # property name in the section named section, preserving other properties. To
240
+ # delete the property override, include it in `updateMask` and omit its mapping
241
+ # in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error
242
+ # to provide both a mask of this form and the "config.softwareConfig.
243
+ # airflowConfigOverrides" mask. * config.softwareConfig.envVariables * Replace
244
+ # all environment variables. If a replacement environment variable map is not
245
+ # included in `environment`, all custom environment variables are cleared. It is
246
+ # an error to provide both this mask and a mask specifying one or more
247
+ # individual environment variables. * config.softwareConfig.imageVersion *
248
+ # Upgrade the version of the environment in-place. Refer to `SoftwareConfig.
249
+ # image_version` for information on how to format the new image version.
250
+ # Additionally, the new image version cannot effect a version downgrade and must
251
+ # match the current image version's Composer major version and Airflow major and
252
+ # minor versions. Consult the Cloud Composer Version List for valid values. *
253
+ # config.databaseConfig.machineType * Cloud SQL machine type used by Airflow
254
+ # database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-
255
+ # standard-8 or db-n1-standard-16. * config.webServerConfig.machineType *
256
+ # Machine type on which Airflow web server is running. It has to be one of:
257
+ # composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. *
258
+ # config.maintenanceWindow * Maintenance window during which Cloud Composer
259
+ # components may be under maintenance.
260
+ # @param [String] fields
261
+ # Selector specifying which fields to include in a partial response.
262
+ # @param [String] quota_user
263
+ # Available to use for quota purposes for server-side applications. Can be any
264
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
265
+ # @param [Google::Apis::RequestOptions] options
266
+ # Request-specific options
267
+ #
268
+ # @yield [result, err] Result & error if block supplied
269
+ # @yieldparam result [Google::Apis::ComposerV1beta1::Operation] parsed result object
270
+ # @yieldparam err [StandardError] error object if request failed
271
+ #
272
+ # @return [Google::Apis::ComposerV1beta1::Operation]
273
+ #
274
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
275
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
276
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
277
+ def patch_project_location_environment(name, environment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
278
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
279
+ command.request_representation = Google::Apis::ComposerV1beta1::Environment::Representation
280
+ command.request_object = environment_object
281
+ command.response_representation = Google::Apis::ComposerV1beta1::Operation::Representation
282
+ command.response_class = Google::Apis::ComposerV1beta1::Operation
283
+ command.params['name'] = name unless name.nil?
284
+ command.query['updateMask'] = update_mask unless update_mask.nil?
285
+ command.query['fields'] = fields unless fields.nil?
286
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
287
+ execute_or_queue_command(command, &block)
288
+ end
289
+
290
+ # Restart Airflow web server.
291
+ # @param [String] name
292
+ # The resource name of the environment to restart the web server for, in the
293
+ # form: "projects/`projectId`/locations/`locationId`/environments/`environmentId`
294
+ # "
295
+ # @param [Google::Apis::ComposerV1beta1::RestartWebServerRequest] restart_web_server_request_object
296
+ # @param [String] fields
297
+ # Selector specifying which fields to include in a partial response.
298
+ # @param [String] quota_user
299
+ # Available to use for quota purposes for server-side applications. Can be any
300
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
301
+ # @param [Google::Apis::RequestOptions] options
302
+ # Request-specific options
303
+ #
304
+ # @yield [result, err] Result & error if block supplied
305
+ # @yieldparam result [Google::Apis::ComposerV1beta1::Operation] parsed result object
306
+ # @yieldparam err [StandardError] error object if request failed
307
+ #
308
+ # @return [Google::Apis::ComposerV1beta1::Operation]
309
+ #
310
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
311
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
312
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
313
+ def restart_environment_web_server(name, restart_web_server_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
314
+ command = make_simple_command(:post, 'v1beta1/{+name}:restartWebServer', options)
315
+ command.request_representation = Google::Apis::ComposerV1beta1::RestartWebServerRequest::Representation
316
+ command.request_object = restart_web_server_request_object
317
+ command.response_representation = Google::Apis::ComposerV1beta1::Operation::Representation
318
+ command.response_class = Google::Apis::ComposerV1beta1::Operation
319
+ command.params['name'] = name unless name.nil?
320
+ command.query['fields'] = fields unless fields.nil?
321
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
322
+ execute_or_queue_command(command, &block)
323
+ end
324
+
325
+ # List ImageVersions for provided location.
326
+ # @param [String] parent
327
+ # List ImageVersions in the given project and location, in the form: "projects/`
328
+ # projectId`/locations/`locationId`"
329
+ # @param [Boolean] include_past_releases
330
+ # Whether or not image versions from old releases should be included.
331
+ # @param [Fixnum] page_size
332
+ # The maximum number of image_versions to return.
333
+ # @param [String] page_token
334
+ # The next_page_token value returned from a previous List request, if any.
335
+ # @param [String] fields
336
+ # Selector specifying which fields to include in a partial response.
337
+ # @param [String] quota_user
338
+ # Available to use for quota purposes for server-side applications. Can be any
339
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
340
+ # @param [Google::Apis::RequestOptions] options
341
+ # Request-specific options
342
+ #
343
+ # @yield [result, err] Result & error if block supplied
344
+ # @yieldparam result [Google::Apis::ComposerV1beta1::ListImageVersionsResponse] parsed result object
345
+ # @yieldparam err [StandardError] error object if request failed
346
+ #
347
+ # @return [Google::Apis::ComposerV1beta1::ListImageVersionsResponse]
348
+ #
349
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
350
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
351
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
352
+ def list_project_location_image_versions(parent, include_past_releases: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
353
+ command = make_simple_command(:get, 'v1beta1/{+parent}/imageVersions', options)
354
+ command.response_representation = Google::Apis::ComposerV1beta1::ListImageVersionsResponse::Representation
355
+ command.response_class = Google::Apis::ComposerV1beta1::ListImageVersionsResponse
356
+ command.params['parent'] = parent unless parent.nil?
357
+ command.query['includePastReleases'] = include_past_releases unless include_past_releases.nil?
358
+ command.query['pageSize'] = page_size unless page_size.nil?
359
+ command.query['pageToken'] = page_token unless page_token.nil?
360
+ command.query['fields'] = fields unless fields.nil?
361
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
362
+ execute_or_queue_command(command, &block)
363
+ end
364
+
365
+ # Deletes a long-running operation. This method indicates that the client is no
366
+ # longer interested in the operation result. It does not cancel the operation.
367
+ # If the server doesn't support this method, it returns `google.rpc.Code.
368
+ # UNIMPLEMENTED`.
369
+ # @param [String] name
370
+ # The name of the operation resource to be deleted.
371
+ # @param [String] fields
372
+ # Selector specifying which fields to include in a partial response.
373
+ # @param [String] quota_user
374
+ # Available to use for quota purposes for server-side applications. Can be any
375
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
376
+ # @param [Google::Apis::RequestOptions] options
377
+ # Request-specific options
378
+ #
379
+ # @yield [result, err] Result & error if block supplied
380
+ # @yieldparam result [Google::Apis::ComposerV1beta1::Empty] parsed result object
381
+ # @yieldparam err [StandardError] error object if request failed
382
+ #
383
+ # @return [Google::Apis::ComposerV1beta1::Empty]
384
+ #
385
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
386
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
387
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
388
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
389
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
390
+ command.response_representation = Google::Apis::ComposerV1beta1::Empty::Representation
391
+ command.response_class = Google::Apis::ComposerV1beta1::Empty
392
+ command.params['name'] = name unless name.nil?
393
+ command.query['fields'] = fields unless fields.nil?
394
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
395
+ execute_or_queue_command(command, &block)
396
+ end
397
+
398
+ # Gets the latest state of a long-running operation. Clients can use this method
399
+ # to poll the operation result at intervals as recommended by the API service.
400
+ # @param [String] name
401
+ # The name of the operation resource.
402
+ # @param [String] fields
403
+ # Selector specifying which fields to include in a partial response.
404
+ # @param [String] quota_user
405
+ # Available to use for quota purposes for server-side applications. Can be any
406
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
407
+ # @param [Google::Apis::RequestOptions] options
408
+ # Request-specific options
409
+ #
410
+ # @yield [result, err] Result & error if block supplied
411
+ # @yieldparam result [Google::Apis::ComposerV1beta1::Operation] parsed result object
412
+ # @yieldparam err [StandardError] error object if request failed
413
+ #
414
+ # @return [Google::Apis::ComposerV1beta1::Operation]
415
+ #
416
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
417
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
418
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
419
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
420
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
421
+ command.response_representation = Google::Apis::ComposerV1beta1::Operation::Representation
422
+ command.response_class = Google::Apis::ComposerV1beta1::Operation
423
+ command.params['name'] = name unless name.nil?
424
+ command.query['fields'] = fields unless fields.nil?
425
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
426
+ execute_or_queue_command(command, &block)
427
+ end
428
+
429
+ # Lists operations that match the specified filter in the request. If the server
430
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
431
+ # binding allows API services to override the binding to use different resource
432
+ # name schemes, such as `users/*/operations`. To override the binding, API
433
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
434
+ # service configuration. For backwards compatibility, the default name includes
435
+ # the operations collection id, however overriding users must ensure the name
436
+ # binding is the parent resource, without the operations collection id.
437
+ # @param [String] name
438
+ # The name of the operation's parent resource.
439
+ # @param [String] filter
440
+ # The standard list filter.
441
+ # @param [Fixnum] page_size
442
+ # The standard list page size.
443
+ # @param [String] page_token
444
+ # The standard list page token.
445
+ # @param [String] fields
446
+ # Selector specifying which fields to include in a partial response.
447
+ # @param [String] quota_user
448
+ # Available to use for quota purposes for server-side applications. Can be any
449
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
450
+ # @param [Google::Apis::RequestOptions] options
451
+ # Request-specific options
452
+ #
453
+ # @yield [result, err] Result & error if block supplied
454
+ # @yieldparam result [Google::Apis::ComposerV1beta1::ListOperationsResponse] parsed result object
455
+ # @yieldparam err [StandardError] error object if request failed
456
+ #
457
+ # @return [Google::Apis::ComposerV1beta1::ListOperationsResponse]
458
+ #
459
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
460
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
461
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
462
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
463
+ command = make_simple_command(:get, 'v1beta1/{+name}/operations', options)
464
+ command.response_representation = Google::Apis::ComposerV1beta1::ListOperationsResponse::Representation
465
+ command.response_class = Google::Apis::ComposerV1beta1::ListOperationsResponse
466
+ command.params['name'] = name unless name.nil?
467
+ command.query['filter'] = filter unless filter.nil?
468
+ command.query['pageSize'] = page_size unless page_size.nil?
469
+ command.query['pageToken'] = page_token unless page_token.nil?
470
+ command.query['fields'] = fields unless fields.nil?
471
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
472
+ execute_or_queue_command(command, &block)
473
+ end
474
+
475
+ protected
476
+
477
+ def apply_command_defaults(command)
478
+ command.query['key'] = key unless key.nil?
479
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
480
+ end
481
+ end
482
+ end
483
+ end
484
+ end