google-cloud-kms-v1 0.8.0 → 0.10.2

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
  SHA256:
3
- metadata.gz: 366f739162ab5400a7d321c89b3283faa619b89e0ce78a22729aaec42cf319f2
4
- data.tar.gz: 9b07da8889a3a6804331abc9f78882ee7cc89ae0f8d848cb8ce321a027d0ca98
3
+ metadata.gz: 5c9aa75debb90284f04a7baa175ca0ee720fd361351582da8d612fb46f15a33e
4
+ data.tar.gz: d191dc80acfd00a719c5183318d8824ffd8411b87271e3d713360dad9eb56ecc
5
5
  SHA512:
6
- metadata.gz: f46892858f2569b83d67dd04ae66ad59eabb7acc9b6b3a55d1661f35d0fcf060af22ee2dafe271059fa461aac233afa458bccbc800850363bc055c925cbb178e
7
- data.tar.gz: c8babfa3af90696ca1223d8dc2461615289de042c0a7beda99da0b9e75c951372e58e077f162f68c5b8cf61f65c3501d3229406da434a80a6f31cd0f0494eb49
6
+ metadata.gz: 6f8fdd165f18f3943a2f16dc4c9ae812ebe9325a30ec5ff904db2806dfbed564dbb830b2f9714a08274e3d71b1e72f8da2ad6e6b8d67dd13016c980865ebe70c
7
+ data.tar.gz: a8a0468c29d0afeaaa14486525f6ebc59cb4b452721415056de9c3dadf7087af64c86a3b555f7301b92aa86b8b3d174d6279a54fd76cc2b80032ecd0635e2e0b
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Key Management Service (KMS) V1 API
2
+ --title="Cloud Key Management Service (KMS) V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
@@ -202,6 +202,21 @@ module Google
202
202
  #
203
203
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
204
204
  #
205
+ # @example Basic example
206
+ # require "google/iam/v1"
207
+ #
208
+ # # Create a client object. The client can be reused for multiple calls.
209
+ # client = Google::Cloud::Kms::V1::IAMPolicy::Client.new
210
+ #
211
+ # # Create a request. To set request fields, pass in keyword arguments.
212
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
213
+ #
214
+ # # Call the set_iam_policy method.
215
+ # result = client.set_iam_policy request
216
+ #
217
+ # # The returned object is of type Google::Iam::V1::Policy.
218
+ # p result
219
+ #
205
220
  def set_iam_policy request, options = nil
206
221
  raise ::ArgumentError, "request must be provided" if request.nil?
207
222
 
@@ -219,9 +234,11 @@ module Google
219
234
  gapic_version: ::Google::Cloud::Kms::V1::VERSION
220
235
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
221
236
 
222
- header_params = {
223
- "resource" => request.resource
224
- }
237
+ header_params = {}
238
+ if request.resource
239
+ header_params["resource"] = request.resource
240
+ end
241
+
225
242
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
226
243
  metadata[:"x-goog-request-params"] ||= request_params_header
227
244
 
@@ -276,6 +293,21 @@ module Google
276
293
  #
277
294
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
278
295
  #
296
+ # @example Basic example
297
+ # require "google/iam/v1"
298
+ #
299
+ # # Create a client object. The client can be reused for multiple calls.
300
+ # client = Google::Cloud::Kms::V1::IAMPolicy::Client.new
301
+ #
302
+ # # Create a request. To set request fields, pass in keyword arguments.
303
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
304
+ #
305
+ # # Call the get_iam_policy method.
306
+ # result = client.get_iam_policy request
307
+ #
308
+ # # The returned object is of type Google::Iam::V1::Policy.
309
+ # p result
310
+ #
279
311
  def get_iam_policy request, options = nil
280
312
  raise ::ArgumentError, "request must be provided" if request.nil?
281
313
 
@@ -293,9 +325,11 @@ module Google
293
325
  gapic_version: ::Google::Cloud::Kms::V1::VERSION
294
326
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
295
327
 
296
- header_params = {
297
- "resource" => request.resource
298
- }
328
+ header_params = {}
329
+ if request.resource
330
+ header_params["resource"] = request.resource
331
+ end
332
+
299
333
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
300
334
  metadata[:"x-goog-request-params"] ||= request_params_header
301
335
 
@@ -356,6 +390,21 @@ module Google
356
390
  #
357
391
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
358
392
  #
393
+ # @example Basic example
394
+ # require "google/iam/v1"
395
+ #
396
+ # # Create a client object. The client can be reused for multiple calls.
397
+ # client = Google::Cloud::Kms::V1::IAMPolicy::Client.new
398
+ #
399
+ # # Create a request. To set request fields, pass in keyword arguments.
400
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
401
+ #
402
+ # # Call the test_iam_permissions method.
403
+ # result = client.test_iam_permissions request
404
+ #
405
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
406
+ # p result
407
+ #
359
408
  def test_iam_permissions request, options = nil
360
409
  raise ::ArgumentError, "request must be provided" if request.nil?
361
410
 
@@ -373,9 +422,11 @@ module Google
373
422
  gapic_version: ::Google::Cloud::Kms::V1::VERSION
374
423
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
375
424
 
376
- header_params = {
377
- "resource" => request.resource
378
- }
425
+ header_params = {}
426
+ if request.resource
427
+ header_params["resource"] = request.resource
428
+ end
429
+
379
430
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
380
431
  metadata[:"x-goog-request-params"] ||= request_params_header
381
432