google-cloud-asset-v1 0.17.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/asset/v1/asset_service/client.rb +293 -39
- data/lib/google/cloud/asset/v1/asset_service/operations.rb +115 -12
- data/lib/google/cloud/asset/v1/asset_service_pb.rb +2 -2
- data/lib/google/cloud/asset/v1/assets_pb.rb +2 -2
- data/lib/google/cloud/asset/v1/version.rb +1 -1
- data/lib/google/cloud/asset/v1.rb +2 -0
- data/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb +2 -2
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/osconfig/v1/inventory.rb +3 -6
- 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: bb87f312f0649e08fc189ce1185589c939c2feb882acea539a06aa3045ba8107
|
4
|
+
data.tar.gz: 0df3f4f6144da7524fcdca365682ce57dd2542fbdfb19b033b0ef6af3e9539f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92639139d95fce94242059edc246e04c13e29f30a3a166e93c70d205228f33a8a6c91ed370d22a9de281d331d457f7132dc048cc1baaac5e43d3bff06a9bc2b5
|
7
|
+
data.tar.gz: 8385d7723fa7f9ab8bdba5a3da3ded075d91c9811f109b420f0e4b1f01ff732d37d2e4c02d3b19e266d52d7db74c14419c41303b27eaaf3b7bfcf1a8acc4ab87
|
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::Asset::V1::ExportAssetsRequest.new # (request fields
|
|
37
37
|
response = client.export_assets 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-asset-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/asset-inventory/)
|
@@ -183,6 +183,7 @@ module Google
|
|
183
183
|
|
184
184
|
@operations_client = Operations.new do |config|
|
185
185
|
config.credentials = credentials
|
186
|
+
config.quota_project = @quota_project_id
|
186
187
|
config.endpoint = @config.endpoint
|
187
188
|
end
|
188
189
|
|
@@ -291,6 +292,28 @@ module Google
|
|
291
292
|
#
|
292
293
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
293
294
|
#
|
295
|
+
# @example Basic example
|
296
|
+
# require "google/cloud/asset/v1"
|
297
|
+
#
|
298
|
+
# # Create a client object. The client can be reused for multiple calls.
|
299
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
300
|
+
#
|
301
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
302
|
+
# request = Google::Cloud::Asset::V1::ExportAssetsRequest.new
|
303
|
+
#
|
304
|
+
# # Call the export_assets method.
|
305
|
+
# result = client.export_assets request
|
306
|
+
#
|
307
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
308
|
+
# # object to check the status of an operation, cancel it, or wait
|
309
|
+
# # for results. Here is how to block until completion:
|
310
|
+
# result.wait_until_done! timeout: 60
|
311
|
+
# if result.response?
|
312
|
+
# p result.response
|
313
|
+
# else
|
314
|
+
# puts "Error!"
|
315
|
+
# end
|
316
|
+
#
|
294
317
|
def export_assets request, options = nil
|
295
318
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
296
319
|
|
@@ -308,9 +331,11 @@ module Google
|
|
308
331
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
309
332
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
310
333
|
|
311
|
-
header_params = {
|
312
|
-
|
313
|
-
|
334
|
+
header_params = {}
|
335
|
+
if request.parent
|
336
|
+
header_params["parent"] = request.parent
|
337
|
+
end
|
338
|
+
|
314
339
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
315
340
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
316
341
|
|
@@ -415,6 +440,27 @@ module Google
|
|
415
440
|
#
|
416
441
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
417
442
|
#
|
443
|
+
# @example Basic example
|
444
|
+
# require "google/cloud/asset/v1"
|
445
|
+
#
|
446
|
+
# # Create a client object. The client can be reused for multiple calls.
|
447
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
448
|
+
#
|
449
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
450
|
+
# request = Google::Cloud::Asset::V1::ListAssetsRequest.new
|
451
|
+
#
|
452
|
+
# # Call the list_assets method.
|
453
|
+
# result = client.list_assets request
|
454
|
+
#
|
455
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
456
|
+
# # iterate over all elements by calling #each, and the enumerable
|
457
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
458
|
+
# # methods are also available for managing paging directly.
|
459
|
+
# result.each do |response|
|
460
|
+
# # Each element is of type ::Google::Cloud::Asset::V1::Asset.
|
461
|
+
# p response
|
462
|
+
# end
|
463
|
+
#
|
418
464
|
def list_assets request, options = nil
|
419
465
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
420
466
|
|
@@ -432,9 +478,11 @@ module Google
|
|
432
478
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
433
479
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
434
480
|
|
435
|
-
header_params = {
|
436
|
-
|
437
|
-
|
481
|
+
header_params = {}
|
482
|
+
if request.parent
|
483
|
+
header_params["parent"] = request.parent
|
484
|
+
end
|
485
|
+
|
438
486
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
439
487
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
440
488
|
|
@@ -527,6 +575,21 @@ module Google
|
|
527
575
|
#
|
528
576
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
529
577
|
#
|
578
|
+
# @example Basic example
|
579
|
+
# require "google/cloud/asset/v1"
|
580
|
+
#
|
581
|
+
# # Create a client object. The client can be reused for multiple calls.
|
582
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
583
|
+
#
|
584
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
585
|
+
# request = Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new
|
586
|
+
#
|
587
|
+
# # Call the batch_get_assets_history method.
|
588
|
+
# result = client.batch_get_assets_history request
|
589
|
+
#
|
590
|
+
# # The returned object is of type Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse.
|
591
|
+
# p result
|
592
|
+
#
|
530
593
|
def batch_get_assets_history request, options = nil
|
531
594
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
532
595
|
|
@@ -544,9 +607,11 @@ module Google
|
|
544
607
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
545
608
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
546
609
|
|
547
|
-
header_params = {
|
548
|
-
|
549
|
-
|
610
|
+
header_params = {}
|
611
|
+
if request.parent
|
612
|
+
header_params["parent"] = request.parent
|
613
|
+
end
|
614
|
+
|
550
615
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
551
616
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
552
617
|
|
@@ -609,6 +674,21 @@ module Google
|
|
609
674
|
#
|
610
675
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
611
676
|
#
|
677
|
+
# @example Basic example
|
678
|
+
# require "google/cloud/asset/v1"
|
679
|
+
#
|
680
|
+
# # Create a client object. The client can be reused for multiple calls.
|
681
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
682
|
+
#
|
683
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
684
|
+
# request = Google::Cloud::Asset::V1::CreateFeedRequest.new
|
685
|
+
#
|
686
|
+
# # Call the create_feed method.
|
687
|
+
# result = client.create_feed request
|
688
|
+
#
|
689
|
+
# # The returned object is of type Google::Cloud::Asset::V1::Feed.
|
690
|
+
# p result
|
691
|
+
#
|
612
692
|
def create_feed request, options = nil
|
613
693
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
614
694
|
|
@@ -626,9 +706,11 @@ module Google
|
|
626
706
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
627
707
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
628
708
|
|
629
|
-
header_params = {
|
630
|
-
|
631
|
-
|
709
|
+
header_params = {}
|
710
|
+
if request.parent
|
711
|
+
header_params["parent"] = request.parent
|
712
|
+
end
|
713
|
+
|
632
714
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
633
715
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
634
716
|
|
@@ -680,6 +762,21 @@ module Google
|
|
680
762
|
#
|
681
763
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
682
764
|
#
|
765
|
+
# @example Basic example
|
766
|
+
# require "google/cloud/asset/v1"
|
767
|
+
#
|
768
|
+
# # Create a client object. The client can be reused for multiple calls.
|
769
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
770
|
+
#
|
771
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
772
|
+
# request = Google::Cloud::Asset::V1::GetFeedRequest.new
|
773
|
+
#
|
774
|
+
# # Call the get_feed method.
|
775
|
+
# result = client.get_feed request
|
776
|
+
#
|
777
|
+
# # The returned object is of type Google::Cloud::Asset::V1::Feed.
|
778
|
+
# p result
|
779
|
+
#
|
683
780
|
def get_feed request, options = nil
|
684
781
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
685
782
|
|
@@ -697,9 +794,11 @@ module Google
|
|
697
794
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
698
795
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
699
796
|
|
700
|
-
header_params = {
|
701
|
-
|
702
|
-
|
797
|
+
header_params = {}
|
798
|
+
if request.name
|
799
|
+
header_params["name"] = request.name
|
800
|
+
end
|
801
|
+
|
703
802
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
704
803
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
705
804
|
|
@@ -750,6 +849,21 @@ module Google
|
|
750
849
|
#
|
751
850
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
752
851
|
#
|
852
|
+
# @example Basic example
|
853
|
+
# require "google/cloud/asset/v1"
|
854
|
+
#
|
855
|
+
# # Create a client object. The client can be reused for multiple calls.
|
856
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
857
|
+
#
|
858
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
859
|
+
# request = Google::Cloud::Asset::V1::ListFeedsRequest.new
|
860
|
+
#
|
861
|
+
# # Call the list_feeds method.
|
862
|
+
# result = client.list_feeds request
|
863
|
+
#
|
864
|
+
# # The returned object is of type Google::Cloud::Asset::V1::ListFeedsResponse.
|
865
|
+
# p result
|
866
|
+
#
|
753
867
|
def list_feeds request, options = nil
|
754
868
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
755
869
|
|
@@ -767,9 +881,11 @@ module Google
|
|
767
881
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
768
882
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
769
883
|
|
770
|
-
header_params = {
|
771
|
-
|
772
|
-
|
884
|
+
header_params = {}
|
885
|
+
if request.parent
|
886
|
+
header_params["parent"] = request.parent
|
887
|
+
end
|
888
|
+
|
773
889
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
774
890
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
775
891
|
|
@@ -826,6 +942,21 @@ module Google
|
|
826
942
|
#
|
827
943
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
828
944
|
#
|
945
|
+
# @example Basic example
|
946
|
+
# require "google/cloud/asset/v1"
|
947
|
+
#
|
948
|
+
# # Create a client object. The client can be reused for multiple calls.
|
949
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
950
|
+
#
|
951
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
952
|
+
# request = Google::Cloud::Asset::V1::UpdateFeedRequest.new
|
953
|
+
#
|
954
|
+
# # Call the update_feed method.
|
955
|
+
# result = client.update_feed request
|
956
|
+
#
|
957
|
+
# # The returned object is of type Google::Cloud::Asset::V1::Feed.
|
958
|
+
# p result
|
959
|
+
#
|
829
960
|
def update_feed request, options = nil
|
830
961
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
831
962
|
|
@@ -843,9 +974,11 @@ module Google
|
|
843
974
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
844
975
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
845
976
|
|
846
|
-
header_params = {
|
847
|
-
|
848
|
-
|
977
|
+
header_params = {}
|
978
|
+
if request.feed&.name
|
979
|
+
header_params["feed.name"] = request.feed.name
|
980
|
+
end
|
981
|
+
|
849
982
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
850
983
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
851
984
|
|
@@ -897,6 +1030,21 @@ module Google
|
|
897
1030
|
#
|
898
1031
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
899
1032
|
#
|
1033
|
+
# @example Basic example
|
1034
|
+
# require "google/cloud/asset/v1"
|
1035
|
+
#
|
1036
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1037
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
1038
|
+
#
|
1039
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1040
|
+
# request = Google::Cloud::Asset::V1::DeleteFeedRequest.new
|
1041
|
+
#
|
1042
|
+
# # Call the delete_feed method.
|
1043
|
+
# result = client.delete_feed request
|
1044
|
+
#
|
1045
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1046
|
+
# p result
|
1047
|
+
#
|
900
1048
|
def delete_feed request, options = nil
|
901
1049
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
902
1050
|
|
@@ -914,9 +1062,11 @@ module Google
|
|
914
1062
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
915
1063
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
916
1064
|
|
917
|
-
header_params = {
|
918
|
-
|
919
|
-
|
1065
|
+
header_params = {}
|
1066
|
+
if request.name
|
1067
|
+
header_params["name"] = request.name
|
1068
|
+
end
|
1069
|
+
|
920
1070
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
921
1071
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
922
1072
|
|
@@ -1096,6 +1246,27 @@ module Google
|
|
1096
1246
|
#
|
1097
1247
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1098
1248
|
#
|
1249
|
+
# @example Basic example
|
1250
|
+
# require "google/cloud/asset/v1"
|
1251
|
+
#
|
1252
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1253
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
1254
|
+
#
|
1255
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1256
|
+
# request = Google::Cloud::Asset::V1::SearchAllResourcesRequest.new
|
1257
|
+
#
|
1258
|
+
# # Call the search_all_resources method.
|
1259
|
+
# result = client.search_all_resources request
|
1260
|
+
#
|
1261
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1262
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1263
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1264
|
+
# # methods are also available for managing paging directly.
|
1265
|
+
# result.each do |response|
|
1266
|
+
# # Each element is of type ::Google::Cloud::Asset::V1::ResourceSearchResult.
|
1267
|
+
# p response
|
1268
|
+
# end
|
1269
|
+
#
|
1099
1270
|
def search_all_resources request, options = nil
|
1100
1271
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1101
1272
|
|
@@ -1113,9 +1284,11 @@ module Google
|
|
1113
1284
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
1114
1285
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1115
1286
|
|
1116
|
-
header_params = {
|
1117
|
-
|
1118
|
-
|
1287
|
+
header_params = {}
|
1288
|
+
if request.scope
|
1289
|
+
header_params["scope"] = request.scope
|
1290
|
+
end
|
1291
|
+
|
1119
1292
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1120
1293
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1121
1294
|
|
@@ -1260,6 +1433,27 @@ module Google
|
|
1260
1433
|
#
|
1261
1434
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1262
1435
|
#
|
1436
|
+
# @example Basic example
|
1437
|
+
# require "google/cloud/asset/v1"
|
1438
|
+
#
|
1439
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1440
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
1441
|
+
#
|
1442
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1443
|
+
# request = Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new
|
1444
|
+
#
|
1445
|
+
# # Call the search_all_iam_policies method.
|
1446
|
+
# result = client.search_all_iam_policies request
|
1447
|
+
#
|
1448
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1449
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1450
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1451
|
+
# # methods are also available for managing paging directly.
|
1452
|
+
# result.each do |response|
|
1453
|
+
# # Each element is of type ::Google::Cloud::Asset::V1::IamPolicySearchResult.
|
1454
|
+
# p response
|
1455
|
+
# end
|
1456
|
+
#
|
1263
1457
|
def search_all_iam_policies request, options = nil
|
1264
1458
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1265
1459
|
|
@@ -1277,9 +1471,11 @@ module Google
|
|
1277
1471
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
1278
1472
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1279
1473
|
|
1280
|
-
header_params = {
|
1281
|
-
|
1282
|
-
|
1474
|
+
header_params = {}
|
1475
|
+
if request.scope
|
1476
|
+
header_params["scope"] = request.scope
|
1477
|
+
end
|
1478
|
+
|
1283
1479
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1284
1480
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1285
1481
|
|
@@ -1341,6 +1537,21 @@ module Google
|
|
1341
1537
|
#
|
1342
1538
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1343
1539
|
#
|
1540
|
+
# @example Basic example
|
1541
|
+
# require "google/cloud/asset/v1"
|
1542
|
+
#
|
1543
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1544
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
1545
|
+
#
|
1546
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1547
|
+
# request = Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new
|
1548
|
+
#
|
1549
|
+
# # Call the analyze_iam_policy method.
|
1550
|
+
# result = client.analyze_iam_policy request
|
1551
|
+
#
|
1552
|
+
# # The returned object is of type Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse.
|
1553
|
+
# p result
|
1554
|
+
#
|
1344
1555
|
def analyze_iam_policy request, options = nil
|
1345
1556
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1346
1557
|
|
@@ -1358,9 +1569,11 @@ module Google
|
|
1358
1569
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
1359
1570
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1360
1571
|
|
1361
|
-
header_params = {
|
1362
|
-
|
1363
|
-
|
1572
|
+
header_params = {}
|
1573
|
+
if request.analysis_query&.scope
|
1574
|
+
header_params["analysis_query.scope"] = request.analysis_query.scope
|
1575
|
+
end
|
1576
|
+
|
1364
1577
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1365
1578
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1366
1579
|
|
@@ -1419,6 +1632,28 @@ module Google
|
|
1419
1632
|
#
|
1420
1633
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1421
1634
|
#
|
1635
|
+
# @example Basic example
|
1636
|
+
# require "google/cloud/asset/v1"
|
1637
|
+
#
|
1638
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1639
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
1640
|
+
#
|
1641
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1642
|
+
# request = Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new
|
1643
|
+
#
|
1644
|
+
# # Call the analyze_iam_policy_longrunning method.
|
1645
|
+
# result = client.analyze_iam_policy_longrunning request
|
1646
|
+
#
|
1647
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1648
|
+
# # object to check the status of an operation, cancel it, or wait
|
1649
|
+
# # for results. Here is how to block until completion:
|
1650
|
+
# result.wait_until_done! timeout: 60
|
1651
|
+
# if result.response?
|
1652
|
+
# p result.response
|
1653
|
+
# else
|
1654
|
+
# puts "Error!"
|
1655
|
+
# end
|
1656
|
+
#
|
1422
1657
|
def analyze_iam_policy_longrunning request, options = nil
|
1423
1658
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1424
1659
|
|
@@ -1436,9 +1671,11 @@ module Google
|
|
1436
1671
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
1437
1672
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1438
1673
|
|
1439
|
-
header_params = {
|
1440
|
-
|
1441
|
-
|
1674
|
+
header_params = {}
|
1675
|
+
if request.analysis_query&.scope
|
1676
|
+
header_params["analysis_query.scope"] = request.analysis_query.scope
|
1677
|
+
end
|
1678
|
+
|
1442
1679
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1443
1680
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1444
1681
|
|
@@ -1504,6 +1741,21 @@ module Google
|
|
1504
1741
|
#
|
1505
1742
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1506
1743
|
#
|
1744
|
+
# @example Basic example
|
1745
|
+
# require "google/cloud/asset/v1"
|
1746
|
+
#
|
1747
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1748
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
1749
|
+
#
|
1750
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1751
|
+
# request = Google::Cloud::Asset::V1::AnalyzeMoveRequest.new
|
1752
|
+
#
|
1753
|
+
# # Call the analyze_move method.
|
1754
|
+
# result = client.analyze_move request
|
1755
|
+
#
|
1756
|
+
# # The returned object is of type Google::Cloud::Asset::V1::AnalyzeMoveResponse.
|
1757
|
+
# p result
|
1758
|
+
#
|
1507
1759
|
def analyze_move request, options = nil
|
1508
1760
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1509
1761
|
|
@@ -1521,9 +1773,11 @@ module Google
|
|
1521
1773
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
1522
1774
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1523
1775
|
|
1524
|
-
header_params = {
|
1525
|
-
|
1526
|
-
|
1776
|
+
header_params = {}
|
1777
|
+
if request.resource
|
1778
|
+
header_params["resource"] = request.resource
|
1779
|
+
end
|
1780
|
+
|
1527
1781
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1528
1782
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1529
1783
|
|