google-cloud-functions-v1 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/functions/v1/cloud_functions_service/client.rb +256 -35
- data/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb +115 -12
- data/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb +40 -0
- data/lib/google/cloud/functions/v1/functions_pb.rb +30 -2
- data/lib/google/cloud/functions/v1/operations_pb.rb +4 -2
- data/lib/google/cloud/functions/v1/version.rb +1 -1
- data/lib/google/cloud/functions/v1.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/functions/v1/functions.rb +176 -0
- data/proto_docs/google/cloud/functions/v1/operations.rb +9 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +8 -1
- data/proto_docs/google/iam/v1/options.rb +14 -4
- data/proto_docs/google/iam/v1/policy.rb +208 -38
- metadata +7 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31c4887ff7d578025e54857ed42310373e66cda417d021b98d98c3d9d6187c4b
|
4
|
+
data.tar.gz: e45e3f695ed1cad3ebc728356ee46c4502efa98890a90e45018355d163c38443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e30d410994321c2e651143c2a1561c00fd484058fd528fe6d33b96f217a58167177ce703f7994daa596feaf8e69f823ecb11e457562bdbe38e8e9fec8ab8df5c
|
7
|
+
data.tar.gz: 3d9e6ee5616693dc85b166fbb136155ef2978fcd82a755f14f0c6677be4bd4db3d2314d32efe7f3f18dbba0f90700773f32d5b499226b22c1aec2f4c545a437b
|
data/.yardopts
CHANGED
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
|
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
|
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
|
-
|
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,
|
164
|
-
|
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.
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Functions::V1::ListFunctionsRequest.new # (request fi
|
|
37
37
|
response = client.list_functions request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/functions)
|
@@ -159,6 +159,7 @@ module Google
|
|
159
159
|
|
160
160
|
@operations_client = Operations.new do |config|
|
161
161
|
config.credentials = credentials
|
162
|
+
config.quota_project = @quota_project_id
|
162
163
|
config.endpoint = @config.endpoint
|
163
164
|
end
|
164
165
|
|
@@ -221,6 +222,27 @@ module Google
|
|
221
222
|
#
|
222
223
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
223
224
|
#
|
225
|
+
# @example Basic example
|
226
|
+
# require "google/cloud/functions/v1"
|
227
|
+
#
|
228
|
+
# # Create a client object. The client can be reused for multiple calls.
|
229
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
230
|
+
#
|
231
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
232
|
+
# request = Google::Cloud::Functions::V1::ListFunctionsRequest.new
|
233
|
+
#
|
234
|
+
# # Call the list_functions method.
|
235
|
+
# result = client.list_functions request
|
236
|
+
#
|
237
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
238
|
+
# # iterate over all elements by calling #each, and the enumerable
|
239
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
240
|
+
# # methods are also available for managing paging directly.
|
241
|
+
# result.each do |response|
|
242
|
+
# # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction.
|
243
|
+
# p response
|
244
|
+
# end
|
245
|
+
#
|
224
246
|
def list_functions request, options = nil
|
225
247
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
226
248
|
|
@@ -238,9 +260,11 @@ module Google
|
|
238
260
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
239
261
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
240
262
|
|
241
|
-
header_params = {
|
242
|
-
|
243
|
-
|
263
|
+
header_params = {}
|
264
|
+
if request.parent
|
265
|
+
header_params["parent"] = request.parent
|
266
|
+
end
|
267
|
+
|
244
268
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
245
269
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
246
270
|
|
@@ -290,6 +314,21 @@ module Google
|
|
290
314
|
#
|
291
315
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
292
316
|
#
|
317
|
+
# @example Basic example
|
318
|
+
# require "google/cloud/functions/v1"
|
319
|
+
#
|
320
|
+
# # Create a client object. The client can be reused for multiple calls.
|
321
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
322
|
+
#
|
323
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
324
|
+
# request = Google::Cloud::Functions::V1::GetFunctionRequest.new
|
325
|
+
#
|
326
|
+
# # Call the get_function method.
|
327
|
+
# result = client.get_function request
|
328
|
+
#
|
329
|
+
# # The returned object is of type Google::Cloud::Functions::V1::CloudFunction.
|
330
|
+
# p result
|
331
|
+
#
|
293
332
|
def get_function request, options = nil
|
294
333
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
295
334
|
|
@@ -307,9 +346,11 @@ module Google
|
|
307
346
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
308
347
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
309
348
|
|
310
|
-
header_params = {
|
311
|
-
|
312
|
-
|
349
|
+
header_params = {}
|
350
|
+
if request.name
|
351
|
+
header_params["name"] = request.name
|
352
|
+
end
|
353
|
+
|
313
354
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
314
355
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
315
356
|
|
@@ -363,6 +404,28 @@ module Google
|
|
363
404
|
#
|
364
405
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
365
406
|
#
|
407
|
+
# @example Basic example
|
408
|
+
# require "google/cloud/functions/v1"
|
409
|
+
#
|
410
|
+
# # Create a client object. The client can be reused for multiple calls.
|
411
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
412
|
+
#
|
413
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
414
|
+
# request = Google::Cloud::Functions::V1::CreateFunctionRequest.new
|
415
|
+
#
|
416
|
+
# # Call the create_function method.
|
417
|
+
# result = client.create_function request
|
418
|
+
#
|
419
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
420
|
+
# # object to check the status of an operation, cancel it, or wait
|
421
|
+
# # for results. Here is how to block until completion:
|
422
|
+
# result.wait_until_done! timeout: 60
|
423
|
+
# if result.response?
|
424
|
+
# p result.response
|
425
|
+
# else
|
426
|
+
# puts "Error!"
|
427
|
+
# end
|
428
|
+
#
|
366
429
|
def create_function request, options = nil
|
367
430
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
368
431
|
|
@@ -380,9 +443,11 @@ module Google
|
|
380
443
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
381
444
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
382
445
|
|
383
|
-
header_params = {
|
384
|
-
|
385
|
-
|
446
|
+
header_params = {}
|
447
|
+
if request.location
|
448
|
+
header_params["location"] = request.location
|
449
|
+
end
|
450
|
+
|
386
451
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
387
452
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
388
453
|
|
@@ -434,6 +499,28 @@ module Google
|
|
434
499
|
#
|
435
500
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
436
501
|
#
|
502
|
+
# @example Basic example
|
503
|
+
# require "google/cloud/functions/v1"
|
504
|
+
#
|
505
|
+
# # Create a client object. The client can be reused for multiple calls.
|
506
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
507
|
+
#
|
508
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
509
|
+
# request = Google::Cloud::Functions::V1::UpdateFunctionRequest.new
|
510
|
+
#
|
511
|
+
# # Call the update_function method.
|
512
|
+
# result = client.update_function request
|
513
|
+
#
|
514
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
515
|
+
# # object to check the status of an operation, cancel it, or wait
|
516
|
+
# # for results. Here is how to block until completion:
|
517
|
+
# result.wait_until_done! timeout: 60
|
518
|
+
# if result.response?
|
519
|
+
# p result.response
|
520
|
+
# else
|
521
|
+
# puts "Error!"
|
522
|
+
# end
|
523
|
+
#
|
437
524
|
def update_function request, options = nil
|
438
525
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
439
526
|
|
@@ -451,9 +538,11 @@ module Google
|
|
451
538
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
452
539
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
453
540
|
|
454
|
-
header_params = {
|
455
|
-
|
456
|
-
|
541
|
+
header_params = {}
|
542
|
+
if request.function&.name
|
543
|
+
header_params["function.name"] = request.function.name
|
544
|
+
end
|
545
|
+
|
457
546
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
458
547
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
459
548
|
|
@@ -505,6 +594,28 @@ module Google
|
|
505
594
|
#
|
506
595
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
507
596
|
#
|
597
|
+
# @example Basic example
|
598
|
+
# require "google/cloud/functions/v1"
|
599
|
+
#
|
600
|
+
# # Create a client object. The client can be reused for multiple calls.
|
601
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
602
|
+
#
|
603
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
604
|
+
# request = Google::Cloud::Functions::V1::DeleteFunctionRequest.new
|
605
|
+
#
|
606
|
+
# # Call the delete_function method.
|
607
|
+
# result = client.delete_function request
|
608
|
+
#
|
609
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
610
|
+
# # object to check the status of an operation, cancel it, or wait
|
611
|
+
# # for results. Here is how to block until completion:
|
612
|
+
# result.wait_until_done! timeout: 60
|
613
|
+
# if result.response?
|
614
|
+
# p result.response
|
615
|
+
# else
|
616
|
+
# puts "Error!"
|
617
|
+
# end
|
618
|
+
#
|
508
619
|
def delete_function request, options = nil
|
509
620
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
510
621
|
|
@@ -522,9 +633,11 @@ module Google
|
|
522
633
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
523
634
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
524
635
|
|
525
|
-
header_params = {
|
526
|
-
|
527
|
-
|
636
|
+
header_params = {}
|
637
|
+
if request.name
|
638
|
+
header_params["name"] = request.name
|
639
|
+
end
|
640
|
+
|
528
641
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
529
642
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
530
643
|
|
@@ -579,6 +692,21 @@ module Google
|
|
579
692
|
#
|
580
693
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
581
694
|
#
|
695
|
+
# @example Basic example
|
696
|
+
# require "google/cloud/functions/v1"
|
697
|
+
#
|
698
|
+
# # Create a client object. The client can be reused for multiple calls.
|
699
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
700
|
+
#
|
701
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
702
|
+
# request = Google::Cloud::Functions::V1::CallFunctionRequest.new
|
703
|
+
#
|
704
|
+
# # Call the call_function method.
|
705
|
+
# result = client.call_function request
|
706
|
+
#
|
707
|
+
# # The returned object is of type Google::Cloud::Functions::V1::CallFunctionResponse.
|
708
|
+
# p result
|
709
|
+
#
|
582
710
|
def call_function request, options = nil
|
583
711
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
584
712
|
|
@@ -596,9 +724,11 @@ module Google
|
|
596
724
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
597
725
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
598
726
|
|
599
|
-
header_params = {
|
600
|
-
|
601
|
-
|
727
|
+
header_params = {}
|
728
|
+
if request.name
|
729
|
+
header_params["name"] = request.name
|
730
|
+
end
|
731
|
+
|
602
732
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
603
733
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
604
734
|
|
@@ -672,6 +802,21 @@ module Google
|
|
672
802
|
#
|
673
803
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
674
804
|
#
|
805
|
+
# @example Basic example
|
806
|
+
# require "google/cloud/functions/v1"
|
807
|
+
#
|
808
|
+
# # Create a client object. The client can be reused for multiple calls.
|
809
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
810
|
+
#
|
811
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
812
|
+
# request = Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new
|
813
|
+
#
|
814
|
+
# # Call the generate_upload_url method.
|
815
|
+
# result = client.generate_upload_url request
|
816
|
+
#
|
817
|
+
# # The returned object is of type Google::Cloud::Functions::V1::GenerateUploadUrlResponse.
|
818
|
+
# p result
|
819
|
+
#
|
675
820
|
def generate_upload_url request, options = nil
|
676
821
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
677
822
|
|
@@ -689,9 +834,11 @@ module Google
|
|
689
834
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
690
835
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
691
836
|
|
692
|
-
header_params = {
|
693
|
-
|
694
|
-
|
837
|
+
header_params = {}
|
838
|
+
if request.parent
|
839
|
+
header_params["parent"] = request.parent
|
840
|
+
end
|
841
|
+
|
695
842
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
696
843
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
697
844
|
|
@@ -748,6 +895,21 @@ module Google
|
|
748
895
|
#
|
749
896
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
750
897
|
#
|
898
|
+
# @example Basic example
|
899
|
+
# require "google/cloud/functions/v1"
|
900
|
+
#
|
901
|
+
# # Create a client object. The client can be reused for multiple calls.
|
902
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
903
|
+
#
|
904
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
905
|
+
# request = Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new
|
906
|
+
#
|
907
|
+
# # Call the generate_download_url method.
|
908
|
+
# result = client.generate_download_url request
|
909
|
+
#
|
910
|
+
# # The returned object is of type Google::Cloud::Functions::V1::GenerateDownloadUrlResponse.
|
911
|
+
# p result
|
912
|
+
#
|
751
913
|
def generate_download_url request, options = nil
|
752
914
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
753
915
|
|
@@ -765,9 +927,11 @@ module Google
|
|
765
927
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
766
928
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
767
929
|
|
768
|
-
header_params = {
|
769
|
-
|
770
|
-
|
930
|
+
header_params = {}
|
931
|
+
if request.name
|
932
|
+
header_params["name"] = request.name
|
933
|
+
end
|
934
|
+
|
771
935
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
772
936
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
773
937
|
|
@@ -801,7 +965,7 @@ module Google
|
|
801
965
|
# @param options [::Gapic::CallOptions, ::Hash]
|
802
966
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
803
967
|
#
|
804
|
-
# @overload set_iam_policy(resource: nil, policy: nil)
|
968
|
+
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
805
969
|
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
806
970
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
807
971
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -814,6 +978,12 @@ module Google
|
|
814
978
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
815
979
|
# valid policy but certain Cloud Platform services (such as Projects)
|
816
980
|
# might reject them.
|
981
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
982
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
983
|
+
# the fields in the mask will be modified. If no mask is provided, the
|
984
|
+
# following default mask is used:
|
985
|
+
#
|
986
|
+
# `paths: "bindings, etag"`
|
817
987
|
#
|
818
988
|
# @yield [response, operation] Access the result along with the RPC operation
|
819
989
|
# @yieldparam response [::Google::Iam::V1::Policy]
|
@@ -823,6 +993,21 @@ module Google
|
|
823
993
|
#
|
824
994
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
825
995
|
#
|
996
|
+
# @example Basic example
|
997
|
+
# require "google/cloud/functions/v1"
|
998
|
+
#
|
999
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1000
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
1001
|
+
#
|
1002
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1003
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
1004
|
+
#
|
1005
|
+
# # Call the set_iam_policy method.
|
1006
|
+
# result = client.set_iam_policy request
|
1007
|
+
#
|
1008
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1009
|
+
# p result
|
1010
|
+
#
|
826
1011
|
def set_iam_policy request, options = nil
|
827
1012
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
828
1013
|
|
@@ -840,9 +1025,11 @@ module Google
|
|
840
1025
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
841
1026
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
842
1027
|
|
843
|
-
header_params = {
|
844
|
-
|
845
|
-
|
1028
|
+
header_params = {}
|
1029
|
+
if request.resource
|
1030
|
+
header_params["resource"] = request.resource
|
1031
|
+
end
|
1032
|
+
|
846
1033
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
847
1034
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
848
1035
|
|
@@ -887,7 +1074,7 @@ module Google
|
|
887
1074
|
# See the operation documentation for the appropriate value for this field.
|
888
1075
|
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
889
1076
|
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
890
|
-
# `GetIamPolicy`.
|
1077
|
+
# `GetIamPolicy`.
|
891
1078
|
#
|
892
1079
|
# @yield [response, operation] Access the result along with the RPC operation
|
893
1080
|
# @yieldparam response [::Google::Iam::V1::Policy]
|
@@ -897,6 +1084,21 @@ module Google
|
|
897
1084
|
#
|
898
1085
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
899
1086
|
#
|
1087
|
+
# @example Basic example
|
1088
|
+
# require "google/cloud/functions/v1"
|
1089
|
+
#
|
1090
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1091
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
1092
|
+
#
|
1093
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1094
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
1095
|
+
#
|
1096
|
+
# # Call the get_iam_policy method.
|
1097
|
+
# result = client.get_iam_policy request
|
1098
|
+
#
|
1099
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1100
|
+
# p result
|
1101
|
+
#
|
900
1102
|
def get_iam_policy request, options = nil
|
901
1103
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
902
1104
|
|
@@ -914,9 +1116,11 @@ module Google
|
|
914
1116
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
915
1117
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
916
1118
|
|
917
|
-
header_params = {
|
918
|
-
|
919
|
-
|
1119
|
+
header_params = {}
|
1120
|
+
if request.resource
|
1121
|
+
header_params["resource"] = request.resource
|
1122
|
+
end
|
1123
|
+
|
920
1124
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
921
1125
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
922
1126
|
|
@@ -974,6 +1178,21 @@ module Google
|
|
974
1178
|
#
|
975
1179
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
976
1180
|
#
|
1181
|
+
# @example Basic example
|
1182
|
+
# require "google/cloud/functions/v1"
|
1183
|
+
#
|
1184
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1185
|
+
# client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
|
1186
|
+
#
|
1187
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1188
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
1189
|
+
#
|
1190
|
+
# # Call the test_iam_permissions method.
|
1191
|
+
# result = client.test_iam_permissions request
|
1192
|
+
#
|
1193
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
1194
|
+
# p result
|
1195
|
+
#
|
977
1196
|
def test_iam_permissions request, options = nil
|
978
1197
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
979
1198
|
|
@@ -991,9 +1210,11 @@ module Google
|
|
991
1210
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
992
1211
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
993
1212
|
|
994
|
-
header_params = {
|
995
|
-
|
996
|
-
|
1213
|
+
header_params = {}
|
1214
|
+
if request.resource
|
1215
|
+
header_params["resource"] = request.resource
|
1216
|
+
end
|
1217
|
+
|
997
1218
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
998
1219
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
999
1220
|
|