google-cloud-asset-v1 0.8.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/cloud/asset/v1.rb +3 -0
- data/lib/google/cloud/asset/v1/asset_service/client.rb +229 -62
- data/lib/google/cloud/asset/v1/asset_service/operations.rb +95 -10
- data/lib/google/cloud/asset/v1/asset_service/paths.rb +2 -2
- data/lib/google/cloud/asset/v1/asset_service_pb.rb +24 -0
- data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +4 -1
- data/lib/google/cloud/asset/v1/assets_pb.rb +22 -0
- data/lib/google/cloud/asset/v1/version.rb +1 -1
- data/lib/google/cloud/osconfig/v1/inventory_pb.rb +108 -0
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/cloud/asset/v1/asset_service.rb +165 -30
- data/proto_docs/google/cloud/asset/v1/assets.rb +157 -12
- data/proto_docs/google/cloud/osconfig/v1/inventory.rb +284 -0
- data/proto_docs/google/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- metadata +23 -13
@@ -60,19 +60,27 @@ module Google
|
|
60
60
|
parent_config = while namespace.any?
|
61
61
|
parent_name = namespace.join "::"
|
62
62
|
parent_const = const_get parent_name
|
63
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
64
|
namespace.pop
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
67
67
|
|
68
68
|
default_config.rpcs.export_assets.timeout = 60.0
|
69
69
|
|
70
|
+
default_config.rpcs.list_assets.timeout = 60.0
|
71
|
+
default_config.rpcs.list_assets.retry_policy = {
|
72
|
+
initial_delay: 0.1,
|
73
|
+
max_delay: 60.0,
|
74
|
+
multiplier: 1.3,
|
75
|
+
retry_codes: [4, 14]
|
76
|
+
}
|
77
|
+
|
70
78
|
default_config.rpcs.batch_get_assets_history.timeout = 60.0
|
71
79
|
default_config.rpcs.batch_get_assets_history.retry_policy = {
|
72
80
|
initial_delay: 0.1,
|
73
|
-
|
74
|
-
|
75
|
-
|
81
|
+
max_delay: 60.0,
|
82
|
+
multiplier: 1.3,
|
83
|
+
retry_codes: [4, 14]
|
76
84
|
}
|
77
85
|
|
78
86
|
default_config.rpcs.create_feed.timeout = 60.0
|
@@ -80,17 +88,17 @@ module Google
|
|
80
88
|
default_config.rpcs.get_feed.timeout = 60.0
|
81
89
|
default_config.rpcs.get_feed.retry_policy = {
|
82
90
|
initial_delay: 0.1,
|
83
|
-
|
84
|
-
|
85
|
-
|
91
|
+
max_delay: 60.0,
|
92
|
+
multiplier: 1.3,
|
93
|
+
retry_codes: [4, 14]
|
86
94
|
}
|
87
95
|
|
88
96
|
default_config.rpcs.list_feeds.timeout = 60.0
|
89
97
|
default_config.rpcs.list_feeds.retry_policy = {
|
90
98
|
initial_delay: 0.1,
|
91
|
-
|
92
|
-
|
93
|
-
|
99
|
+
max_delay: 60.0,
|
100
|
+
multiplier: 1.3,
|
101
|
+
retry_codes: [4, 14]
|
94
102
|
}
|
95
103
|
|
96
104
|
default_config.rpcs.update_feed.timeout = 60.0
|
@@ -98,33 +106,33 @@ module Google
|
|
98
106
|
default_config.rpcs.delete_feed.timeout = 60.0
|
99
107
|
default_config.rpcs.delete_feed.retry_policy = {
|
100
108
|
initial_delay: 0.1,
|
101
|
-
|
102
|
-
|
103
|
-
|
109
|
+
max_delay: 60.0,
|
110
|
+
multiplier: 1.3,
|
111
|
+
retry_codes: [4, 14]
|
104
112
|
}
|
105
113
|
|
106
114
|
default_config.rpcs.search_all_resources.timeout = 15.0
|
107
115
|
default_config.rpcs.search_all_resources.retry_policy = {
|
108
116
|
initial_delay: 0.1,
|
109
|
-
|
110
|
-
|
111
|
-
|
117
|
+
max_delay: 60.0,
|
118
|
+
multiplier: 1.3,
|
119
|
+
retry_codes: [4, 14]
|
112
120
|
}
|
113
121
|
|
114
122
|
default_config.rpcs.search_all_iam_policies.timeout = 15.0
|
115
123
|
default_config.rpcs.search_all_iam_policies.retry_policy = {
|
116
124
|
initial_delay: 0.1,
|
117
|
-
|
118
|
-
|
119
|
-
|
125
|
+
max_delay: 60.0,
|
126
|
+
multiplier: 1.3,
|
127
|
+
retry_codes: [4, 14]
|
120
128
|
}
|
121
129
|
|
122
130
|
default_config.rpcs.analyze_iam_policy.timeout = 300.0
|
123
131
|
default_config.rpcs.analyze_iam_policy.retry_policy = {
|
124
132
|
initial_delay: 0.1,
|
125
|
-
|
126
|
-
|
127
|
-
|
133
|
+
max_delay: 60.0,
|
134
|
+
multiplier: 1.3,
|
135
|
+
retry_codes: [14]
|
128
136
|
}
|
129
137
|
|
130
138
|
default_config.rpcs.analyze_iam_policy_longrunning.timeout = 60.0
|
@@ -190,7 +198,13 @@ module Google
|
|
190
198
|
|
191
199
|
# Create credentials
|
192
200
|
credentials = @config.credentials
|
193
|
-
|
201
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
202
|
+
# but only if the default endpoint does not have a region prefix.
|
203
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
204
|
+
@config.endpoint == Client.configure.endpoint &&
|
205
|
+
!@config.endpoint.split(".").first.include?("-")
|
206
|
+
credentials ||= Credentials.default scope: @config.scope,
|
207
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
194
208
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
195
209
|
credentials = Credentials.new credentials, scope: @config.scope
|
196
210
|
end
|
@@ -329,6 +343,112 @@ module Google
|
|
329
343
|
raise ::Google::Cloud::Error.from_error(e)
|
330
344
|
end
|
331
345
|
|
346
|
+
##
|
347
|
+
# Lists assets with time and resource types and returns paged results in
|
348
|
+
# response.
|
349
|
+
#
|
350
|
+
# @overload list_assets(request, options = nil)
|
351
|
+
# Pass arguments to `list_assets` via a request object, either of type
|
352
|
+
# {::Google::Cloud::Asset::V1::ListAssetsRequest} or an equivalent Hash.
|
353
|
+
#
|
354
|
+
# @param request [::Google::Cloud::Asset::V1::ListAssetsRequest, ::Hash]
|
355
|
+
# A request object representing the call parameters. Required. To specify no
|
356
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
357
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
358
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
359
|
+
#
|
360
|
+
# @overload list_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, page_size: nil, page_token: nil)
|
361
|
+
# Pass arguments to `list_assets` via keyword arguments. Note that at
|
362
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
363
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
364
|
+
#
|
365
|
+
# @param parent [::String]
|
366
|
+
# Required. Name of the organization or project the assets belong to. Format:
|
367
|
+
# "organizations/[organization-number]" (such as "organizations/123"),
|
368
|
+
# "projects/[project-id]" (such as "projects/my-project-id"), or
|
369
|
+
# "projects/[project-number]" (such as "projects/12345").
|
370
|
+
# @param read_time [::Google::Protobuf::Timestamp, ::Hash]
|
371
|
+
# Timestamp to take an asset snapshot. This can only be set to a timestamp
|
372
|
+
# between the current time and the current time minus 35 days (inclusive).
|
373
|
+
# If not specified, the current time will be used. Due to delays in resource
|
374
|
+
# data collection and indexing, there is a volatile window during which
|
375
|
+
# running the same query may get different results.
|
376
|
+
# @param asset_types [::Array<::String>]
|
377
|
+
# A list of asset types to take a snapshot for. For example:
|
378
|
+
# "compute.googleapis.com/Disk".
|
379
|
+
#
|
380
|
+
# Regular expression is also supported. For example:
|
381
|
+
#
|
382
|
+
# * "compute.googleapis.com.*" snapshots resources whose asset type starts
|
383
|
+
# with "compute.googleapis.com".
|
384
|
+
# * ".*Instance" snapshots resources whose asset type ends with "Instance".
|
385
|
+
# * ".*Instance.*" snapshots resources whose asset type contains "Instance".
|
386
|
+
#
|
387
|
+
# See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
|
388
|
+
# regular expression syntax. If the regular expression does not match any
|
389
|
+
# supported asset type, an INVALID_ARGUMENT error will be returned.
|
390
|
+
#
|
391
|
+
# If specified, only matching assets will be returned, otherwise, it will
|
392
|
+
# snapshot all asset types. See [Introduction to Cloud Asset
|
393
|
+
# Inventory](https://cloud.google.com/asset-inventory/docs/overview)
|
394
|
+
# for all supported asset types.
|
395
|
+
# @param content_type [::Google::Cloud::Asset::V1::ContentType]
|
396
|
+
# Asset content type. If not specified, no content but the asset name will
|
397
|
+
# be returned.
|
398
|
+
# @param page_size [::Integer]
|
399
|
+
# The maximum number of assets to be returned in a single response. Default
|
400
|
+
# is 100, minimum is 1, and maximum is 1000.
|
401
|
+
# @param page_token [::String]
|
402
|
+
# The `next_page_token` returned from the previous `ListAssetsResponse`, or
|
403
|
+
# unspecified for the first `ListAssetsRequest`. It is a continuation of a
|
404
|
+
# prior `ListAssets` call, and the API should return the next page of assets.
|
405
|
+
#
|
406
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
407
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>]
|
408
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
409
|
+
#
|
410
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::Asset>]
|
411
|
+
#
|
412
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
413
|
+
#
|
414
|
+
def list_assets request, options = nil
|
415
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
416
|
+
|
417
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListAssetsRequest
|
418
|
+
|
419
|
+
# Converts hash and nil to an options object
|
420
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
421
|
+
|
422
|
+
# Customize the options with defaults
|
423
|
+
metadata = @config.rpcs.list_assets.metadata.to_h
|
424
|
+
|
425
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
426
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
427
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
428
|
+
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
429
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
430
|
+
|
431
|
+
header_params = {
|
432
|
+
"parent" => request.parent
|
433
|
+
}
|
434
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
435
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
436
|
+
|
437
|
+
options.apply_defaults timeout: @config.rpcs.list_assets.timeout,
|
438
|
+
metadata: metadata,
|
439
|
+
retry_policy: @config.rpcs.list_assets.retry_policy
|
440
|
+
options.apply_defaults metadata: @config.metadata,
|
441
|
+
retry_policy: @config.retry_policy
|
442
|
+
|
443
|
+
@asset_service_stub.call_rpc :list_assets, request, options: options do |response, operation|
|
444
|
+
response = ::Gapic::PagedEnumerable.new @asset_service_stub, :list_assets, request, response, operation, options
|
445
|
+
yield response, operation if block_given?
|
446
|
+
return response
|
447
|
+
end
|
448
|
+
rescue ::GRPC::BadStatus => e
|
449
|
+
raise ::Google::Cloud::Error.from_error(e)
|
450
|
+
end
|
451
|
+
|
332
452
|
##
|
333
453
|
# Batch gets the update history of assets that overlap a time window.
|
334
454
|
# For IAM_POLICY content, this API outputs history when the asset and its
|
@@ -805,7 +925,7 @@ module Google
|
|
805
925
|
# @param scope [::String]
|
806
926
|
# Required. A scope can be a project, a folder, or an organization. The search is
|
807
927
|
# limited to the resources within the `scope`. The caller must be granted the
|
808
|
-
# [`cloudasset.assets.searchAllResources`](
|
928
|
+
# [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
|
809
929
|
# permission on the desired scope.
|
810
930
|
#
|
811
931
|
# The allowed values are:
|
@@ -816,36 +936,41 @@ module Google
|
|
816
936
|
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
|
817
937
|
# @param query [::String]
|
818
938
|
# Optional. The query statement. See [how to construct a
|
819
|
-
# query](
|
939
|
+
# query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
|
820
940
|
# for more information. If not specified or empty, it will search all the
|
821
|
-
# resources within the specified `scope`.
|
822
|
-
# compared against each Cloud IAM policy binding, including its members,
|
823
|
-
# roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
|
824
|
-
# contain the bindings that match your query. To learn more about the IAM
|
825
|
-
# policy structure, see [IAM policy
|
826
|
-
# doc](https://cloud.google.com/iam/docs/policies#structure).
|
941
|
+
# resources within the specified `scope`.
|
827
942
|
#
|
828
943
|
# Examples:
|
829
944
|
#
|
830
945
|
# * `name:Important` to find Cloud resources whose name contains
|
831
946
|
# "Important" as a word.
|
947
|
+
# * `name=Important` to find the Cloud resource whose name is exactly
|
948
|
+
# "Important".
|
832
949
|
# * `displayName:Impor*` to find Cloud resources whose display name
|
833
|
-
# contains "Impor" as a prefix.
|
834
|
-
# * `
|
835
|
-
#
|
836
|
-
# * `location:us-west*` to find Cloud resources whose location is
|
837
|
-
# prefixed with "us-west".
|
950
|
+
# contains "Impor" as a prefix of any word in the field.
|
951
|
+
# * `location:us-west*` to find Cloud resources whose location contains both
|
952
|
+
# "us" and "west" as prefixes.
|
838
953
|
# * `labels:prod` to find Cloud resources whose labels contain "prod" as
|
839
954
|
# a key or value.
|
840
955
|
# * `labels.env:prod` to find Cloud resources that have a label "env"
|
841
956
|
# and its value is "prod".
|
842
957
|
# * `labels.env:*` to find Cloud resources that have a label "env".
|
958
|
+
# * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
|
959
|
+
# encryption key whose name contains the word "key".
|
960
|
+
# * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
|
961
|
+
# word.
|
962
|
+
# * `NOT state:ACTIVE` to find \\{\\{gcp_name}} resources whose state
|
963
|
+
# doesn't contain "ACTIVE" as a word.
|
964
|
+
# * `createTime<1609459200` to find Cloud resources that were created before
|
965
|
+
# "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
|
966
|
+
# "2021-01-01 00:00:00 UTC" in seconds.
|
967
|
+
# * `updateTime>1609459200` to find Cloud resources that were updated after
|
968
|
+
# "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
|
969
|
+
# "2021-01-01 00:00:00 UTC" in seconds.
|
843
970
|
# * `Important` to find Cloud resources that contain "Important" as a word
|
844
971
|
# in any of the searchable fields.
|
845
|
-
# * `Impor*` to find Cloud resources that contain "Impor" as a prefix
|
846
|
-
# in any of the searchable fields.
|
847
|
-
# * `*por*` to find Cloud resources that contain "por" as a substring in
|
848
|
-
# any of the searchable fields.
|
972
|
+
# * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
|
973
|
+
# word in any of the searchable fields.
|
849
974
|
# * `Important location:(us-west1 OR global)` to find Cloud
|
850
975
|
# resources that contain "Important" as a word in any of the searchable
|
851
976
|
# fields and are also located in the "us-west1" region or the "global"
|
@@ -854,6 +979,17 @@ module Google
|
|
854
979
|
# Optional. A list of asset types that this request searches for. If empty, it will
|
855
980
|
# search all the [searchable asset
|
856
981
|
# types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
|
982
|
+
#
|
983
|
+
# Regular expressions are also supported. For example:
|
984
|
+
#
|
985
|
+
# * "compute.googleapis.com.*" snapshots resources whose asset type starts
|
986
|
+
# with "compute.googleapis.com".
|
987
|
+
# * ".*Instance" snapshots resources whose asset type ends with "Instance".
|
988
|
+
# * ".*Instance.*" snapshots resources whose asset type contains "Instance".
|
989
|
+
#
|
990
|
+
# See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
|
991
|
+
# regular expression syntax. If the regular expression does not match any
|
992
|
+
# supported asset type, an INVALID_ARGUMENT error will be returned.
|
857
993
|
# @param page_size [::Integer]
|
858
994
|
# Optional. The page size for search result pagination. Page size is capped at 500 even
|
859
995
|
# if a larger value is given. If set to zero, server will pick an appropriate
|
@@ -865,12 +1001,24 @@ module Google
|
|
865
1001
|
# the previous response. The values of all other method parameters, must be
|
866
1002
|
# identical to those in the previous call.
|
867
1003
|
# @param order_by [::String]
|
868
|
-
# Optional. A comma
|
1004
|
+
# Optional. A comma-separated list of fields specifying the sorting order of the
|
869
1005
|
# results. The default order is ascending. Add " DESC" after the field name
|
870
1006
|
# to indicate descending order. Redundant space characters are ignored.
|
871
|
-
# Example: "location DESC, name".
|
872
|
-
#
|
873
|
-
#
|
1007
|
+
# Example: "location DESC, name".
|
1008
|
+
# Only singular primitive fields in the response are sortable:
|
1009
|
+
# * name
|
1010
|
+
# * assetType
|
1011
|
+
# * project
|
1012
|
+
# * displayName
|
1013
|
+
# * description
|
1014
|
+
# * location
|
1015
|
+
# * kmsKey
|
1016
|
+
# * createTime
|
1017
|
+
# * updateTime
|
1018
|
+
# * state
|
1019
|
+
# * parentFullResourceName
|
1020
|
+
# * parentAssetType
|
1021
|
+
# All the other fields such as repeated fields (e.g., `networkTags`), map
|
874
1022
|
# fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
|
875
1023
|
# are not supported.
|
876
1024
|
#
|
@@ -945,7 +1093,7 @@ module Google
|
|
945
1093
|
# Required. A scope can be a project, a folder, or an organization. The search is
|
946
1094
|
# limited to the IAM policies within the `scope`. The caller must be granted
|
947
1095
|
# the
|
948
|
-
# [`cloudasset.assets.searchAllIamPolicies`](
|
1096
|
+
# [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
|
949
1097
|
# permission on the desired scope.
|
950
1098
|
#
|
951
1099
|
# The allowed values are:
|
@@ -958,7 +1106,12 @@ module Google
|
|
958
1106
|
# Optional. The query statement. See [how to construct a
|
959
1107
|
# query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
|
960
1108
|
# for more information. If not specified or empty, it will search all the
|
961
|
-
# IAM policies within the specified `scope`.
|
1109
|
+
# IAM policies within the specified `scope`. Note that the query string is
|
1110
|
+
# compared against each Cloud IAM policy binding, including its members,
|
1111
|
+
# roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
|
1112
|
+
# contain the bindings that match your query. To learn more about the IAM
|
1113
|
+
# policy structure, see [IAM policy
|
1114
|
+
# doc](https://cloud.google.com/iam/docs/policies#structure).
|
962
1115
|
#
|
963
1116
|
# Examples:
|
964
1117
|
#
|
@@ -966,18 +1119,25 @@ module Google
|
|
966
1119
|
# "amy@gmail.com".
|
967
1120
|
# * `policy:roles/compute.admin` to find IAM policy bindings that specify
|
968
1121
|
# the Compute Admin role.
|
1122
|
+
# * `policy:comp*` to find IAM policy bindings that contain "comp" as a
|
1123
|
+
# prefix of any word in the binding.
|
969
1124
|
# * `policy.role.permissions:storage.buckets.update` to find IAM policy
|
970
1125
|
# bindings that specify a role containing "storage.buckets.update"
|
971
1126
|
# permission. Note that if callers don't have `iam.roles.get` access to a
|
972
1127
|
# role's included permissions, policy bindings that specify this role will
|
973
1128
|
# be dropped from the search results.
|
1129
|
+
# * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
|
1130
|
+
# role containing "upd" as a prefix of any word in the role permission.
|
1131
|
+
# Note that if callers don't have `iam.roles.get` access to a role's
|
1132
|
+
# included permissions, policy bindings that specify this role will be
|
1133
|
+
# dropped from the search results.
|
974
1134
|
# * `resource:organizations/123456` to find IAM policy bindings
|
975
1135
|
# that are set on "organizations/123456".
|
1136
|
+
# * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
|
1137
|
+
# find IAM policy bindings that are set on the project named "myproject".
|
976
1138
|
# * `Important` to find IAM policy bindings that contain "Important" as a
|
977
1139
|
# word in any of the searchable fields (except for the included
|
978
1140
|
# permissions).
|
979
|
-
# * `*por*` to find IAM policy bindings that contain "por" as a substring
|
980
|
-
# in any of the searchable fields (except for the included permissions).
|
981
1141
|
# * `resource:(instance1 OR instance2) policy:amy` to find
|
982
1142
|
# IAM policy bindings that are set on resources "instance1" or
|
983
1143
|
# "instance2" and also specify user "amy".
|
@@ -1285,7 +1445,7 @@ module Google
|
|
1285
1445
|
config_attr :scope, nil, ::String, ::Array, nil
|
1286
1446
|
config_attr :lib_name, nil, ::String, nil
|
1287
1447
|
config_attr :lib_version, nil, ::String, nil
|
1288
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1448
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1289
1449
|
config_attr :interceptors, nil, ::Array, nil
|
1290
1450
|
config_attr :timeout, nil, ::Numeric, nil
|
1291
1451
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -1306,7 +1466,7 @@ module Google
|
|
1306
1466
|
def rpcs
|
1307
1467
|
@rpcs ||= begin
|
1308
1468
|
parent_rpcs = nil
|
1309
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
1469
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1310
1470
|
Rpcs.new parent_rpcs
|
1311
1471
|
end
|
1312
1472
|
end
|
@@ -1318,7 +1478,7 @@ module Google
|
|
1318
1478
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1319
1479
|
# the following configuration fields:
|
1320
1480
|
#
|
1321
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
1481
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1322
1482
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1323
1483
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1324
1484
|
# include the following keys:
|
@@ -1335,6 +1495,11 @@ module Google
|
|
1335
1495
|
#
|
1336
1496
|
attr_reader :export_assets
|
1337
1497
|
##
|
1498
|
+
# RPC-specific configuration for `list_assets`
|
1499
|
+
# @return [::Gapic::Config::Method]
|
1500
|
+
#
|
1501
|
+
attr_reader :list_assets
|
1502
|
+
##
|
1338
1503
|
# RPC-specific configuration for `batch_get_assets_history`
|
1339
1504
|
# @return [::Gapic::Config::Method]
|
1340
1505
|
#
|
@@ -1387,27 +1552,29 @@ module Google
|
|
1387
1552
|
|
1388
1553
|
# @private
|
1389
1554
|
def initialize parent_rpcs = nil
|
1390
|
-
export_assets_config = parent_rpcs
|
1555
|
+
export_assets_config = parent_rpcs.export_assets if parent_rpcs.respond_to? :export_assets
|
1391
1556
|
@export_assets = ::Gapic::Config::Method.new export_assets_config
|
1392
|
-
|
1557
|
+
list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets
|
1558
|
+
@list_assets = ::Gapic::Config::Method.new list_assets_config
|
1559
|
+
batch_get_assets_history_config = parent_rpcs.batch_get_assets_history if parent_rpcs.respond_to? :batch_get_assets_history
|
1393
1560
|
@batch_get_assets_history = ::Gapic::Config::Method.new batch_get_assets_history_config
|
1394
|
-
create_feed_config = parent_rpcs
|
1561
|
+
create_feed_config = parent_rpcs.create_feed if parent_rpcs.respond_to? :create_feed
|
1395
1562
|
@create_feed = ::Gapic::Config::Method.new create_feed_config
|
1396
|
-
get_feed_config = parent_rpcs
|
1563
|
+
get_feed_config = parent_rpcs.get_feed if parent_rpcs.respond_to? :get_feed
|
1397
1564
|
@get_feed = ::Gapic::Config::Method.new get_feed_config
|
1398
|
-
list_feeds_config = parent_rpcs
|
1565
|
+
list_feeds_config = parent_rpcs.list_feeds if parent_rpcs.respond_to? :list_feeds
|
1399
1566
|
@list_feeds = ::Gapic::Config::Method.new list_feeds_config
|
1400
|
-
update_feed_config = parent_rpcs
|
1567
|
+
update_feed_config = parent_rpcs.update_feed if parent_rpcs.respond_to? :update_feed
|
1401
1568
|
@update_feed = ::Gapic::Config::Method.new update_feed_config
|
1402
|
-
delete_feed_config = parent_rpcs
|
1569
|
+
delete_feed_config = parent_rpcs.delete_feed if parent_rpcs.respond_to? :delete_feed
|
1403
1570
|
@delete_feed = ::Gapic::Config::Method.new delete_feed_config
|
1404
|
-
search_all_resources_config = parent_rpcs
|
1571
|
+
search_all_resources_config = parent_rpcs.search_all_resources if parent_rpcs.respond_to? :search_all_resources
|
1405
1572
|
@search_all_resources = ::Gapic::Config::Method.new search_all_resources_config
|
1406
|
-
search_all_iam_policies_config = parent_rpcs
|
1573
|
+
search_all_iam_policies_config = parent_rpcs.search_all_iam_policies if parent_rpcs.respond_to? :search_all_iam_policies
|
1407
1574
|
@search_all_iam_policies = ::Gapic::Config::Method.new search_all_iam_policies_config
|
1408
|
-
analyze_iam_policy_config = parent_rpcs
|
1575
|
+
analyze_iam_policy_config = parent_rpcs.analyze_iam_policy if parent_rpcs.respond_to? :analyze_iam_policy
|
1409
1576
|
@analyze_iam_policy = ::Gapic::Config::Method.new analyze_iam_policy_config
|
1410
|
-
analyze_iam_policy_longrunning_config = parent_rpcs
|
1577
|
+
analyze_iam_policy_longrunning_config = parent_rpcs.analyze_iam_policy_longrunning if parent_rpcs.respond_to? :analyze_iam_policy_longrunning
|
1411
1578
|
@analyze_iam_policy_longrunning = ::Gapic::Config::Method.new analyze_iam_policy_longrunning_config
|
1412
1579
|
|
1413
1580
|
yield self if block_given?
|