google-apis-composer_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-composer_v1.rb +15 -0
- data/lib/google/apis/composer_v1.rb +36 -0
- data/lib/google/apis/composer_v1/classes.rb +895 -0
- data/lib/google/apis/composer_v1/gem_version.rb +28 -0
- data/lib/google/apis/composer_v1/representations.rb +329 -0
- data/lib/google/apis/composer_v1/service.rb +436 -0
- metadata +76 -0
@@ -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 ComposerV1
|
18
|
+
# Version of the google-apis-composer_v1 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 = "20201202"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,329 @@
|
|
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 ComposerV1
|
24
|
+
|
25
|
+
class AllowedIpRange
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class Date
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class Empty
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class Environment
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class EnvironmentConfig
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class IpAllocationPolicy
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class ImageVersion
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class ListEnvironmentsResponse
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class ListImageVersionsResponse
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class ListOperationsResponse
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class NodeConfig
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class Operation
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class OperationMetadata
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class PrivateClusterConfig
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class PrivateEnvironmentConfig
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class SoftwareConfig
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
121
|
+
class Status
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
127
|
+
class WebServerNetworkAccessControl
|
128
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
129
|
+
|
130
|
+
include Google::Apis::Core::JsonObjectSupport
|
131
|
+
end
|
132
|
+
|
133
|
+
class AllowedIpRange
|
134
|
+
# @private
|
135
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
136
|
+
property :description, as: 'description'
|
137
|
+
property :value, as: 'value'
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
class Date
|
142
|
+
# @private
|
143
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
144
|
+
property :day, as: 'day'
|
145
|
+
property :month, as: 'month'
|
146
|
+
property :year, as: 'year'
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
class Empty
|
151
|
+
# @private
|
152
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
class Environment
|
157
|
+
# @private
|
158
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
159
|
+
property :config, as: 'config', class: Google::Apis::ComposerV1::EnvironmentConfig, decorator: Google::Apis::ComposerV1::EnvironmentConfig::Representation
|
160
|
+
|
161
|
+
property :create_time, as: 'createTime'
|
162
|
+
hash :labels, as: 'labels'
|
163
|
+
property :name, as: 'name'
|
164
|
+
property :state, as: 'state'
|
165
|
+
property :update_time, as: 'updateTime'
|
166
|
+
property :uuid, as: 'uuid'
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
class EnvironmentConfig
|
171
|
+
# @private
|
172
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
173
|
+
property :airflow_uri, as: 'airflowUri'
|
174
|
+
property :dag_gcs_prefix, as: 'dagGcsPrefix'
|
175
|
+
property :gke_cluster, as: 'gkeCluster'
|
176
|
+
property :node_config, as: 'nodeConfig', class: Google::Apis::ComposerV1::NodeConfig, decorator: Google::Apis::ComposerV1::NodeConfig::Representation
|
177
|
+
|
178
|
+
property :node_count, as: 'nodeCount'
|
179
|
+
property :private_environment_config, as: 'privateEnvironmentConfig', class: Google::Apis::ComposerV1::PrivateEnvironmentConfig, decorator: Google::Apis::ComposerV1::PrivateEnvironmentConfig::Representation
|
180
|
+
|
181
|
+
property :software_config, as: 'softwareConfig', class: Google::Apis::ComposerV1::SoftwareConfig, decorator: Google::Apis::ComposerV1::SoftwareConfig::Representation
|
182
|
+
|
183
|
+
property :web_server_network_access_control, as: 'webServerNetworkAccessControl', class: Google::Apis::ComposerV1::WebServerNetworkAccessControl, decorator: Google::Apis::ComposerV1::WebServerNetworkAccessControl::Representation
|
184
|
+
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
class IpAllocationPolicy
|
189
|
+
# @private
|
190
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
191
|
+
property :cluster_ipv4_cidr_block, as: 'clusterIpv4CidrBlock'
|
192
|
+
property :cluster_secondary_range_name, as: 'clusterSecondaryRangeName'
|
193
|
+
property :services_ipv4_cidr_block, as: 'servicesIpv4CidrBlock'
|
194
|
+
property :services_secondary_range_name, as: 'servicesSecondaryRangeName'
|
195
|
+
property :use_ip_aliases, as: 'useIpAliases'
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
class ImageVersion
|
200
|
+
# @private
|
201
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
202
|
+
property :creation_disabled, as: 'creationDisabled'
|
203
|
+
property :image_version_id, as: 'imageVersionId'
|
204
|
+
property :is_default, as: 'isDefault'
|
205
|
+
property :release_date, as: 'releaseDate', class: Google::Apis::ComposerV1::Date, decorator: Google::Apis::ComposerV1::Date::Representation
|
206
|
+
|
207
|
+
collection :supported_python_versions, as: 'supportedPythonVersions'
|
208
|
+
property :upgrade_disabled, as: 'upgradeDisabled'
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
class ListEnvironmentsResponse
|
213
|
+
# @private
|
214
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
215
|
+
collection :environments, as: 'environments', class: Google::Apis::ComposerV1::Environment, decorator: Google::Apis::ComposerV1::Environment::Representation
|
216
|
+
|
217
|
+
property :next_page_token, as: 'nextPageToken'
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
class ListImageVersionsResponse
|
222
|
+
# @private
|
223
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
224
|
+
collection :image_versions, as: 'imageVersions', class: Google::Apis::ComposerV1::ImageVersion, decorator: Google::Apis::ComposerV1::ImageVersion::Representation
|
225
|
+
|
226
|
+
property :next_page_token, as: 'nextPageToken'
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
class ListOperationsResponse
|
231
|
+
# @private
|
232
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
233
|
+
property :next_page_token, as: 'nextPageToken'
|
234
|
+
collection :operations, as: 'operations', class: Google::Apis::ComposerV1::Operation, decorator: Google::Apis::ComposerV1::Operation::Representation
|
235
|
+
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
class NodeConfig
|
240
|
+
# @private
|
241
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
242
|
+
property :disk_size_gb, as: 'diskSizeGb'
|
243
|
+
property :ip_allocation_policy, as: 'ipAllocationPolicy', class: Google::Apis::ComposerV1::IpAllocationPolicy, decorator: Google::Apis::ComposerV1::IpAllocationPolicy::Representation
|
244
|
+
|
245
|
+
property :location, as: 'location'
|
246
|
+
property :machine_type, as: 'machineType'
|
247
|
+
property :network, as: 'network'
|
248
|
+
collection :oauth_scopes, as: 'oauthScopes'
|
249
|
+
property :service_account, as: 'serviceAccount'
|
250
|
+
property :subnetwork, as: 'subnetwork'
|
251
|
+
collection :tags, as: 'tags'
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
class Operation
|
256
|
+
# @private
|
257
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
258
|
+
property :done, as: 'done'
|
259
|
+
property :error, as: 'error', class: Google::Apis::ComposerV1::Status, decorator: Google::Apis::ComposerV1::Status::Representation
|
260
|
+
|
261
|
+
hash :metadata, as: 'metadata'
|
262
|
+
property :name, as: 'name'
|
263
|
+
hash :response, as: 'response'
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
class OperationMetadata
|
268
|
+
# @private
|
269
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
270
|
+
property :create_time, as: 'createTime'
|
271
|
+
property :end_time, as: 'endTime'
|
272
|
+
property :operation_type, as: 'operationType'
|
273
|
+
property :resource, as: 'resource'
|
274
|
+
property :resource_uuid, as: 'resourceUuid'
|
275
|
+
property :state, as: 'state'
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
class PrivateClusterConfig
|
280
|
+
# @private
|
281
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
282
|
+
property :enable_private_endpoint, as: 'enablePrivateEndpoint'
|
283
|
+
property :master_ipv4_cidr_block, as: 'masterIpv4CidrBlock'
|
284
|
+
property :master_ipv4_reserved_range, as: 'masterIpv4ReservedRange'
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
class PrivateEnvironmentConfig
|
289
|
+
# @private
|
290
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
291
|
+
property :cloud_sql_ipv4_cidr_block, as: 'cloudSqlIpv4CidrBlock'
|
292
|
+
property :enable_private_environment, as: 'enablePrivateEnvironment'
|
293
|
+
property :private_cluster_config, as: 'privateClusterConfig', class: Google::Apis::ComposerV1::PrivateClusterConfig, decorator: Google::Apis::ComposerV1::PrivateClusterConfig::Representation
|
294
|
+
|
295
|
+
property :web_server_ipv4_cidr_block, as: 'webServerIpv4CidrBlock'
|
296
|
+
property :web_server_ipv4_reserved_range, as: 'webServerIpv4ReservedRange'
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
class SoftwareConfig
|
301
|
+
# @private
|
302
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
303
|
+
hash :airflow_config_overrides, as: 'airflowConfigOverrides'
|
304
|
+
hash :env_variables, as: 'envVariables'
|
305
|
+
property :image_version, as: 'imageVersion'
|
306
|
+
hash :pypi_packages, as: 'pypiPackages'
|
307
|
+
property :python_version, as: 'pythonVersion'
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
class Status
|
312
|
+
# @private
|
313
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
314
|
+
property :code, as: 'code'
|
315
|
+
collection :details, as: 'details'
|
316
|
+
property :message, as: 'message'
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
class WebServerNetworkAccessControl
|
321
|
+
# @private
|
322
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
323
|
+
collection :allowed_ip_ranges, as: 'allowedIpRanges', class: Google::Apis::ComposerV1::AllowedIpRange, decorator: Google::Apis::ComposerV1::AllowedIpRange::Representation
|
324
|
+
|
325
|
+
end
|
326
|
+
end
|
327
|
+
end
|
328
|
+
end
|
329
|
+
end
|
@@ -0,0 +1,436 @@
|
|
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 ComposerV1
|
23
|
+
# Cloud Composer API
|
24
|
+
#
|
25
|
+
# Manages Apache Airflow environments on Google Cloud Platform.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/composer_v1'
|
29
|
+
#
|
30
|
+
# Composer = Google::Apis::ComposerV1 # 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_v1',
|
48
|
+
client_version: Google::Apis::ComposerV1::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::ComposerV1::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::ComposerV1::Operation] parsed result object
|
66
|
+
# @yieldparam err [StandardError] error object if request failed
|
67
|
+
#
|
68
|
+
# @return [Google::Apis::ComposerV1::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, 'v1/{+parent}/environments', options)
|
75
|
+
command.request_representation = Google::Apis::ComposerV1::Environment::Representation
|
76
|
+
command.request_object = environment_object
|
77
|
+
command.response_representation = Google::Apis::ComposerV1::Operation::Representation
|
78
|
+
command.response_class = Google::Apis::ComposerV1::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::ComposerV1::Operation] parsed result object
|
99
|
+
# @yieldparam err [StandardError] error object if request failed
|
100
|
+
#
|
101
|
+
# @return [Google::Apis::ComposerV1::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, 'v1/{+name}', options)
|
108
|
+
command.response_representation = Google::Apis::ComposerV1::Operation::Representation
|
109
|
+
command.response_class = Google::Apis::ComposerV1::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::ComposerV1::Environment] parsed result object
|
130
|
+
# @yieldparam err [StandardError] error object if request failed
|
131
|
+
#
|
132
|
+
# @return [Google::Apis::ComposerV1::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, 'v1/{+name}', options)
|
139
|
+
command.response_representation = Google::Apis::ComposerV1::Environment::Representation
|
140
|
+
command.response_class = Google::Apis::ComposerV1::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::ComposerV1::ListEnvironmentsResponse] parsed result object
|
165
|
+
# @yieldparam err [StandardError] error object if request failed
|
166
|
+
#
|
167
|
+
# @return [Google::Apis::ComposerV1::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, 'v1/{+parent}/environments', options)
|
174
|
+
command.response_representation = Google::Apis::ComposerV1::ListEnvironmentsResponse::Representation
|
175
|
+
command.response_class = Google::Apis::ComposerV1::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::ComposerV1::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 numpy,
|
193
|
+
# the `updateMask` parameter would include the following two `paths` values: "
|
194
|
+
# config.softwareConfig.pypiPackages.scikit-learn" and "config.softwareConfig.
|
195
|
+
# pypiPackages.numpy". The included patch environment would specify the scikit-
|
196
|
+
# learn version as follows: ` "config":` "softwareConfig":` "pypiPackages":` "
|
197
|
+
# scikit-learn":"==0.19.0" ` ` ` ` Note that in the above example, any existing
|
198
|
+
# PyPI packages other than scikit-learn and numpy will be unaffected. Only one
|
199
|
+
# update type may be included in a single request's `updateMask`. For example,
|
200
|
+
# one cannot update both the PyPI packages and labels in the same request.
|
201
|
+
# However, it is possible to update multiple members of a map field
|
202
|
+
# simultaneously in the same request. For example, to set the labels "label1"
|
203
|
+
# and "label2" while clearing "label3" (assuming it already exists), one can
|
204
|
+
# provide the paths "labels.label1", "labels.label2", and "labels.label3" and
|
205
|
+
# populate the patch environment as follows: ` "labels":` "label1":"new-label1-
|
206
|
+
# value" "label2":"new-label2-value" ` ` Note that in the above example, any
|
207
|
+
# existing labels that are not included in the `updateMask` will be unaffected.
|
208
|
+
# It is also possible to replace an entire map field by providing the map field'
|
209
|
+
# s path in the `updateMask`. The new value of the field will be that which is
|
210
|
+
# provided in the patch environment. For example, to delete all pre-existing
|
211
|
+
# user-specified PyPI packages and install botocore at version 1.7.14, the `
|
212
|
+
# updateMask` would contain the path "config.softwareConfig.pypiPackages", and
|
213
|
+
# the patch environment would be the following: ` "config":` "softwareConfig":` "
|
214
|
+
# pypiPackages":` "botocore":"==1.7.14" ` ` ` ` **Note:** Only the following
|
215
|
+
# fields can be updated: *Mask* *Purpose* 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 package
|
220
|
+
# packagename, preserving other packages. To delete the package, include it in `
|
221
|
+
# updateMask`, and omit the mapping for it in `environment.config.softwareConfig.
|
222
|
+
# pypiPackages`. It is an error to provide both a mask of this form and the "
|
223
|
+
# config.softwareConfig.pypiPackages" mask. labels Replace all environment
|
224
|
+
# labels. If a replacement labels map is not included in `environment`, all
|
225
|
+
# labels are cleared. It is an error to provide both this mask and a mask
|
226
|
+
# specifying one or more individual labels. labels.labelName Set the label named
|
227
|
+
# labelName, while preserving other labels. To delete the label, include it in `
|
228
|
+
# updateMask` and omit its mapping in `environment.labels`. It is an error to
|
229
|
+
# provide both a mask of this form and the "labels" mask. config.nodeCount
|
230
|
+
# Horizontally scale the number of nodes in the environment. An integer greater
|
231
|
+
# than or equal to 3 must be provided in the `config.nodeCount` field. config.
|
232
|
+
# webServerNetworkAccessControl Replace the environment's current
|
233
|
+
# WebServerNetworkAccessControl. config.softwareConfig.airflowConfigOverrides
|
234
|
+
# Replace all Apache Airflow config overrides. If a replacement config overrides
|
235
|
+
# map is not included in `environment`, all config overrides are cleared. It is
|
236
|
+
# an error to provide both this mask and a mask specifying one or more
|
237
|
+
# individual config overrides. config.softwareConfig.airflowConfigOverrides.
|
238
|
+
# section-name Override the Apache Airflow config property name in the section
|
239
|
+
# named section, preserving other properties. To delete the property override,
|
240
|
+
# include it in `updateMask` and omit its mapping in `environment.config.
|
241
|
+
# softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask
|
242
|
+
# of this form and the "config.softwareConfig.airflowConfigOverrides" mask.
|
243
|
+
# config.softwareConfig.envVariables Replace all environment variables. If a
|
244
|
+
# replacement environment variable map is not included in `environment`, all
|
245
|
+
# custom environment variables are cleared. It is an error to provide both this
|
246
|
+
# mask and a mask specifying one or more individual environment variables.
|
247
|
+
# @param [String] fields
|
248
|
+
# Selector specifying which fields to include in a partial response.
|
249
|
+
# @param [String] quota_user
|
250
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
251
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
252
|
+
# @param [Google::Apis::RequestOptions] options
|
253
|
+
# Request-specific options
|
254
|
+
#
|
255
|
+
# @yield [result, err] Result & error if block supplied
|
256
|
+
# @yieldparam result [Google::Apis::ComposerV1::Operation] parsed result object
|
257
|
+
# @yieldparam err [StandardError] error object if request failed
|
258
|
+
#
|
259
|
+
# @return [Google::Apis::ComposerV1::Operation]
|
260
|
+
#
|
261
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
262
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
263
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
264
|
+
def patch_project_location_environment(name, environment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
265
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
266
|
+
command.request_representation = Google::Apis::ComposerV1::Environment::Representation
|
267
|
+
command.request_object = environment_object
|
268
|
+
command.response_representation = Google::Apis::ComposerV1::Operation::Representation
|
269
|
+
command.response_class = Google::Apis::ComposerV1::Operation
|
270
|
+
command.params['name'] = name unless name.nil?
|
271
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
272
|
+
command.query['fields'] = fields unless fields.nil?
|
273
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
274
|
+
execute_or_queue_command(command, &block)
|
275
|
+
end
|
276
|
+
|
277
|
+
# List ImageVersions for provided location.
|
278
|
+
# @param [String] parent
|
279
|
+
# List ImageVersions in the given project and location, in the form: "projects/`
|
280
|
+
# projectId`/locations/`locationId`"
|
281
|
+
# @param [Boolean] include_past_releases
|
282
|
+
# Whether or not image versions from old releases should be included.
|
283
|
+
# @param [Fixnum] page_size
|
284
|
+
# The maximum number of image_versions to return.
|
285
|
+
# @param [String] page_token
|
286
|
+
# The next_page_token value returned from a previous List request, if any.
|
287
|
+
# @param [String] fields
|
288
|
+
# Selector specifying which fields to include in a partial response.
|
289
|
+
# @param [String] quota_user
|
290
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
291
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
292
|
+
# @param [Google::Apis::RequestOptions] options
|
293
|
+
# Request-specific options
|
294
|
+
#
|
295
|
+
# @yield [result, err] Result & error if block supplied
|
296
|
+
# @yieldparam result [Google::Apis::ComposerV1::ListImageVersionsResponse] parsed result object
|
297
|
+
# @yieldparam err [StandardError] error object if request failed
|
298
|
+
#
|
299
|
+
# @return [Google::Apis::ComposerV1::ListImageVersionsResponse]
|
300
|
+
#
|
301
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
302
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
303
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
304
|
+
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)
|
305
|
+
command = make_simple_command(:get, 'v1/{+parent}/imageVersions', options)
|
306
|
+
command.response_representation = Google::Apis::ComposerV1::ListImageVersionsResponse::Representation
|
307
|
+
command.response_class = Google::Apis::ComposerV1::ListImageVersionsResponse
|
308
|
+
command.params['parent'] = parent unless parent.nil?
|
309
|
+
command.query['includePastReleases'] = include_past_releases unless include_past_releases.nil?
|
310
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
311
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
312
|
+
command.query['fields'] = fields unless fields.nil?
|
313
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
314
|
+
execute_or_queue_command(command, &block)
|
315
|
+
end
|
316
|
+
|
317
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
318
|
+
# longer interested in the operation result. It does not cancel the operation.
|
319
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
320
|
+
# UNIMPLEMENTED`.
|
321
|
+
# @param [String] name
|
322
|
+
# The name of the operation resource to be deleted.
|
323
|
+
# @param [String] fields
|
324
|
+
# Selector specifying which fields to include in a partial response.
|
325
|
+
# @param [String] quota_user
|
326
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
327
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
328
|
+
# @param [Google::Apis::RequestOptions] options
|
329
|
+
# Request-specific options
|
330
|
+
#
|
331
|
+
# @yield [result, err] Result & error if block supplied
|
332
|
+
# @yieldparam result [Google::Apis::ComposerV1::Empty] parsed result object
|
333
|
+
# @yieldparam err [StandardError] error object if request failed
|
334
|
+
#
|
335
|
+
# @return [Google::Apis::ComposerV1::Empty]
|
336
|
+
#
|
337
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
338
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
339
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
340
|
+
def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
341
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
342
|
+
command.response_representation = Google::Apis::ComposerV1::Empty::Representation
|
343
|
+
command.response_class = Google::Apis::ComposerV1::Empty
|
344
|
+
command.params['name'] = name unless name.nil?
|
345
|
+
command.query['fields'] = fields unless fields.nil?
|
346
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
347
|
+
execute_or_queue_command(command, &block)
|
348
|
+
end
|
349
|
+
|
350
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
351
|
+
# to poll the operation result at intervals as recommended by the API service.
|
352
|
+
# @param [String] name
|
353
|
+
# The name of the operation resource.
|
354
|
+
# @param [String] fields
|
355
|
+
# Selector specifying which fields to include in a partial response.
|
356
|
+
# @param [String] quota_user
|
357
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
358
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
359
|
+
# @param [Google::Apis::RequestOptions] options
|
360
|
+
# Request-specific options
|
361
|
+
#
|
362
|
+
# @yield [result, err] Result & error if block supplied
|
363
|
+
# @yieldparam result [Google::Apis::ComposerV1::Operation] parsed result object
|
364
|
+
# @yieldparam err [StandardError] error object if request failed
|
365
|
+
#
|
366
|
+
# @return [Google::Apis::ComposerV1::Operation]
|
367
|
+
#
|
368
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
369
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
370
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
371
|
+
def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
372
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
373
|
+
command.response_representation = Google::Apis::ComposerV1::Operation::Representation
|
374
|
+
command.response_class = Google::Apis::ComposerV1::Operation
|
375
|
+
command.params['name'] = name unless name.nil?
|
376
|
+
command.query['fields'] = fields unless fields.nil?
|
377
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
378
|
+
execute_or_queue_command(command, &block)
|
379
|
+
end
|
380
|
+
|
381
|
+
# Lists operations that match the specified filter in the request. If the server
|
382
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
|
383
|
+
# binding allows API services to override the binding to use different resource
|
384
|
+
# name schemes, such as `users/*/operations`. To override the binding, API
|
385
|
+
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
|
386
|
+
# service configuration. For backwards compatibility, the default name includes
|
387
|
+
# the operations collection id, however overriding users must ensure the name
|
388
|
+
# binding is the parent resource, without the operations collection id.
|
389
|
+
# @param [String] name
|
390
|
+
# The name of the operation's parent resource.
|
391
|
+
# @param [String] filter
|
392
|
+
# The standard list filter.
|
393
|
+
# @param [Fixnum] page_size
|
394
|
+
# The standard list page size.
|
395
|
+
# @param [String] page_token
|
396
|
+
# The standard list page token.
|
397
|
+
# @param [String] fields
|
398
|
+
# Selector specifying which fields to include in a partial response.
|
399
|
+
# @param [String] quota_user
|
400
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
401
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
402
|
+
# @param [Google::Apis::RequestOptions] options
|
403
|
+
# Request-specific options
|
404
|
+
#
|
405
|
+
# @yield [result, err] Result & error if block supplied
|
406
|
+
# @yieldparam result [Google::Apis::ComposerV1::ListOperationsResponse] parsed result object
|
407
|
+
# @yieldparam err [StandardError] error object if request failed
|
408
|
+
#
|
409
|
+
# @return [Google::Apis::ComposerV1::ListOperationsResponse]
|
410
|
+
#
|
411
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
412
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
413
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
414
|
+
def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
415
|
+
command = make_simple_command(:get, 'v1/{+name}/operations', options)
|
416
|
+
command.response_representation = Google::Apis::ComposerV1::ListOperationsResponse::Representation
|
417
|
+
command.response_class = Google::Apis::ComposerV1::ListOperationsResponse
|
418
|
+
command.params['name'] = name unless name.nil?
|
419
|
+
command.query['filter'] = filter unless filter.nil?
|
420
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
421
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
422
|
+
command.query['fields'] = fields unless fields.nil?
|
423
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
424
|
+
execute_or_queue_command(command, &block)
|
425
|
+
end
|
426
|
+
|
427
|
+
protected
|
428
|
+
|
429
|
+
def apply_command_defaults(command)
|
430
|
+
command.query['key'] = key unless key.nil?
|
431
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
432
|
+
end
|
433
|
+
end
|
434
|
+
end
|
435
|
+
end
|
436
|
+
end
|