google-cloud-resource_manager 0.20.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41fc6c1e4e4e8af2963be56fd2063d4e659b4a8f
4
- data.tar.gz: ba88a1a1c5c060bce2cc9ec6b7117bb3dbe6c35a
3
+ metadata.gz: 681b7cd2725c8b6e4483365de34365abea8376ce
4
+ data.tar.gz: cfaa50c64c399a8f9a15a0f587de3fe70d0e6e83
5
5
  SHA512:
6
- metadata.gz: 4c80341fa2da6204da9d9493dc2594cdaca73b7407f9ea1dfb858541a68aef5ca1d53330c516ffaf540782ff4e7e682d0410cd2f73c4e26fa9a4b7bf7e33ce98
7
- data.tar.gz: ffd3bfe1e1efd30e9ae458d51f9415c4b964ef18d61b441a7dab41249d7f3981671be38533b978dae1f5e8edc9e46e70ee3415750773462135ebc9d8e028fad9
6
+ metadata.gz: 8951ae2ad735c55fa5ac6ec000c4e2d95b80d0e990e9a8ed2c8ceb9e0809953050b3e2ec36b1e687f8c255d31c0c3ce4168e4db7d76a6decb4a6b5ec6f1bb2e7
7
+ data.tar.gz: b7de2db0de64fb23b34090784d27bdf82c78d39316c3bf88b760e082cfb1f8774adcc37640567c88f1bff0437f37e985588b5491d48f57b80b5aedb44bdb2812
@@ -91,7 +91,7 @@ module Google
91
91
  # @return [Google::Cloud::ResourceManager::Manager]
92
92
  #
93
93
  # @example
94
- # require "google/cloud/resource_manager"
94
+ # require "google/cloud"
95
95
  #
96
96
  # resource_manager = Google::Cloud.resource_manager
97
97
  # resource_manager.projects.each do |project|
@@ -101,16 +101,8 @@ module Google
101
101
  def self.resource_manager keyfile = nil, scope: nil, retries: nil,
102
102
  timeout: nil
103
103
  require "google/cloud/resource_manager"
104
- if keyfile.nil?
105
- credentials = Google::Cloud::ResourceManager::Credentials.default(
106
- scope: scope)
107
- else
108
- credentials = Google::Cloud::ResourceManager::Credentials.new(
109
- keyfile, scope: scope)
110
- end
111
- Google::Cloud::ResourceManager::Manager.new(
112
- Google::Cloud::ResourceManager::Service.new(
113
- credentials, retries: retries, timeout: timeout))
104
+ Google::Cloud::ResourceManager.new keyfile: keyfile, scope: scope,
105
+ retries: retries, timeout: timeout
114
106
  end
115
107
  end
116
108
  end
@@ -64,10 +64,9 @@ module Google
64
64
  # authentication and connect with those credentials.
65
65
  #
66
66
  # ```ruby
67
- # require "google/cloud"
67
+ # require "google/cloud/resource_manager"
68
68
  #
69
- # gcloud = Google::Cloud.new
70
- # resource_manager = gcloud.resource_manager
69
+ # resource_manager = Google::Cloud::ResourceManager.new
71
70
  # ```
72
71
  #
73
72
  # ## Listing Projects
@@ -78,10 +77,9 @@ module Google
78
77
  # {Google::Cloud::ResourceManager::Manager#projects})
79
78
  #
80
79
  # ```ruby
81
- # require "google/cloud"
80
+ # require "google/cloud/resource_manager"
82
81
  #
83
- # gcloud = Google::Cloud.new
84
- # resource_manager = gcloud.resource_manager
82
+ # resource_manager = Google::Cloud::ResourceManager.new
85
83
  # resource_manager.projects.each do |project|
86
84
  # puts projects.project_id
87
85
  # end
@@ -93,10 +91,9 @@ module Google
93
91
  # {Google::Cloud::ResourceManager::Project#labels})
94
92
  #
95
93
  # ```ruby
96
- # require "google/cloud"
94
+ # require "google/cloud/resource_manager"
97
95
  #
98
- # gcloud = Google::Cloud.new
99
- # resource_manager = gcloud.resource_manager
96
+ # resource_manager = Google::Cloud::ResourceManager.new
100
97
  # project = resource_manager.project "tokyo-rain-123"
101
98
  # # Label the project as production
102
99
  # project.update do |p|
@@ -108,10 +105,9 @@ module Google
108
105
  # {Google::Cloud::ResourceManager::Manager#projects})
109
106
  #
110
107
  # ```ruby
111
- # require "google/cloud"
108
+ # require "google/cloud/resource_manager"
112
109
  #
113
- # gcloud = Google::Cloud.new
114
- # resource_manager = gcloud.resource_manager
110
+ # resource_manager = Google::Cloud::ResourceManager.new
115
111
  # # Find only the productions projects
116
112
  # projects = resource_manager.projects filter: "labels.env:production"
117
113
  # projects.each do |project|
@@ -125,10 +121,9 @@ module Google
125
121
  # {Google::Cloud::ResourceManager::Manager#create_project})
126
122
  #
127
123
  # ```ruby
128
- # require "google/cloud"
124
+ # require "google/cloud/resource_manager"
129
125
  #
130
- # gcloud = Google::Cloud.new
131
- # resource_manager = gcloud.resource_manager
126
+ # resource_manager = Google::Cloud::ResourceManager.new
132
127
  # project = resource_manager.create_project "tokyo-rain-123",
133
128
  # name: "Todos Development",
134
129
  # labels: {env: :development}
@@ -141,10 +136,9 @@ module Google
141
136
  # {Google::Cloud::ResourceManager::Project#delete})
142
137
  #
143
138
  # ```ruby
144
- # require "google/cloud"
139
+ # require "google/cloud/resource_manager"
145
140
  #
146
- # gcloud = Google::Cloud.new
147
- # resource_manager = gcloud.resource_manager
141
+ # resource_manager = Google::Cloud::ResourceManager.new
148
142
  # resource_manager.delete "tokyo-rain-123"
149
143
  # ```
150
144
  #
@@ -157,10 +151,9 @@ module Google
157
151
  # {Google::Cloud::ResourceManager::Project#undelete})
158
152
  #
159
153
  # ```ruby
160
- # require "google/cloud"
154
+ # require "google/cloud/resource_manager"
161
155
  #
162
- # gcloud = Google::Cloud.new
163
- # resource_manager = gcloud.resource_manager
156
+ # resource_manager = Google::Cloud::ResourceManager.new
164
157
  # resource_manager.undelete "tokyo-rain-123"
165
158
  # ```
166
159
  #
@@ -178,10 +171,10 @@ module Google
178
171
  # You can also set the request `timeout` value in seconds.
179
172
  #
180
173
  # ```ruby
181
- # require "google/cloud"
174
+ # require "google/cloud/resource_manager"
182
175
  #
183
- # gcloud = Google::Cloud.new
184
- # resource_manager = gcloud.resource_manager retries: 10, timeout: 120
176
+ # resource_manager = Google::Cloud::ResourceManager.new retries: 10,
177
+ # timeout: 120
185
178
  # ```
186
179
  #
187
180
  # See the [Resource Manager error
@@ -202,10 +195,9 @@ module Google
202
195
  # {Google::Cloud::ResourceManager::Policy}.)
203
196
  #
204
197
  # ```ruby
205
- # require "google/cloud"
198
+ # require "google/cloud/resource_manager"
206
199
  #
207
- # gcloud = Google::Cloud.new
208
- # resource_manager = gcloud.resource_manager
200
+ # resource_manager = Google::Cloud::ResourceManager.new
209
201
  # project = resource_manager.project "tokyo-rain-123"
210
202
  # policy = project.policy
211
203
  # ```
@@ -213,10 +205,9 @@ module Google
213
205
  # A project's access control policy can also be updated:
214
206
  #
215
207
  # ```ruby
216
- # require "google/cloud"
208
+ # require "google/cloud/resource_manager"
217
209
  #
218
- # gcloud = Google::Cloud.new
219
- # resource_manager = gcloud.resource_manager
210
+ # resource_manager = Google::Cloud::ResourceManager.new
220
211
  # project = resource_manager.project "tokyo-rain-123"
221
212
  #
222
213
  # policy = project.policy do |p|
@@ -228,10 +219,9 @@ module Google
228
219
  # {Google::Cloud::ResourceManager::Project#test_permissions})
229
220
  #
230
221
  # ```ruby
231
- # require "google/cloud"
222
+ # require "google/cloud/resource_manager"
232
223
  #
233
- # gcloud = Google::Cloud.new
234
- # resource_manager = gcloud.resource_manager
224
+ # resource_manager = Google::Cloud::ResourceManager.new
235
225
  # project = resource_manager.project "tokyo-rain-123"
236
226
  # perms = project.test_permissions "resourcemanager.projects.get",
237
227
  # "resourcemanager.projects.delete"
@@ -243,6 +233,50 @@ module Google
243
233
  # Policies](https://cloud.google.com/iam/docs/managing-policies).
244
234
  #
245
235
  module ResourceManager
236
+ ##
237
+ # Creates a new `Project` instance connected to the Resource Manager
238
+ # service. Each call creates a new connection.
239
+ #
240
+ # For more information on connecting to Google Cloud see the
241
+ # [Authentication
242
+ # Guide](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/guides/authentication).
243
+ #
244
+ # @param [String, Hash] keyfile Keyfile downloaded from Google Cloud. If
245
+ # file path the file must be readable.
246
+ # @param [String, Array<String>] scope The OAuth 2.0 scopes controlling
247
+ # the set of resources and operations that the connection can access.
248
+ # See [Using OAuth 2.0 to Access Google
249
+ # APIs](https://developers.google.com/identity/protocols/OAuth2).
250
+ #
251
+ # The default scope is:
252
+ #
253
+ # * `https://www.googleapis.com/auth/cloud-platform`
254
+ # @param [Integer] retries Number of times to retry requests on server
255
+ # error. The default value is `3`. Optional.
256
+ # @param [Integer] timeout Default timeout to use in requests. Optional.
257
+ #
258
+ # @return [Google::Cloud::ResourceManager::Manager]
259
+ #
260
+ # @example
261
+ # require "google/cloud/resource_manager"
262
+ #
263
+ # resource_manager = Google::Cloud::ResourceManager.new
264
+ # resource_manager.projects.each do |project|
265
+ # puts projects.project_id
266
+ # end
267
+ #
268
+ def self.new keyfile: nil, scope: nil, retries: nil, timeout: nil
269
+ if keyfile.nil?
270
+ credentials = Google::Cloud::ResourceManager::Credentials.default(
271
+ scope: scope)
272
+ else
273
+ credentials = Google::Cloud::ResourceManager::Credentials.new(
274
+ keyfile, scope: scope)
275
+ end
276
+ Google::Cloud::ResourceManager::Manager.new(
277
+ Google::Cloud::ResourceManager::Service.new(
278
+ credentials, retries: retries, timeout: timeout))
279
+ end
246
280
  end
247
281
  end
248
282
  end
@@ -27,10 +27,9 @@ module Google
27
27
  # Provides methods for creating, retrieving, and updating projects.
28
28
  #
29
29
  # @example
30
- # require "google/cloud"
30
+ # require "google/cloud/resource_manager"
31
31
  #
32
- # gcloud = Google::Cloud.new
33
- # resource_manager = gcloud.resource_manager
32
+ # resource_manager = Google::Cloud::ResourceManager.new
34
33
  # resource_manager.projects.each do |project|
35
34
  # puts projects.project_id
36
35
  # end
@@ -82,10 +81,9 @@ module Google
82
81
  # {Google::Cloud::ResourceManager::Project::List})
83
82
  #
84
83
  # @example
85
- # require "google/cloud"
84
+ # require "google/cloud/resource_manager"
86
85
  #
87
- # gcloud = Google::Cloud.new
88
- # resource_manager = gcloud.resource_manager
86
+ # resource_manager = Google::Cloud::ResourceManager.new
89
87
  # projects = resource_manager.projects
90
88
  #
91
89
  # projects.each do |project|
@@ -93,10 +91,9 @@ module Google
93
91
  # end
94
92
  #
95
93
  # @example Projects can be filtered using the `filter` option:
96
- # require "google/cloud"
94
+ # require "google/cloud/resource_manager"
97
95
  #
98
- # gcloud = Google::Cloud.new
99
- # resource_manager = gcloud.resource_manager
96
+ # resource_manager = Google::Cloud::ResourceManager.new
100
97
  # projects = resource_manager.projects filter: "labels.env:production"
101
98
  #
102
99
  # projects.each do |project|
@@ -104,10 +101,9 @@ module Google
104
101
  # end
105
102
  #
106
103
  # @example Retrieve all projects: (See {Project::List#all})
107
- # require "google/cloud"
104
+ # require "google/cloud/resource_manager"
108
105
  #
109
- # gcloud = Google::Cloud.new
110
- # resource_manager = gcloud.resource_manager
106
+ # resource_manager = Google::Cloud::ResourceManager.new
111
107
  # projects = resource_manager.projects
112
108
  #
113
109
  # projects.all do |project|
@@ -128,10 +124,9 @@ module Google
128
124
  # if the project does not exist
129
125
  #
130
126
  # @example
131
- # require "google/cloud"
127
+ # require "google/cloud/resource_manager"
132
128
  #
133
- # gcloud = Google::Cloud.new
134
- # resource_manager = gcloud.resource_manager
129
+ # resource_manager = Google::Cloud::ResourceManager.new
135
130
  # project = resource_manager.project "tokyo-rain-123"
136
131
  # project.project_id #=> "tokyo-rain-123"
137
132
  #
@@ -175,17 +170,15 @@ module Google
175
170
  # @return [Google::Cloud::ResourceManager::Project]
176
171
  #
177
172
  # @example
178
- # require "google/cloud"
173
+ # require "google/cloud/resource_manager"
179
174
  #
180
- # gcloud = Google::Cloud.new
181
- # resource_manager = gcloud.resource_manager
175
+ # resource_manager = Google::Cloud::ResourceManager.new
182
176
  # project = resource_manager.create_project "tokyo-rain-123"
183
177
  #
184
178
  # @example A project can also be created with a `name` and `labels`:
185
- # require "google/cloud"
179
+ # require "google/cloud/resource_manager"
186
180
  #
187
- # gcloud = Google::Cloud.new
188
- # resource_manager = gcloud.resource_manager
181
+ # resource_manager = Google::Cloud::ResourceManager.new
189
182
  # project = resource_manager.create_project "tokyo-rain-123",
190
183
  # name: "Todos Development", labels: {env: :development}
191
184
  #
@@ -217,10 +210,9 @@ module Google
217
210
  # @param [String] project_id The ID of the project.
218
211
  #
219
212
  # @example
220
- # require "google/cloud"
213
+ # require "google/cloud/resource_manager"
221
214
  #
222
- # gcloud = Google::Cloud.new
223
- # resource_manager = gcloud.resource_manager
215
+ # resource_manager = Google::Cloud::ResourceManager.new
224
216
  # resource_manager.delete "tokyo-rain-123"
225
217
  #
226
218
  def delete project_id
@@ -239,10 +231,9 @@ module Google
239
231
  # @param [String] project_id The ID of the project.
240
232
  #
241
233
  # @example
242
- # require "google/cloud"
234
+ # require "google/cloud/resource_manager"
243
235
  #
244
- # gcloud = Google::Cloud.new
245
- # resource_manager = gcloud.resource_manager
236
+ # resource_manager = Google::Cloud::ResourceManager.new
246
237
  # resource_manager.undelete "tokyo-rain-123"
247
238
  #
248
239
  def undelete project_id
@@ -57,10 +57,9 @@ module Google
57
57
  # for a listing of values and patterns for members.
58
58
  #
59
59
  # @example
60
- # require "google/cloud"
60
+ # require "google/cloud/resource_manager"
61
61
  #
62
- # gcloud = Google::Cloud.new
63
- # resource_manager = gcloud.resource_manager
62
+ # resource_manager = Google::Cloud::ResourceManager.new
64
63
  # project = resource_manager.project "tokyo-rain-123"
65
64
  #
66
65
  # policy = project.policy # API call
@@ -98,10 +97,9 @@ module Google
98
97
  # `"user:owner@example.com"`.
99
98
  #
100
99
  # @example
101
- # require "google/cloud"
100
+ # require "google/cloud/resource_manager"
102
101
  #
103
- # gcloud = Google::Cloud.new
104
- # resource_manager = gcloud.resource_manager
102
+ # resource_manager = Google::Cloud::ResourceManager.new
105
103
  # project = resource_manager.project "tokyo-rain-123"
106
104
  #
107
105
  # policy = project.policy # API call
@@ -127,10 +125,9 @@ module Google
127
125
  # `"user:owner@example.com"`.
128
126
  #
129
127
  # @example
130
- # require "google/cloud"
128
+ # require "google/cloud/resource_manager"
131
129
  #
132
- # gcloud = Google::Cloud.new
133
- # resource_manager = gcloud.resource_manager
130
+ # resource_manager = Google::Cloud::ResourceManager.new
134
131
  # project = resource_manager.project "tokyo-rain-123"
135
132
  #
136
133
  # policy = project.policy # API call
@@ -155,10 +152,9 @@ module Google
155
152
  # @return [Array<String>] The members strings, or an empty array.
156
153
  #
157
154
  # @example
158
- # require "google/cloud"
155
+ # require "google/cloud/resource_manager"
159
156
  #
160
- # gcloud = Google::Cloud.new
161
- # resource_manager = gcloud.resource_manager
157
+ # resource_manager = Google::Cloud::ResourceManager.new
162
158
  # project = resource_manager.project "tokyo-rain-123"
163
159
  #
164
160
  # policy = project.policy
@@ -29,10 +29,9 @@ module Google
29
29
  # resources.
30
30
  #
31
31
  # @example
32
- # require "google/cloud"
32
+ # require "google/cloud/resource_manager"
33
33
  #
34
- # gcloud = Google::Cloud.new
35
- # resource_manager = gcloud.resource_manager
34
+ # resource_manager = Google::Cloud::ResourceManager.new
36
35
  # project = resource_manager.project "tokyo-rain-123"
37
36
  # project.update do |p|
38
37
  # p.name = "My Project"
@@ -86,10 +85,9 @@ module Google
86
85
  # hyphen, single-quote, double-quote, space, and exclamation point.
87
86
  #
88
87
  # @example
89
- # require "google/cloud"
88
+ # require "google/cloud/resource_manager"
90
89
  #
91
- # gcloud = Google::Cloud.new
92
- # resource_manager = gcloud.resource_manager
90
+ # resource_manager = Google::Cloud::ResourceManager.new
93
91
  # project = resource_manager.project "tokyo-rain-123"
94
92
  # project.name = "My Project"
95
93
  #
@@ -115,19 +113,17 @@ module Google
115
113
  # @yieldparam [Hash] labels the hash accepting labels
116
114
  #
117
115
  # @example Labels are read-only and cannot be changed:
118
- # require "google/cloud"
116
+ # require "google/cloud/resource_manager"
119
117
  #
120
- # gcloud = Google::Cloud.new
121
- # resource_manager = gcloud.resource_manager
118
+ # resource_manager = Google::Cloud::ResourceManager.new
122
119
  # project = resource_manager.project "tokyo-rain-123"
123
120
  # project.labels["env"] #=> "dev" # read only
124
121
  # project.labels["env"] = "production" # raises error
125
122
  #
126
123
  # @example Labels can be updated by passing a block, or with {#labels=}:
127
- # require "google/cloud"
124
+ # require "google/cloud/resource_manager"
128
125
  #
129
- # gcloud = Google::Cloud.new
130
- # resource_manager = gcloud.resource_manager
126
+ # resource_manager = Google::Cloud::ResourceManager.new
131
127
  # project = resource_manager.project "tokyo-rain-123"
132
128
  # project.labels do |labels|
133
129
  # labels["env"] = "production"
@@ -157,10 +153,9 @@ module Google
157
153
  # (`Hash`)
158
154
  #
159
155
  # @example
160
- # require "google/cloud"
156
+ # require "google/cloud/resource_manager"
161
157
  #
162
- # gcloud = Google::Cloud.new
163
- # resource_manager = gcloud.resource_manager
158
+ # resource_manager = Google::Cloud::ResourceManager.new
164
159
  # project = resource_manager.project "tokyo-rain-123"
165
160
  # project.labels = { "env" => "production" }
166
161
  #
@@ -232,10 +227,9 @@ module Google
232
227
  # updating the project
233
228
  #
234
229
  # @example
235
- # require "google/cloud"
230
+ # require "google/cloud/resource_manager"
236
231
  #
237
- # gcloud = Google::Cloud.new
238
- # resource_manager = gcloud.resource_manager
232
+ # resource_manager = Google::Cloud::ResourceManager.new
239
233
  # project = resource_manager.project "tokyo-rain-123"
240
234
  # project.update do |p|
241
235
  # p.name = "My Project"
@@ -256,10 +250,9 @@ module Google
256
250
  # Resource Manager service.
257
251
  #
258
252
  # @example
259
- # require "google/cloud"
253
+ # require "google/cloud/resource_manager"
260
254
  #
261
- # gcloud = Google::Cloud.new
262
- # resource_manager = gcloud.resource_manager
255
+ # resource_manager = Google::Cloud::ResourceManager.new
263
256
  # project = resource_manager.project "tokyo-rain-123"
264
257
  # project.reload!
265
258
  #
@@ -289,10 +282,9 @@ module Google
289
282
  # The caller must have modify permissions for this project.
290
283
  #
291
284
  # @example
292
- # require "google/cloud"
285
+ # require "google/cloud/resource_manager"
293
286
  #
294
- # gcloud = Google::Cloud.new
295
- # resource_manager = gcloud.resource_manager
287
+ # resource_manager = Google::Cloud::ResourceManager.new
296
288
  # project = resource_manager.project "tokyo-rain-123"
297
289
  # project.active? #=> true
298
290
  # project.delete
@@ -314,10 +306,9 @@ module Google
314
306
  # The caller must have modify permissions for this project.
315
307
  #
316
308
  # @example
317
- # require "google/cloud"
309
+ # require "google/cloud/resource_manager"
318
310
  #
319
- # gcloud = Google::Cloud.new
320
- # resource_manager = gcloud.resource_manager
311
+ # resource_manager = Google::Cloud::ResourceManager.new
321
312
  # project = resource_manager.project "tokyo-rain-123"
322
313
  # project.delete_requested? #=> true
323
314
  # project.undelete
@@ -352,30 +343,27 @@ module Google
352
343
  # @return [Policy] the current Cloud IAM Policy for this project
353
344
  #
354
345
  # @example Policy values are memoized to reduce the number of API calls:
355
- # require "google/cloud"
346
+ # require "google/cloud/resource_manager"
356
347
  #
357
- # gcloud = Google::Cloud.new
358
- # resource_manager = gcloud.resource_manager
348
+ # resource_manager = Google::Cloud::ResourceManager.new
359
349
  # project = resource_manager.project "tokyo-rain-123"
360
350
  #
361
351
  # policy = project.policy # API call
362
352
  # policy_2 = project.policy # No API call
363
353
  #
364
354
  # @example Use `force` to retrieve the latest policy from the service:
365
- # require "google/cloud"
355
+ # require "google/cloud/resource_manager"
366
356
  #
367
- # gcloud = Google::Cloud.new
368
- # resource_manager = gcloud.resource_manager
357
+ # resource_manager = Google::Cloud::ResourceManager.new
369
358
  # project = resource_manager.project "tokyo-rain-123"
370
359
  #
371
360
  # policy = project.policy force: true # API call
372
361
  # policy_2 = project.policy force: true # API call
373
362
  #
374
363
  # @example Update the policy by passing a block:
375
- # require "google/cloud"
364
+ # require "google/cloud/resource_manager"
376
365
  #
377
- # gcloud = Google::Cloud.new
378
- # resource_manager = gcloud.resource_manager
366
+ # resource_manager = Google::Cloud::ResourceManager.new
379
367
  # project = resource_manager.project "tokyo-rain-123"
380
368
  #
381
369
  # policy = project.policy do |p|
@@ -413,10 +401,9 @@ module Google
413
401
  # project
414
402
  #
415
403
  # @example
416
- # require "google/cloud"
404
+ # require "google/cloud/resource_manager"
417
405
  #
418
- # gcloud = Google::Cloud.new
419
- # resource_manager = gcloud.resource_manager
406
+ # resource_manager = Google::Cloud::ResourceManager.new
420
407
  # project = resource_manager.project "tokyo-rain-123"
421
408
  #
422
409
  # policy = project.policy # API call
@@ -447,10 +434,9 @@ module Google
447
434
  # @return [Array<String>] The permissions that have access
448
435
  #
449
436
  # @example
450
- # require "google/cloud"
437
+ # require "google/cloud/resource_manager"
451
438
  #
452
- # gcloud = Google::Cloud.new
453
- # resource_manager = gcloud.resource_manager
439
+ # resource_manager = Google::Cloud::ResourceManager.new
454
440
  # project = resource_manager.project "tokyo-rain-123"
455
441
  # perms = project.test_permissions "resourcemanager.projects.get",
456
442
  # "resourcemanager.projects.delete"
@@ -38,10 +38,9 @@ module Google
38
38
  # @return [Boolean]
39
39
  #
40
40
  # @example
41
- # require "google/cloud"
41
+ # require "google/cloud/resource_manager"
42
42
  #
43
- # gcloud = Google::Cloud.new
44
- # resource_manager = gcloud.resource_manager
43
+ # resource_manager = Google::Cloud::ResourceManager.new
45
44
  #
46
45
  # projects = resource_manager.projects
47
46
  # if projects.next?
@@ -58,10 +57,9 @@ module Google
58
57
  # @return [Project::List]
59
58
  #
60
59
  # @example
61
- # require "google/cloud"
60
+ # require "google/cloud/resource_manager"
62
61
  #
63
- # gcloud = Google::Cloud.new
64
- # resource_manager = gcloud.resource_manager
62
+ # resource_manager = Google::Cloud::ResourceManager.new
65
63
  #
66
64
  # projects = resource_manager.projects
67
65
  # if projects.next?
@@ -93,10 +91,9 @@ module Google
93
91
  # @return [Enumerator]
94
92
  #
95
93
  # @example Iterating each project by passing a block:
96
- # require "google/cloud"
94
+ # require "google/cloud/resource_manager"
97
95
  #
98
- # gcloud = Google::Cloud.new
99
- # resource_manager = gcloud.resource_manager
96
+ # resource_manager = Google::Cloud::ResourceManager.new
100
97
  # projects = resource_manager.projects
101
98
  #
102
99
  # projects.all do |project|
@@ -104,10 +101,9 @@ module Google
104
101
  # end
105
102
  #
106
103
  # @example Using the enumerator by not passing a block:
107
- # require "google/cloud"
104
+ # require "google/cloud/resource_manager"
108
105
  #
109
- # gcloud = Google::Cloud.new
110
- # resource_manager = gcloud.resource_manager
106
+ # resource_manager = Google::Cloud::ResourceManager.new
111
107
  # projects = resource_manager.projects
112
108
  #
113
109
  # all_project_ids = projects.all.map do |project|
@@ -115,10 +111,9 @@ module Google
115
111
  # end
116
112
  #
117
113
  # @example Limit the number of API calls made:
118
- # require "google/cloud"
114
+ # require "google/cloud/resource_manager"
119
115
  #
120
- # gcloud = Google::Cloud.new
121
- # resource_manager = gcloud.resource_manager
116
+ # resource_manager = Google::Cloud::ResourceManager.new
122
117
  # projects = resource_manager.projects
123
118
  #
124
119
  # projects.all(request_limit: 10) do |project|
@@ -26,10 +26,9 @@ module Google
26
26
  # methods are used to update the project data in a single API call.
27
27
  #
28
28
  # @example
29
- # require "google/cloud"
29
+ # require "google/cloud/resource_manager"
30
30
  #
31
- # gcloud = Google::Cloud.new
32
- # resource_manager = gcloud.resource_manager
31
+ # resource_manager = Google::Cloud::ResourceManager.new
33
32
  # project = resource_manager.project "tokyo-rain-123"
34
33
  # project.update do |p|
35
34
  # p.name = "My Project"
@@ -51,10 +50,9 @@ module Google
51
50
  # hyphen, single-quote, double-quote, space, and exclamation point.
52
51
  #
53
52
  # @example
54
- # require "google/cloud"
53
+ # require "google/cloud/resource_manager"
55
54
  #
56
- # gcloud = Google::Cloud.new
57
- # resource_manager = gcloud.resource_manager
55
+ # resource_manager = Google::Cloud::ResourceManager.new
58
56
  # project = resource_manager.project "tokyo-rain-123"
59
57
  # project.update do |p|
60
58
  # p.name = "My Project"
@@ -79,10 +77,9 @@ module Google
79
77
  # (`Hash`)
80
78
  #
81
79
  # @example
82
- # require "google/cloud"
80
+ # require "google/cloud/resource_manager"
83
81
  #
84
- # gcloud = Google::Cloud.new
85
- # resource_manager = gcloud.resource_manager
82
+ # resource_manager = Google::Cloud::ResourceManager.new
86
83
  # project = resource_manager.project "tokyo-rain-123"
87
84
  # project.update do |p|
88
85
  # p.labels["env"] = "production"
@@ -107,10 +104,9 @@ module Google
107
104
  # (`Hash`)
108
105
  #
109
106
  # @example
110
- # require "google/cloud"
107
+ # require "google/cloud/resource_manager"
111
108
  #
112
- # gcloud = Google::Cloud.new
113
- # resource_manager = gcloud.resource_manager
109
+ # resource_manager = Google::Cloud::ResourceManager.new
114
110
  # project = resource_manager.project "tokyo-rain-123"
115
111
  # project.update do |p|
116
112
  # p.labels = { "env" => "production" }
@@ -37,7 +37,7 @@ module Google
37
37
  @credentials = credentials
38
38
  @service = API::CloudResourceManagerService.new
39
39
  @service.client_options.application_name = \
40
- "google-cloud-resource_manager"
40
+ "gcloud-ruby"
41
41
  @service.client_options.application_version = \
42
42
  Google::Cloud::ResourceManager::VERSION
43
43
  @service.request_options.retries = retries || 3
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module ResourceManager
19
- VERSION = "0.20.1"
19
+ VERSION = "0.21.0"
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-resource_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-03 00:00:00.000000000 Z
12
+ date: 2016-10-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 0.20.0
20
+ version: 0.21.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 0.20.0
27
+ version: 0.21.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: google-api-client
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -151,6 +151,20 @@ dependencies:
151
151
  - - "~>"
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0.9'
154
+ - !ruby/object:Gem::Dependency
155
+ name: yard-doctest
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: 0.1.6
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: 0.1.6
154
168
  description: google-cloud-resource_manager is the official library for Google Cloud
155
169
  Resource Manager.
156
170
  email: