google-cloud-asset-v1 0.23.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/asset/v1/asset_service/client.rb +58 -57
- data/lib/google/cloud/asset/v1/asset_service/operations.rb +14 -16
- data/lib/google/cloud/asset/v1/asset_service/rest/client.rb +2716 -0
- data/lib/google/cloud/asset/v1/asset_service/rest/operations.rb +793 -0
- data/lib/google/cloud/asset/v1/asset_service/rest/service_stub.rb +1412 -0
- data/lib/google/cloud/asset/v1/asset_service/rest.rb +53 -0
- data/lib/google/cloud/asset/v1/asset_service.rb +6 -0
- data/lib/google/cloud/asset/v1/rest.rb +37 -0
- data/lib/google/cloud/asset/v1/version.rb +1 -1
- data/lib/google/cloud/asset/v1.rb +5 -0
- data/proto_docs/google/api/client.rb +57 -3
- data/proto_docs/google/cloud/asset/v1/asset_service.rb +15 -15
- data/proto_docs/google/cloud/asset/v1/assets.rb +1 -1
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 046a9b4b26c2ea4f92d1103c79915c38cf197b52285a2628cd0bee5bf4a26686
|
4
|
+
data.tar.gz: 37d1ad62617d80d81b5e969645def56023bc6d7f3eed6904bcc2d30665264cc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be273b44d52abde9c72702554f2737abf272aad6081d4a26a32e6ebebd0ee836eb427f3baaa387be48a610d29f8b2a31e2cc6f64fda3c4e43cb40bff3a42d592
|
7
|
+
data.tar.gz: 62868ef7d558371ec83fd86186d2db743482b561d8d1b18557f0c66ed3b63b82c281376351f7bac9213215b3dacf7d07c1402d5b89676b9db0bcab732dbbef49
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Cloud Asset V1 API
|
2
2
|
|
3
|
-
|
3
|
+
The Cloud Asset API manages the history and inventory of Google Cloud resources.
|
4
4
|
|
5
5
|
A metadata inventory service that allows you to view, monitor, and analyze all your GCP and Anthos assets across projects and services.
|
6
6
|
|
@@ -47,7 +47,7 @@ for general usage information.
|
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
49
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -141,6 +141,21 @@ module Google
|
|
141
141
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
142
142
|
}
|
143
143
|
|
144
|
+
default_config.rpcs.analyze_org_policies.timeout = 60.0
|
145
|
+
default_config.rpcs.analyze_org_policies.retry_policy = {
|
146
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
147
|
+
}
|
148
|
+
|
149
|
+
default_config.rpcs.analyze_org_policy_governed_containers.timeout = 60.0
|
150
|
+
default_config.rpcs.analyze_org_policy_governed_containers.retry_policy = {
|
151
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
152
|
+
}
|
153
|
+
|
154
|
+
default_config.rpcs.analyze_org_policy_governed_assets.timeout = 60.0
|
155
|
+
default_config.rpcs.analyze_org_policy_governed_assets.retry_policy = {
|
156
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
157
|
+
}
|
158
|
+
|
144
159
|
default_config
|
145
160
|
end
|
146
161
|
yield @configure if block_given?
|
@@ -335,14 +350,14 @@ module Google
|
|
335
350
|
# # Call the export_assets method.
|
336
351
|
# result = client.export_assets request
|
337
352
|
#
|
338
|
-
# # The returned object is of type Gapic::Operation. You can use
|
339
|
-
# #
|
340
|
-
# #
|
353
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
354
|
+
# # check the status of an operation, cancel it, or wait for results.
|
355
|
+
# # Here is how to wait for a response.
|
341
356
|
# result.wait_until_done! timeout: 60
|
342
357
|
# if result.response?
|
343
358
|
# p result.response
|
344
359
|
# else
|
345
|
-
# puts "
|
360
|
+
# puts "No response received."
|
346
361
|
# end
|
347
362
|
#
|
348
363
|
def export_assets request, options = nil
|
@@ -484,13 +499,11 @@ module Google
|
|
484
499
|
# # Call the list_assets method.
|
485
500
|
# result = client.list_assets request
|
486
501
|
#
|
487
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
488
|
-
# #
|
489
|
-
#
|
490
|
-
# # methods are also available for managing paging directly.
|
491
|
-
# result.each do |response|
|
502
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
503
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
504
|
+
# result.each do |item|
|
492
505
|
# # Each element is of type ::Google::Cloud::Asset::V1::Asset.
|
493
|
-
# p
|
506
|
+
# p item
|
494
507
|
# end
|
495
508
|
#
|
496
509
|
def list_assets request, options = nil
|
@@ -686,7 +699,7 @@ module Google
|
|
686
699
|
# Required. The name of the project/folder/organization where this feed
|
687
700
|
# should be created in. It can only be an organization number (such as
|
688
701
|
# "organizations/123"), a folder number (such as "folders/123"), a project ID
|
689
|
-
# (such as "projects/my-project-id")
|
702
|
+
# (such as "projects/my-project-id"), or a project number (such as
|
690
703
|
# "projects/12345").
|
691
704
|
# @param feed_id [::String]
|
692
705
|
# Required. This is the client-assigned asset feed identifier and it needs to
|
@@ -1307,13 +1320,11 @@ module Google
|
|
1307
1320
|
# # Call the search_all_resources method.
|
1308
1321
|
# result = client.search_all_resources request
|
1309
1322
|
#
|
1310
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1311
|
-
# #
|
1312
|
-
#
|
1313
|
-
# # methods are also available for managing paging directly.
|
1314
|
-
# result.each do |response|
|
1323
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1324
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1325
|
+
# result.each do |item|
|
1315
1326
|
# # Each element is of type ::Google::Cloud::Asset::V1::ResourceSearchResult.
|
1316
|
-
# p
|
1327
|
+
# p item
|
1317
1328
|
# end
|
1318
1329
|
#
|
1319
1330
|
def search_all_resources request, options = nil
|
@@ -1496,13 +1507,11 @@ module Google
|
|
1496
1507
|
# # Call the search_all_iam_policies method.
|
1497
1508
|
# result = client.search_all_iam_policies request
|
1498
1509
|
#
|
1499
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1500
|
-
# #
|
1501
|
-
#
|
1502
|
-
# # methods are also available for managing paging directly.
|
1503
|
-
# result.each do |response|
|
1510
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1511
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1512
|
+
# result.each do |item|
|
1504
1513
|
# # Each element is of type ::Google::Cloud::Asset::V1::IamPolicySearchResult.
|
1505
|
-
# p
|
1514
|
+
# p item
|
1506
1515
|
# end
|
1507
1516
|
#
|
1508
1517
|
def search_all_iam_policies request, options = nil
|
@@ -1732,14 +1741,14 @@ module Google
|
|
1732
1741
|
# # Call the analyze_iam_policy_longrunning method.
|
1733
1742
|
# result = client.analyze_iam_policy_longrunning request
|
1734
1743
|
#
|
1735
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1736
|
-
# #
|
1737
|
-
# #
|
1744
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1745
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1746
|
+
# # Here is how to wait for a response.
|
1738
1747
|
# result.wait_until_done! timeout: 60
|
1739
1748
|
# if result.response?
|
1740
1749
|
# p result.response
|
1741
1750
|
# else
|
1742
|
-
# puts "
|
1751
|
+
# puts "No response received."
|
1743
1752
|
# end
|
1744
1753
|
#
|
1745
1754
|
def analyze_iam_policy_longrunning request, options = nil
|
@@ -2059,8 +2068,8 @@ module Google
|
|
2059
2068
|
# Required. The name of the project/folder/organization where this
|
2060
2069
|
# saved_query should be created in. It can only be an organization number
|
2061
2070
|
# (such as "organizations/123"), a folder number (such as "folders/123"), a
|
2062
|
-
# project ID (such as "projects/my-project-id")
|
2063
|
-
#
|
2071
|
+
# project ID (such as "projects/my-project-id"), or a project number (such as
|
2072
|
+
# "projects/12345").
|
2064
2073
|
# @param saved_query [::Google::Cloud::Asset::V1::SavedQuery, ::Hash]
|
2065
2074
|
# Required. The saved_query details. The `name` field must be empty as it
|
2066
2075
|
# will be generated based on the parent and saved_query_id.
|
@@ -2261,8 +2270,8 @@ module Google
|
|
2261
2270
|
# @param page_size [::Integer]
|
2262
2271
|
# Optional. The maximum number of saved queries to return per page. The
|
2263
2272
|
# service may return fewer than this value. If unspecified, at most 50 will
|
2264
|
-
# be returned.
|
2265
|
-
#
|
2273
|
+
# be returned. The maximum value is 1000; values above 1000 will be coerced
|
2274
|
+
# to 1000.
|
2266
2275
|
# @param page_token [::String]
|
2267
2276
|
# Optional. A page token, received from a previous `ListSavedQueries` call.
|
2268
2277
|
# Provide this to retrieve the subsequent page.
|
@@ -2290,13 +2299,11 @@ module Google
|
|
2290
2299
|
# # Call the list_saved_queries method.
|
2291
2300
|
# result = client.list_saved_queries request
|
2292
2301
|
#
|
2293
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2294
|
-
# #
|
2295
|
-
#
|
2296
|
-
# # methods are also available for managing paging directly.
|
2297
|
-
# result.each do |response|
|
2302
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2303
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2304
|
+
# result.each do |item|
|
2298
2305
|
# # Each element is of type ::Google::Cloud::Asset::V1::SavedQuery.
|
2299
|
-
# p
|
2306
|
+
# p item
|
2300
2307
|
# end
|
2301
2308
|
#
|
2302
2309
|
def list_saved_queries request, options = nil
|
@@ -2689,13 +2696,11 @@ module Google
|
|
2689
2696
|
# # Call the analyze_org_policies method.
|
2690
2697
|
# result = client.analyze_org_policies request
|
2691
2698
|
#
|
2692
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2693
|
-
# #
|
2694
|
-
#
|
2695
|
-
# # methods are also available for managing paging directly.
|
2696
|
-
# result.each do |response|
|
2699
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2700
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2701
|
+
# result.each do |item|
|
2697
2702
|
# # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPoliciesResponse::OrgPolicyResult.
|
2698
|
-
# p
|
2703
|
+
# p item
|
2699
2704
|
# end
|
2700
2705
|
#
|
2701
2706
|
def analyze_org_policies request, options = nil
|
@@ -2805,13 +2810,11 @@ module Google
|
|
2805
2810
|
# # Call the analyze_org_policy_governed_containers method.
|
2806
2811
|
# result = client.analyze_org_policy_governed_containers request
|
2807
2812
|
#
|
2808
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2809
|
-
# #
|
2810
|
-
#
|
2811
|
-
# # methods are also available for managing paging directly.
|
2812
|
-
# result.each do |response|
|
2813
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2814
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2815
|
+
# result.each do |item|
|
2813
2816
|
# # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedContainersResponse::GovernedContainer.
|
2814
|
-
# p
|
2817
|
+
# p item
|
2815
2818
|
# end
|
2816
2819
|
#
|
2817
2820
|
def analyze_org_policy_governed_containers request, options = nil
|
@@ -2943,13 +2946,11 @@ module Google
|
|
2943
2946
|
# # Call the analyze_org_policy_governed_assets method.
|
2944
2947
|
# result = client.analyze_org_policy_governed_assets request
|
2945
2948
|
#
|
2946
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2947
|
-
# #
|
2948
|
-
#
|
2949
|
-
# # methods are also available for managing paging directly.
|
2950
|
-
# result.each do |response|
|
2949
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2950
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2951
|
+
# result.each do |item|
|
2951
2952
|
# # Each element is of type ::Google::Cloud::Asset::V1::AnalyzeOrgPolicyGovernedAssetsResponse::GovernedAsset.
|
2952
|
-
# p
|
2953
|
+
# p item
|
2953
2954
|
# end
|
2954
2955
|
#
|
2955
2956
|
def analyze_org_policy_governed_assets request, options = nil
|
@@ -3032,9 +3033,9 @@ module Google
|
|
3032
3033
|
# * (`String`) The path to a service account key file in JSON format
|
3033
3034
|
# * (`Hash`) A service account key as a Hash
|
3034
3035
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3035
|
-
# (see the [googleauth docs](https://
|
3036
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
3036
3037
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3037
|
-
# (see the [signet docs](https://
|
3038
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
3038
3039
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
3039
3040
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
3040
3041
|
# * (`nil`) indicating no credentials
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -622,9 +620,9 @@ module Google
|
|
622
620
|
# * (`String`) The path to a service account key file in JSON format
|
623
621
|
# * (`Hash`) A service account key as a Hash
|
624
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
625
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
626
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
627
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
628
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
629
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
630
628
|
# * (`nil`) indicating no credentials
|