google-cloud-asset-v1 0.5.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/asset/v1/asset_service/client.rb +155 -102
- data/lib/google/cloud/asset/v1/asset_service/operations.rb +1 -1
- data/lib/google/cloud/asset/v1/asset_service_pb.rb +11 -0
- data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +22 -23
- data/lib/google/cloud/asset/v1/assets_pb.rb +1 -1
- data/lib/google/cloud/asset/v1/version.rb +1 -1
- data/proto_docs/google/cloud/asset/v1/asset_service.rb +144 -90
- data/proto_docs/google/cloud/asset/v1/assets.rb +35 -25
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7601e08b3f6d242baec633460a4e82037603a86284c15071dda3595e20984b4d
|
4
|
+
data.tar.gz: 5dddf6f643e226cc7a0c9d070bd755a9735fad69d33ad1237070b80d38276a24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ee7a713b523233cdc7b35f12ae891388713619ca96743a8e3b1d3c30bdefd09a3be70ec00c0ada079c0a93ab85d890d1d3c7e11b7b266b51ba9d7406765ad5e
|
7
|
+
data.tar.gz: b3d0f7fa841d88066fe72e4835cd33891a0fb9be93ce60a80a221647bf4850e72901ee5b429c36aa733983648083d024d3118044a00099ca6e1d31dc236395e6
|
@@ -72,7 +72,35 @@ module Google
|
|
72
72
|
initial_delay: 0.1,
|
73
73
|
max_delay: 60.0,
|
74
74
|
multiplier: 1.3,
|
75
|
-
retry_codes: [
|
75
|
+
retry_codes: [4, 14]
|
76
|
+
}
|
77
|
+
|
78
|
+
default_config.rpcs.create_feed.timeout = 60.0
|
79
|
+
|
80
|
+
default_config.rpcs.get_feed.timeout = 60.0
|
81
|
+
default_config.rpcs.get_feed.retry_policy = {
|
82
|
+
initial_delay: 0.1,
|
83
|
+
max_delay: 60.0,
|
84
|
+
multiplier: 1.3,
|
85
|
+
retry_codes: [4, 14]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.list_feeds.timeout = 60.0
|
89
|
+
default_config.rpcs.list_feeds.retry_policy = {
|
90
|
+
initial_delay: 0.1,
|
91
|
+
max_delay: 60.0,
|
92
|
+
multiplier: 1.3,
|
93
|
+
retry_codes: [4, 14]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.update_feed.timeout = 60.0
|
97
|
+
|
98
|
+
default_config.rpcs.delete_feed.timeout = 60.0
|
99
|
+
default_config.rpcs.delete_feed.retry_policy = {
|
100
|
+
initial_delay: 0.1,
|
101
|
+
max_delay: 60.0,
|
102
|
+
multiplier: 1.3,
|
103
|
+
retry_codes: [4, 14]
|
76
104
|
}
|
77
105
|
|
78
106
|
default_config.rpcs.search_all_resources.timeout = 15.0
|
@@ -80,7 +108,7 @@ module Google
|
|
80
108
|
initial_delay: 0.1,
|
81
109
|
max_delay: 60.0,
|
82
110
|
multiplier: 1.3,
|
83
|
-
retry_codes: [
|
111
|
+
retry_codes: [4, 14]
|
84
112
|
}
|
85
113
|
|
86
114
|
default_config.rpcs.search_all_iam_policies.timeout = 15.0
|
@@ -88,7 +116,7 @@ module Google
|
|
88
116
|
initial_delay: 0.1,
|
89
117
|
max_delay: 60.0,
|
90
118
|
multiplier: 1.3,
|
91
|
-
retry_codes: [
|
119
|
+
retry_codes: [4, 14]
|
92
120
|
}
|
93
121
|
|
94
122
|
default_config
|
@@ -186,14 +214,13 @@ module Google
|
|
186
214
|
# Exports assets with time and resource types to a given Cloud Storage
|
187
215
|
# location/BigQuery table. For Cloud Storage location destinations, the
|
188
216
|
# output format is newline-delimited JSON. Each line represents a
|
189
|
-
# {::Google::Cloud::Asset::V1::Asset google.cloud.asset.v1.Asset} in the JSON
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
# 5 minutes.
|
217
|
+
# {::Google::Cloud::Asset::V1::Asset google.cloud.asset.v1.Asset} in the JSON format; for BigQuery table
|
218
|
+
# destinations, the output table stores the fields in asset proto as columns.
|
219
|
+
# This API implements the {::Google::Longrunning::Operation google.longrunning.Operation} API
|
220
|
+
# , which allows you to keep track of the export. We recommend intervals of
|
221
|
+
# at least 2 seconds with exponential retry to poll the export operation
|
222
|
+
# result. For regular-size resource parent, the export operation usually
|
223
|
+
# finishes within 5 minutes.
|
197
224
|
#
|
198
225
|
# @overload export_assets(request, options = nil)
|
199
226
|
# Pass arguments to `export_assets` via a request object, either of type
|
@@ -222,17 +249,29 @@ module Google
|
|
222
249
|
# data collection and indexing, there is a volatile window during which
|
223
250
|
# running the same query may get different results.
|
224
251
|
# @param asset_types [::Array<::String>]
|
225
|
-
# A list of asset types
|
226
|
-
# "compute.googleapis.com/Disk".
|
227
|
-
#
|
252
|
+
# A list of asset types to take a snapshot for. For example:
|
253
|
+
# "compute.googleapis.com/Disk".
|
254
|
+
#
|
255
|
+
# Regular expressions are also supported. For example:
|
256
|
+
#
|
257
|
+
# * "compute.googleapis.com.*" snapshots resources whose asset type starts
|
258
|
+
# with "compute.googleapis.com".
|
259
|
+
# * ".*Instance" snapshots resources whose asset type ends with "Instance".
|
260
|
+
# * ".*Instance.*" snapshots resources whose asset type contains "Instance".
|
261
|
+
#
|
262
|
+
# See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
|
263
|
+
# regular expression syntax. If the regular expression does not match any
|
264
|
+
# supported asset type, an INVALID_ARGUMENT error will be returned.
|
265
|
+
#
|
266
|
+
# If specified, only matching assets will be returned, otherwise, it will
|
267
|
+
# snapshot all asset types. See [Introduction to Cloud Asset
|
228
268
|
# Inventory](https://cloud.google.com/asset-inventory/docs/overview)
|
229
269
|
# for all supported asset types.
|
230
270
|
# @param content_type [::Google::Cloud::Asset::V1::ContentType]
|
231
271
|
# Asset content type. If not specified, no content but the asset name will be
|
232
272
|
# returned.
|
233
273
|
# @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash]
|
234
|
-
# Required. Output configuration indicating where the results will be output
|
235
|
-
# to.
|
274
|
+
# Required. Output configuration indicating where the results will be output to.
|
236
275
|
#
|
237
276
|
# @yield [response, operation] Access the result along with the RPC operation
|
238
277
|
# @yieldparam response [::Gapic::Operation]
|
@@ -401,8 +440,9 @@ module Google
|
|
401
440
|
# Required. This is the client-assigned asset feed identifier and it needs to
|
402
441
|
# be unique under a specific parent project/folder/organization.
|
403
442
|
# @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash]
|
404
|
-
# Required. The feed details. The field `name` must be empty and it will be
|
405
|
-
#
|
443
|
+
# Required. The feed details. The field `name` must be empty and it will be generated
|
444
|
+
# in the format of:
|
445
|
+
# projects/project_number/feeds/feed_id
|
406
446
|
# folders/folder_number/feeds/feed_id
|
407
447
|
# organizations/organization_number/feeds/feed_id
|
408
448
|
#
|
@@ -607,8 +647,8 @@ module Google
|
|
607
647
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
608
648
|
#
|
609
649
|
# @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash]
|
610
|
-
# Required. The new values of feed details. It must match an existing feed
|
611
|
-
#
|
650
|
+
# Required. The new values of feed details. It must match an existing feed and the
|
651
|
+
# field `name` must be in the format of:
|
612
652
|
# projects/project_number/feeds/feed_id or
|
613
653
|
# folders/folder_number/feeds/feed_id or
|
614
654
|
# organizations/organization_number/feeds/feed_id.
|
@@ -732,9 +772,9 @@ module Google
|
|
732
772
|
end
|
733
773
|
|
734
774
|
##
|
735
|
-
# Searches all
|
736
|
-
#
|
737
|
-
#
|
775
|
+
# Searches all Cloud resources within the specified scope, such as a project,
|
776
|
+
# folder, or organization. The caller must be granted the
|
777
|
+
# `cloudasset.assets.searchAllResources` permission on the desired scope,
|
738
778
|
# otherwise the request will be rejected.
|
739
779
|
#
|
740
780
|
# @overload search_all_resources(request, options = nil)
|
@@ -753,70 +793,76 @@ module Google
|
|
753
793
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
754
794
|
#
|
755
795
|
# @param scope [::String]
|
756
|
-
# Required. A scope can be a project, a folder or an organization. The search
|
757
|
-
#
|
796
|
+
# Required. A scope can be a project, a folder, or an organization. The search is
|
797
|
+
# limited to the resources within the `scope`. The caller must be granted the
|
798
|
+
# [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
|
799
|
+
# permission on the desired scope.
|
758
800
|
#
|
759
801
|
# The allowed values are:
|
760
802
|
#
|
761
|
-
# * projects/\\{PROJECT_ID}
|
762
|
-
# * projects/\\{PROJECT_NUMBER}
|
763
|
-
# * folders/\\{FOLDER_NUMBER}
|
764
|
-
# * organizations/\\{ORGANIZATION_NUMBER}
|
803
|
+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
|
804
|
+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
|
805
|
+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
|
806
|
+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
|
765
807
|
# @param query [::String]
|
766
|
-
# Optional. The query statement.
|
767
|
-
#
|
808
|
+
# Optional. The query statement. See [how to construct a
|
809
|
+
# query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
|
810
|
+
# for more information. If not specified or empty, it will search all the
|
811
|
+
# resources within the specified `scope`. Note that the query string is
|
812
|
+
# compared against each Cloud IAM policy binding, including its members,
|
813
|
+
# roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
|
814
|
+
# contain the bindings that match your query. To learn more about the IAM
|
815
|
+
# policy structure, see [IAM policy
|
816
|
+
# doc](https://cloud.google.com/iam/docs/policies#structure).
|
768
817
|
#
|
769
818
|
# Examples:
|
770
819
|
#
|
771
|
-
# * `name
|
820
|
+
# * `name:Important` to find Cloud resources whose name contains
|
772
821
|
# "Important" as a word.
|
773
|
-
# * `displayName
|
774
|
-
# contains "Impor" as a
|
775
|
-
# * `description
|
822
|
+
# * `displayName:Impor*` to find Cloud resources whose display name
|
823
|
+
# contains "Impor" as a prefix.
|
824
|
+
# * `description:*por*` to find Cloud resources whose description
|
776
825
|
# contains "por" as a substring.
|
777
|
-
# * `location
|
826
|
+
# * `location:us-west*` to find Cloud resources whose location is
|
778
827
|
# prefixed with "us-west".
|
779
|
-
# * `labels
|
828
|
+
# * `labels:prod` to find Cloud resources whose labels contain "prod" as
|
780
829
|
# a key or value.
|
781
|
-
# * `labels.env
|
830
|
+
# * `labels.env:prod` to find Cloud resources that have a label "env"
|
782
831
|
# and its value is "prod".
|
783
|
-
# * `labels.env
|
784
|
-
# * `
|
832
|
+
# * `labels.env:*` to find Cloud resources that have a label "env".
|
833
|
+
# * `Important` to find Cloud resources that contain "Important" as a word
|
785
834
|
# in any of the searchable fields.
|
786
|
-
# * `
|
835
|
+
# * `Impor*` to find Cloud resources that contain "Impor" as a prefix
|
787
836
|
# in any of the searchable fields.
|
788
|
-
# *
|
837
|
+
# * `*por*` to find Cloud resources that contain "por" as a substring in
|
789
838
|
# any of the searchable fields.
|
790
|
-
# * `
|
791
|
-
# resources
|
839
|
+
# * `Important location:(us-west1 OR global)` to find Cloud
|
840
|
+
# resources that contain "Important" as a word in any of the searchable
|
792
841
|
# fields and are also located in the "us-west1" region or the "global"
|
793
842
|
# location.
|
794
|
-
#
|
795
|
-
# See [how to construct a
|
796
|
-
# query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
|
797
|
-
# for more details.
|
798
843
|
# @param asset_types [::Array<::String>]
|
799
|
-
# Optional. A list of asset types that this request searches for. If empty,
|
800
|
-
#
|
844
|
+
# Optional. A list of asset types that this request searches for. If empty, it will
|
845
|
+
# search all the [searchable asset
|
801
846
|
# types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
|
802
847
|
# @param page_size [::Integer]
|
803
|
-
# Optional. The page size for search result pagination. Page size is capped
|
804
|
-
#
|
805
|
-
#
|
806
|
-
#
|
807
|
-
# returned.
|
848
|
+
# Optional. The page size for search result pagination. Page size is capped at 500 even
|
849
|
+
# if a larger value is given. If set to zero, server will pick an appropriate
|
850
|
+
# default. Returned results may be fewer than requested. When this happens,
|
851
|
+
# there could be more results as long as `next_page_token` is returned.
|
808
852
|
# @param page_token [::String]
|
809
|
-
# Optional. If present, then retrieve the next batch of results from the
|
810
|
-
#
|
811
|
-
#
|
812
|
-
#
|
853
|
+
# Optional. If present, then retrieve the next batch of results from the preceding call
|
854
|
+
# to this method. `page_token` must be the value of `next_page_token` from
|
855
|
+
# the previous response. The values of all other method parameters, must be
|
856
|
+
# identical to those in the previous call.
|
813
857
|
# @param order_by [::String]
|
814
|
-
# Optional. A comma separated list of fields specifying the sorting order of
|
815
|
-
#
|
816
|
-
#
|
817
|
-
# Example: "location DESC, name".
|
818
|
-
#
|
819
|
-
#
|
858
|
+
# Optional. A comma separated list of fields specifying the sorting order of the
|
859
|
+
# results. The default order is ascending. Add " DESC" after the field name
|
860
|
+
# to indicate descending order. Redundant space characters are ignored.
|
861
|
+
# Example: "location DESC, name". Only string fields in the response are
|
862
|
+
# sortable, including `name`, `displayName`, `description`, `location`. All
|
863
|
+
# the other fields such as repeated fields (e.g., `networkTags`), map
|
864
|
+
# fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
|
865
|
+
# are not supported.
|
820
866
|
#
|
821
867
|
# @yield [response, operation] Access the result along with the RPC operation
|
822
868
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>]
|
@@ -865,9 +911,9 @@ module Google
|
|
865
911
|
end
|
866
912
|
|
867
913
|
##
|
868
|
-
# Searches all
|
869
|
-
#
|
870
|
-
#
|
914
|
+
# Searches all IAM policies within the specified scope, such as a project,
|
915
|
+
# folder, or organization. The caller must be granted the
|
916
|
+
# `cloudasset.assets.searchAllIamPolicies` permission on the desired scope,
|
871
917
|
# otherwise the request will be rejected.
|
872
918
|
#
|
873
919
|
# @overload search_all_iam_policies(request, options = nil)
|
@@ -886,48 +932,55 @@ module Google
|
|
886
932
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
887
933
|
#
|
888
934
|
# @param scope [::String]
|
889
|
-
# Required. A scope can be a project, a folder or an organization. The search
|
890
|
-
#
|
935
|
+
# Required. A scope can be a project, a folder, or an organization. The search is
|
936
|
+
# limited to the IAM policies within the `scope`. The caller must be granted
|
937
|
+
# the
|
938
|
+
# [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
|
939
|
+
# permission on the desired scope.
|
891
940
|
#
|
892
941
|
# The allowed values are:
|
893
942
|
#
|
894
|
-
# * projects/\\{PROJECT_ID}
|
895
|
-
# * projects/\\{PROJECT_NUMBER}
|
896
|
-
# * folders/\\{FOLDER_NUMBER}
|
897
|
-
# * organizations/\\{ORGANIZATION_NUMBER}
|
943
|
+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
|
944
|
+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
|
945
|
+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
|
946
|
+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
|
898
947
|
# @param query [::String]
|
899
|
-
# Optional. The query statement.
|
900
|
-
#
|
948
|
+
# Optional. The query statement. See [how to construct a
|
949
|
+
# query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
|
950
|
+
# for more information. If not specified or empty, it will search all the
|
951
|
+
# IAM policies within the specified `scope`.
|
901
952
|
#
|
902
953
|
# Examples:
|
903
954
|
#
|
904
|
-
# * `policy
|
905
|
-
#
|
906
|
-
# * `policy
|
907
|
-
#
|
908
|
-
# * `policy.role.permissions
|
909
|
-
#
|
910
|
-
# permission.
|
911
|
-
#
|
912
|
-
#
|
913
|
-
# * `
|
914
|
-
#
|
915
|
-
#
|
916
|
-
#
|
917
|
-
#
|
918
|
-
#
|
919
|
-
#
|
955
|
+
# * `policy:amy@gmail.com` to find IAM policy bindings that specify user
|
956
|
+
# "amy@gmail.com".
|
957
|
+
# * `policy:roles/compute.admin` to find IAM policy bindings that specify
|
958
|
+
# the Compute Admin role.
|
959
|
+
# * `policy.role.permissions:storage.buckets.update` to find IAM policy
|
960
|
+
# bindings that specify a role containing "storage.buckets.update"
|
961
|
+
# permission. Note that if callers don't have `iam.roles.get` access to a
|
962
|
+
# role's included permissions, policy bindings that specify this role will
|
963
|
+
# be dropped from the search results.
|
964
|
+
# * `resource:organizations/123456` to find IAM policy bindings
|
965
|
+
# that are set on "organizations/123456".
|
966
|
+
# * `Important` to find IAM policy bindings that contain "Important" as a
|
967
|
+
# word in any of the searchable fields (except for the included
|
968
|
+
# permissions).
|
969
|
+
# * `*por*` to find IAM policy bindings that contain "por" as a substring
|
970
|
+
# in any of the searchable fields (except for the included permissions).
|
971
|
+
# * `resource:(instance1 OR instance2) policy:amy` to find
|
972
|
+
# IAM policy bindings that are set on resources "instance1" or
|
973
|
+
# "instance2" and also specify user "amy".
|
920
974
|
# @param page_size [::Integer]
|
921
|
-
# Optional. The page size for search result pagination. Page size is capped
|
922
|
-
#
|
923
|
-
#
|
924
|
-
#
|
925
|
-
# returned.
|
975
|
+
# Optional. The page size for search result pagination. Page size is capped at 500 even
|
976
|
+
# if a larger value is given. If set to zero, server will pick an appropriate
|
977
|
+
# default. Returned results may be fewer than requested. When this happens,
|
978
|
+
# there could be more results as long as `next_page_token` is returned.
|
926
979
|
# @param page_token [::String]
|
927
|
-
# Optional. If present, retrieve the next batch of results from the preceding
|
928
|
-
#
|
929
|
-
#
|
930
|
-
#
|
980
|
+
# Optional. If present, retrieve the next batch of results from the preceding call to
|
981
|
+
# this method. `page_token` must be the value of `next_page_token` from the
|
982
|
+
# previous response. The values of all other method parameters must be
|
983
|
+
# identical to those in the previous call.
|
931
984
|
#
|
932
985
|
# @yield [response, operation] Access the result along with the RPC operation
|
933
986
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>]
|
@@ -1060,7 +1113,7 @@ module Google
|
|
1060
1113
|
|
1061
1114
|
config_attr :endpoint, "cloudasset.googleapis.com", ::String
|
1062
1115
|
config_attr :credentials, nil do |value|
|
1063
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1116
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1064
1117
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1065
1118
|
allowed.any? { |klass| klass === value }
|
1066
1119
|
end
|
@@ -475,7 +475,7 @@ module Google
|
|
475
475
|
|
476
476
|
config_attr :endpoint, "cloudasset.googleapis.com", ::String
|
477
477
|
config_attr :credentials, nil do |value|
|
478
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
478
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
479
479
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
480
480
|
allowed.any? { |klass| klass === value }
|
481
481
|
end
|
@@ -26,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
26
26
|
add_message "google.cloud.asset.v1.ExportAssetsResponse" do
|
27
27
|
optional :read_time, :message, 1, "google.protobuf.Timestamp"
|
28
28
|
optional :output_config, :message, 2, "google.cloud.asset.v1.OutputConfig"
|
29
|
+
optional :output_result, :message, 3, "google.cloud.asset.v1.OutputResult"
|
29
30
|
end
|
30
31
|
add_message "google.cloud.asset.v1.BatchGetAssetsHistoryRequest" do
|
31
32
|
optional :parent, :string, 1
|
@@ -63,6 +64,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
63
64
|
optional :bigquery_destination, :message, 2, "google.cloud.asset.v1.BigQueryDestination"
|
64
65
|
end
|
65
66
|
end
|
67
|
+
add_message "google.cloud.asset.v1.OutputResult" do
|
68
|
+
oneof :result do
|
69
|
+
optional :gcs_result, :message, 1, "google.cloud.asset.v1.GcsOutputResult"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
add_message "google.cloud.asset.v1.GcsOutputResult" do
|
73
|
+
repeated :uris, :string, 1
|
74
|
+
end
|
66
75
|
add_message "google.cloud.asset.v1.GcsDestination" do
|
67
76
|
oneof :object_uri do
|
68
77
|
optional :uri, :string, 1
|
@@ -137,6 +146,8 @@ module Google
|
|
137
146
|
UpdateFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.UpdateFeedRequest").msgclass
|
138
147
|
DeleteFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.DeleteFeedRequest").msgclass
|
139
148
|
OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.OutputConfig").msgclass
|
149
|
+
OutputResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.OutputResult").msgclass
|
150
|
+
GcsOutputResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsOutputResult").msgclass
|
140
151
|
GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsDestination").msgclass
|
141
152
|
BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BigQueryDestination").msgclass
|
142
153
|
PubsubDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PubsubDestination").msgclass
|
@@ -36,15 +36,14 @@ module Google
|
|
36
36
|
# Exports assets with time and resource types to a given Cloud Storage
|
37
37
|
# location/BigQuery table. For Cloud Storage location destinations, the
|
38
38
|
# output format is newline-delimited JSON. Each line represents a
|
39
|
-
# [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
|
47
|
-
rpc :ExportAssets, ExportAssetsRequest, Google::Longrunning::Operation
|
39
|
+
# [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON format; for BigQuery table
|
40
|
+
# destinations, the output table stores the fields in asset proto as columns.
|
41
|
+
# This API implements the [google.longrunning.Operation][google.longrunning.Operation] API
|
42
|
+
# , which allows you to keep track of the export. We recommend intervals of
|
43
|
+
# at least 2 seconds with exponential retry to poll the export operation
|
44
|
+
# result. For regular-size resource parent, the export operation usually
|
45
|
+
# finishes within 5 minutes.
|
46
|
+
rpc :ExportAssets, Google::Cloud::Asset::V1::ExportAssetsRequest, Google::Longrunning::Operation
|
48
47
|
# Batch gets the update history of assets that overlap a time window.
|
49
48
|
# For IAM_POLICY content, this API outputs history when the asset and its
|
50
49
|
# attached IAM POLICY both exist. This can create gaps in the output history.
|
@@ -52,28 +51,28 @@ module Google
|
|
52
51
|
# deleted status.
|
53
52
|
# If a specified asset does not exist, this API returns an INVALID_ARGUMENT
|
54
53
|
# error.
|
55
|
-
rpc :BatchGetAssetsHistory, BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse
|
54
|
+
rpc :BatchGetAssetsHistory, Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse
|
56
55
|
# Creates a feed in a parent project/folder/organization to listen to its
|
57
56
|
# asset updates.
|
58
|
-
rpc :CreateFeed, CreateFeedRequest, Feed
|
57
|
+
rpc :CreateFeed, Google::Cloud::Asset::V1::CreateFeedRequest, Google::Cloud::Asset::V1::Feed
|
59
58
|
# Gets details about an asset feed.
|
60
|
-
rpc :GetFeed, GetFeedRequest, Feed
|
59
|
+
rpc :GetFeed, Google::Cloud::Asset::V1::GetFeedRequest, Google::Cloud::Asset::V1::Feed
|
61
60
|
# Lists all asset feeds in a parent project/folder/organization.
|
62
|
-
rpc :ListFeeds, ListFeedsRequest, ListFeedsResponse
|
61
|
+
rpc :ListFeeds, Google::Cloud::Asset::V1::ListFeedsRequest, Google::Cloud::Asset::V1::ListFeedsResponse
|
63
62
|
# Updates an asset feed configuration.
|
64
|
-
rpc :UpdateFeed, UpdateFeedRequest, Feed
|
63
|
+
rpc :UpdateFeed, Google::Cloud::Asset::V1::UpdateFeedRequest, Google::Cloud::Asset::V1::Feed
|
65
64
|
# Deletes an asset feed.
|
66
|
-
rpc :DeleteFeed, DeleteFeedRequest, Google::Protobuf::Empty
|
67
|
-
# Searches all
|
68
|
-
#
|
69
|
-
#
|
65
|
+
rpc :DeleteFeed, Google::Cloud::Asset::V1::DeleteFeedRequest, Google::Protobuf::Empty
|
66
|
+
# Searches all Cloud resources within the specified scope, such as a project,
|
67
|
+
# folder, or organization. The caller must be granted the
|
68
|
+
# `cloudasset.assets.searchAllResources` permission on the desired scope,
|
70
69
|
# otherwise the request will be rejected.
|
71
|
-
rpc :SearchAllResources, SearchAllResourcesRequest, SearchAllResourcesResponse
|
72
|
-
# Searches all
|
73
|
-
#
|
74
|
-
#
|
70
|
+
rpc :SearchAllResources, Google::Cloud::Asset::V1::SearchAllResourcesRequest, Google::Cloud::Asset::V1::SearchAllResourcesResponse
|
71
|
+
# Searches all IAM policies within the specified scope, such as a project,
|
72
|
+
# folder, or organization. The caller must be granted the
|
73
|
+
# `cloudasset.assets.searchAllIamPolicies` permission on the desired scope,
|
75
74
|
# otherwise the request will be rejected.
|
76
|
-
rpc :SearchAllIamPolicies, SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse
|
75
|
+
rpc :SearchAllIamPolicies, Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse
|
77
76
|
end
|
78
77
|
|
79
78
|
Stub = Service.rpc_stub_class
|
@@ -3,7 +3,6 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
-
require 'google/api/annotations_pb'
|
7
6
|
require 'google/api/resource_pb'
|
8
7
|
require 'google/cloud/orgpolicy/v1/orgpolicy_pb'
|
9
8
|
require 'google/iam/v1/policy_pb'
|
@@ -14,6 +13,7 @@ require 'google/protobuf/any_pb'
|
|
14
13
|
require 'google/protobuf/struct_pb'
|
15
14
|
require 'google/protobuf/timestamp_pb'
|
16
15
|
require 'google/rpc/code_pb'
|
16
|
+
require 'google/api/annotations_pb'
|
17
17
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
18
18
|
add_file("google/cloud/asset/v1/assets.proto", :syntax => :proto3) do
|
19
19
|
add_message "google.cloud.asset.v1.TemporalAsset" do
|
@@ -37,9 +37,22 @@ module Google
|
|
37
37
|
# running the same query may get different results.
|
38
38
|
# @!attribute [rw] asset_types
|
39
39
|
# @return [::Array<::String>]
|
40
|
-
# A list of asset types
|
41
|
-
# "compute.googleapis.com/Disk".
|
42
|
-
#
|
40
|
+
# A list of asset types to take a snapshot for. For example:
|
41
|
+
# "compute.googleapis.com/Disk".
|
42
|
+
#
|
43
|
+
# Regular expressions are also supported. For example:
|
44
|
+
#
|
45
|
+
# * "compute.googleapis.com.*" snapshots resources whose asset type starts
|
46
|
+
# with "compute.googleapis.com".
|
47
|
+
# * ".*Instance" snapshots resources whose asset type ends with "Instance".
|
48
|
+
# * ".*Instance.*" snapshots resources whose asset type contains "Instance".
|
49
|
+
#
|
50
|
+
# See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
|
51
|
+
# regular expression syntax. If the regular expression does not match any
|
52
|
+
# supported asset type, an INVALID_ARGUMENT error will be returned.
|
53
|
+
#
|
54
|
+
# If specified, only matching assets will be returned, otherwise, it will
|
55
|
+
# snapshot all asset types. See [Introduction to Cloud Asset
|
43
56
|
# Inventory](https://cloud.google.com/asset-inventory/docs/overview)
|
44
57
|
# for all supported asset types.
|
45
58
|
# @!attribute [rw] content_type
|
@@ -48,24 +61,28 @@ module Google
|
|
48
61
|
# returned.
|
49
62
|
# @!attribute [rw] output_config
|
50
63
|
# @return [::Google::Cloud::Asset::V1::OutputConfig]
|
51
|
-
# Required. Output configuration indicating where the results will be output
|
52
|
-
# to.
|
64
|
+
# Required. Output configuration indicating where the results will be output to.
|
53
65
|
class ExportAssetsRequest
|
54
66
|
include ::Google::Protobuf::MessageExts
|
55
67
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
56
68
|
end
|
57
69
|
|
58
70
|
# The export asset response. This message is returned by the
|
59
|
-
# google.longrunning.Operations.GetOperation
|
60
|
-
#
|
61
|
-
# {::Google::Longrunning::Operation#response google.longrunning.Operation.response}
|
62
|
-
# field.
|
71
|
+
# google.longrunning.Operations.GetOperation method in the returned
|
72
|
+
# {::Google::Longrunning::Operation#response google.longrunning.Operation.response} field.
|
63
73
|
# @!attribute [rw] read_time
|
64
74
|
# @return [::Google::Protobuf::Timestamp]
|
65
75
|
# Time the snapshot was taken.
|
66
76
|
# @!attribute [rw] output_config
|
67
77
|
# @return [::Google::Cloud::Asset::V1::OutputConfig]
|
68
78
|
# Output configuration indicating where the results were output to.
|
79
|
+
# @!attribute [rw] output_result
|
80
|
+
# @return [::Google::Cloud::Asset::V1::OutputResult]
|
81
|
+
# Output result indicating where the assets were exported to. For example, a
|
82
|
+
# set of actual Google Cloud Storage object uris where the assets are
|
83
|
+
# exported to. The uris can be different from what [output_config] has
|
84
|
+
# specified, as the service will split the output object into multiple ones
|
85
|
+
# once it exceeds a single Google Cloud Storage object limit.
|
69
86
|
class ExportAssetsResponse
|
70
87
|
include ::Google::Protobuf::MessageExts
|
71
88
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -126,8 +143,9 @@ module Google
|
|
126
143
|
# be unique under a specific parent project/folder/organization.
|
127
144
|
# @!attribute [rw] feed
|
128
145
|
# @return [::Google::Cloud::Asset::V1::Feed]
|
129
|
-
# Required. The feed details. The field `name` must be empty and it will be
|
130
|
-
#
|
146
|
+
# Required. The feed details. The field `name` must be empty and it will be generated
|
147
|
+
# in the format of:
|
148
|
+
# projects/project_number/feeds/feed_id
|
131
149
|
# folders/folder_number/feeds/feed_id
|
132
150
|
# organizations/organization_number/feeds/feed_id
|
133
151
|
class CreateFeedRequest
|
@@ -169,8 +187,8 @@ module Google
|
|
169
187
|
# Update asset feed request.
|
170
188
|
# @!attribute [rw] feed
|
171
189
|
# @return [::Google::Cloud::Asset::V1::Feed]
|
172
|
-
# Required. The new values of feed details. It must match an existing feed
|
173
|
-
#
|
190
|
+
# Required. The new values of feed details. It must match an existing feed and the
|
191
|
+
# field `name` must be in the format of:
|
174
192
|
# projects/project_number/feeds/feed_id or
|
175
193
|
# folders/folder_number/feeds/feed_id or
|
176
194
|
# organizations/organization_number/feeds/feed_id.
|
@@ -208,6 +226,25 @@ module Google
|
|
208
226
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
209
227
|
end
|
210
228
|
|
229
|
+
# Output result of export assets.
|
230
|
+
# @!attribute [rw] gcs_result
|
231
|
+
# @return [::Google::Cloud::Asset::V1::GcsOutputResult]
|
232
|
+
# Export result on Cloud Storage.
|
233
|
+
class OutputResult
|
234
|
+
include ::Google::Protobuf::MessageExts
|
235
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
236
|
+
end
|
237
|
+
|
238
|
+
# A Cloud Storage output result.
|
239
|
+
# @!attribute [rw] uris
|
240
|
+
# @return [::Array<::String>]
|
241
|
+
# List of uris of the Cloud Storage objects. Example:
|
242
|
+
# "gs://bucket_name/object_name".
|
243
|
+
class GcsOutputResult
|
244
|
+
include ::Google::Protobuf::MessageExts
|
245
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
246
|
+
end
|
247
|
+
|
211
248
|
# A Cloud Storage location.
|
212
249
|
# @!attribute [rw] uri
|
213
250
|
# @return [::String]
|
@@ -324,8 +361,12 @@ module Google
|
|
324
361
|
# When set, `expression` field in the `Expr` must be a valid [CEL expression]
|
325
362
|
# (https://github.com/google/cel-spec) on a TemporalAsset with name
|
326
363
|
# `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
|
327
|
-
# == true") will only publish Asset deletions. Other fields
|
364
|
+
# == true") will only publish Asset deletions. Other fields of `Expr` are
|
328
365
|
# optional.
|
366
|
+
#
|
367
|
+
# See our [user
|
368
|
+
# guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes#feed_with_condition)
|
369
|
+
# for detailed instructions.
|
329
370
|
class Feed
|
330
371
|
include ::Google::Protobuf::MessageExts
|
331
372
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -334,75 +375,81 @@ module Google
|
|
334
375
|
# Search all resources request.
|
335
376
|
# @!attribute [rw] scope
|
336
377
|
# @return [::String]
|
337
|
-
# Required. A scope can be a project, a folder or an organization. The search
|
338
|
-
#
|
378
|
+
# Required. A scope can be a project, a folder, or an organization. The search is
|
379
|
+
# limited to the resources within the `scope`. The caller must be granted the
|
380
|
+
# [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
|
381
|
+
# permission on the desired scope.
|
339
382
|
#
|
340
383
|
# The allowed values are:
|
341
384
|
#
|
342
|
-
# * projects/\\{PROJECT_ID}
|
343
|
-
# * projects/\\{PROJECT_NUMBER}
|
344
|
-
# * folders/\\{FOLDER_NUMBER}
|
345
|
-
# * organizations/\\{ORGANIZATION_NUMBER}
|
385
|
+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
|
386
|
+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
|
387
|
+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
|
388
|
+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
|
346
389
|
# @!attribute [rw] query
|
347
390
|
# @return [::String]
|
348
|
-
# Optional. The query statement.
|
349
|
-
#
|
391
|
+
# Optional. The query statement. See [how to construct a
|
392
|
+
# query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
|
393
|
+
# for more information. If not specified or empty, it will search all the
|
394
|
+
# resources within the specified `scope`. Note that the query string is
|
395
|
+
# compared against each Cloud IAM policy binding, including its members,
|
396
|
+
# roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
|
397
|
+
# contain the bindings that match your query. To learn more about the IAM
|
398
|
+
# policy structure, see [IAM policy
|
399
|
+
# doc](https://cloud.google.com/iam/docs/policies#structure).
|
350
400
|
#
|
351
401
|
# Examples:
|
352
402
|
#
|
353
|
-
# * `name
|
403
|
+
# * `name:Important` to find Cloud resources whose name contains
|
354
404
|
# "Important" as a word.
|
355
|
-
# * `displayName
|
356
|
-
# contains "Impor" as a
|
357
|
-
# * `description
|
405
|
+
# * `displayName:Impor*` to find Cloud resources whose display name
|
406
|
+
# contains "Impor" as a prefix.
|
407
|
+
# * `description:*por*` to find Cloud resources whose description
|
358
408
|
# contains "por" as a substring.
|
359
|
-
# * `location
|
409
|
+
# * `location:us-west*` to find Cloud resources whose location is
|
360
410
|
# prefixed with "us-west".
|
361
|
-
# * `labels
|
411
|
+
# * `labels:prod` to find Cloud resources whose labels contain "prod" as
|
362
412
|
# a key or value.
|
363
|
-
# * `labels.env
|
413
|
+
# * `labels.env:prod` to find Cloud resources that have a label "env"
|
364
414
|
# and its value is "prod".
|
365
|
-
# * `labels.env
|
366
|
-
# * `
|
415
|
+
# * `labels.env:*` to find Cloud resources that have a label "env".
|
416
|
+
# * `Important` to find Cloud resources that contain "Important" as a word
|
367
417
|
# in any of the searchable fields.
|
368
|
-
# * `
|
418
|
+
# * `Impor*` to find Cloud resources that contain "Impor" as a prefix
|
369
419
|
# in any of the searchable fields.
|
370
|
-
# *
|
420
|
+
# * `*por*` to find Cloud resources that contain "por" as a substring in
|
371
421
|
# any of the searchable fields.
|
372
|
-
# * `
|
373
|
-
# resources
|
422
|
+
# * `Important location:(us-west1 OR global)` to find Cloud
|
423
|
+
# resources that contain "Important" as a word in any of the searchable
|
374
424
|
# fields and are also located in the "us-west1" region or the "global"
|
375
425
|
# location.
|
376
|
-
#
|
377
|
-
# See [how to construct a
|
378
|
-
# query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
|
379
|
-
# for more details.
|
380
426
|
# @!attribute [rw] asset_types
|
381
427
|
# @return [::Array<::String>]
|
382
|
-
# Optional. A list of asset types that this request searches for. If empty,
|
383
|
-
#
|
428
|
+
# Optional. A list of asset types that this request searches for. If empty, it will
|
429
|
+
# search all the [searchable asset
|
384
430
|
# types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
|
385
431
|
# @!attribute [rw] page_size
|
386
432
|
# @return [::Integer]
|
387
|
-
# Optional. The page size for search result pagination. Page size is capped
|
388
|
-
#
|
389
|
-
#
|
390
|
-
#
|
391
|
-
# returned.
|
433
|
+
# Optional. The page size for search result pagination. Page size is capped at 500 even
|
434
|
+
# if a larger value is given. If set to zero, server will pick an appropriate
|
435
|
+
# default. Returned results may be fewer than requested. When this happens,
|
436
|
+
# there could be more results as long as `next_page_token` is returned.
|
392
437
|
# @!attribute [rw] page_token
|
393
438
|
# @return [::String]
|
394
|
-
# Optional. If present, then retrieve the next batch of results from the
|
395
|
-
#
|
396
|
-
#
|
397
|
-
#
|
439
|
+
# Optional. If present, then retrieve the next batch of results from the preceding call
|
440
|
+
# to this method. `page_token` must be the value of `next_page_token` from
|
441
|
+
# the previous response. The values of all other method parameters, must be
|
442
|
+
# identical to those in the previous call.
|
398
443
|
# @!attribute [rw] order_by
|
399
444
|
# @return [::String]
|
400
|
-
# Optional. A comma separated list of fields specifying the sorting order of
|
401
|
-
#
|
402
|
-
#
|
403
|
-
# Example: "location DESC, name".
|
404
|
-
#
|
405
|
-
#
|
445
|
+
# Optional. A comma separated list of fields specifying the sorting order of the
|
446
|
+
# results. The default order is ascending. Add " DESC" after the field name
|
447
|
+
# to indicate descending order. Redundant space characters are ignored.
|
448
|
+
# Example: "location DESC, name". Only string fields in the response are
|
449
|
+
# sortable, including `name`, `displayName`, `description`, `location`. All
|
450
|
+
# the other fields such as repeated fields (e.g., `networkTags`), map
|
451
|
+
# fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
|
452
|
+
# are not supported.
|
406
453
|
class SearchAllResourcesRequest
|
407
454
|
include ::Google::Protobuf::MessageExts
|
408
455
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -426,51 +473,58 @@ module Google
|
|
426
473
|
# Search all IAM policies request.
|
427
474
|
# @!attribute [rw] scope
|
428
475
|
# @return [::String]
|
429
|
-
# Required. A scope can be a project, a folder or an organization. The search
|
430
|
-
#
|
476
|
+
# Required. A scope can be a project, a folder, or an organization. The search is
|
477
|
+
# limited to the IAM policies within the `scope`. The caller must be granted
|
478
|
+
# the
|
479
|
+
# [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
|
480
|
+
# permission on the desired scope.
|
431
481
|
#
|
432
482
|
# The allowed values are:
|
433
483
|
#
|
434
|
-
# * projects/\\{PROJECT_ID}
|
435
|
-
# * projects/\\{PROJECT_NUMBER}
|
436
|
-
# * folders/\\{FOLDER_NUMBER}
|
437
|
-
# * organizations/\\{ORGANIZATION_NUMBER}
|
484
|
+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
|
485
|
+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
|
486
|
+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
|
487
|
+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
|
438
488
|
# @!attribute [rw] query
|
439
489
|
# @return [::String]
|
440
|
-
# Optional. The query statement.
|
441
|
-
#
|
490
|
+
# Optional. The query statement. See [how to construct a
|
491
|
+
# query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
|
492
|
+
# for more information. If not specified or empty, it will search all the
|
493
|
+
# IAM policies within the specified `scope`.
|
442
494
|
#
|
443
495
|
# Examples:
|
444
496
|
#
|
445
|
-
# * `policy
|
446
|
-
#
|
447
|
-
# * `policy
|
448
|
-
#
|
449
|
-
# * `policy.role.permissions
|
450
|
-
#
|
451
|
-
# permission.
|
452
|
-
#
|
453
|
-
#
|
454
|
-
# * `
|
455
|
-
#
|
456
|
-
#
|
457
|
-
#
|
458
|
-
#
|
459
|
-
#
|
460
|
-
#
|
497
|
+
# * `policy:amy@gmail.com` to find IAM policy bindings that specify user
|
498
|
+
# "amy@gmail.com".
|
499
|
+
# * `policy:roles/compute.admin` to find IAM policy bindings that specify
|
500
|
+
# the Compute Admin role.
|
501
|
+
# * `policy.role.permissions:storage.buckets.update` to find IAM policy
|
502
|
+
# bindings that specify a role containing "storage.buckets.update"
|
503
|
+
# permission. Note that if callers don't have `iam.roles.get` access to a
|
504
|
+
# role's included permissions, policy bindings that specify this role will
|
505
|
+
# be dropped from the search results.
|
506
|
+
# * `resource:organizations/123456` to find IAM policy bindings
|
507
|
+
# that are set on "organizations/123456".
|
508
|
+
# * `Important` to find IAM policy bindings that contain "Important" as a
|
509
|
+
# word in any of the searchable fields (except for the included
|
510
|
+
# permissions).
|
511
|
+
# * `*por*` to find IAM policy bindings that contain "por" as a substring
|
512
|
+
# in any of the searchable fields (except for the included permissions).
|
513
|
+
# * `resource:(instance1 OR instance2) policy:amy` to find
|
514
|
+
# IAM policy bindings that are set on resources "instance1" or
|
515
|
+
# "instance2" and also specify user "amy".
|
461
516
|
# @!attribute [rw] page_size
|
462
517
|
# @return [::Integer]
|
463
|
-
# Optional. The page size for search result pagination. Page size is capped
|
464
|
-
#
|
465
|
-
#
|
466
|
-
#
|
467
|
-
# returned.
|
518
|
+
# Optional. The page size for search result pagination. Page size is capped at 500 even
|
519
|
+
# if a larger value is given. If set to zero, server will pick an appropriate
|
520
|
+
# default. Returned results may be fewer than requested. When this happens,
|
521
|
+
# there could be more results as long as `next_page_token` is returned.
|
468
522
|
# @!attribute [rw] page_token
|
469
523
|
# @return [::String]
|
470
|
-
# Optional. If present, retrieve the next batch of results from the preceding
|
471
|
-
#
|
472
|
-
#
|
473
|
-
#
|
524
|
+
# Optional. If present, retrieve the next batch of results from the preceding call to
|
525
|
+
# this method. `page_token` must be the value of `next_page_token` from the
|
526
|
+
# previous response. The values of all other method parameters must be
|
527
|
+
# identical to those in the previous call.
|
474
528
|
class SearchAllIamPoliciesRequest
|
475
529
|
include ::Google::Protobuf::MessageExts
|
476
530
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -505,7 +559,7 @@ module Google
|
|
505
559
|
# The Cloud Organization Policy set on an asset.
|
506
560
|
ORG_POLICY = 4
|
507
561
|
|
508
|
-
# The Cloud Access context
|
562
|
+
# The Cloud Access context manager Policy set on an asset.
|
509
563
|
ACCESS_POLICY = 5
|
510
564
|
end
|
511
565
|
end
|
@@ -202,7 +202,7 @@ module Google
|
|
202
202
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
203
203
|
end
|
204
204
|
|
205
|
-
# A result of Resource Search, containing information of a cloud
|
205
|
+
# A result of Resource Search, containing information of a cloud resource.
|
206
206
|
# @!attribute [rw] name
|
207
207
|
# @return [::String]
|
208
208
|
# The full resource name of this resource. Example:
|
@@ -213,8 +213,8 @@ module Google
|
|
213
213
|
#
|
214
214
|
# To search against the `name`:
|
215
215
|
#
|
216
|
-
# * use a field query. Example: `name
|
217
|
-
# * use a free text query. Example: `
|
216
|
+
# * use a field query. Example: `name:instance1`
|
217
|
+
# * use a free text query. Example: `instance1`
|
218
218
|
# @!attribute [rw] asset_type
|
219
219
|
# @return [::String]
|
220
220
|
# The type of this resource. Example: `compute.googleapis.com/Disk`.
|
@@ -236,7 +236,7 @@ module Google
|
|
236
236
|
#
|
237
237
|
# To search against the `display_name`:
|
238
238
|
#
|
239
|
-
# * use a field query. Example: `displayName
|
239
|
+
# * use a field query. Example: `displayName:"My Instance"`
|
240
240
|
# * use a free text query. Example: `"My Instance"`
|
241
241
|
# @!attribute [rw] description
|
242
242
|
# @return [::String]
|
@@ -245,7 +245,7 @@ module Google
|
|
245
245
|
#
|
246
246
|
# To search against the `description`:
|
247
247
|
#
|
248
|
-
# * use a field query. Example: `description
|
248
|
+
# * use a field query. Example: `description:"*important instance*"`
|
249
249
|
# * use a free text query. Example: `"*important instance*"`
|
250
250
|
# @!attribute [rw] location
|
251
251
|
# @return [::String]
|
@@ -254,8 +254,8 @@ module Google
|
|
254
254
|
#
|
255
255
|
# To search against the `location`:
|
256
256
|
#
|
257
|
-
# * use a field query. Example: `location
|
258
|
-
# * use a free text query. Example: `
|
257
|
+
# * use a field query. Example: `location:us-west*`
|
258
|
+
# * use a free text query. Example: `us-west*`
|
259
259
|
# @!attribute [rw] labels
|
260
260
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
261
261
|
# Labels associated with this resource. See [Labelling and grouping GCP
|
@@ -264,11 +264,11 @@ module Google
|
|
264
264
|
#
|
265
265
|
# To search against the `labels`:
|
266
266
|
#
|
267
|
-
# * use a field query
|
268
|
-
# - query on any label's key or value. Example: `labels
|
269
|
-
# - query by a given label. Example: `labels.env
|
270
|
-
# - query by a given label'
|
271
|
-
# * use a free text query. Example: `
|
267
|
+
# * use a field query:
|
268
|
+
# - query on any label's key or value. Example: `labels:prod`
|
269
|
+
# - query by a given label. Example: `labels.env:prod`
|
270
|
+
# - query by a given label's existence. Example: `labels.env:*`
|
271
|
+
# * use a free text query. Example: `prod`
|
272
272
|
# @!attribute [rw] network_tags
|
273
273
|
# @return [::Array<::String>]
|
274
274
|
# Network tags associated with this resource. Like labels, network tags are a
|
@@ -278,19 +278,29 @@ module Google
|
|
278
278
|
#
|
279
279
|
# To search against the `network_tags`:
|
280
280
|
#
|
281
|
-
# * use a field query. Example: `networkTags
|
282
|
-
# * use a free text query. Example: `
|
281
|
+
# * use a field query. Example: `networkTags:internal`
|
282
|
+
# * use a free text query. Example: `internal`
|
283
283
|
# @!attribute [rw] additional_attributes
|
284
284
|
# @return [::Google::Protobuf::Struct]
|
285
|
-
# The additional attributes of this resource. The attributes may
|
286
|
-
# one resource type to another. Examples: `projectId` for Project,
|
287
|
-
# `dnsName` for DNS ManagedZone.
|
285
|
+
# The additional searchable attributes of this resource. The attributes may
|
286
|
+
# vary from one resource type to another. Examples: `projectId` for Project,
|
287
|
+
# `dnsName` for DNS ManagedZone. This field contains a subset of the resource
|
288
|
+
# metadata fields that are returned by the List or Get APIs provided by the
|
289
|
+
# corresponding GCP service (e.g., Compute Engine). see [API references and
|
290
|
+
# supported searchable
|
291
|
+
# attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
|
292
|
+
# for more information.
|
293
|
+
#
|
294
|
+
# You can search values of these fields through free text search. However,
|
295
|
+
# you should not consume the field programically as the field names and
|
296
|
+
# values may change as the GCP service updates to a new incompatible API
|
297
|
+
# version.
|
288
298
|
#
|
289
299
|
# To search against the `additional_attributes`:
|
290
300
|
#
|
291
301
|
# * use a free text query to match the attributes values. Example: to search
|
292
302
|
# `additional_attributes = { dnsName: "foobar" }`, you can issue a query
|
293
|
-
# `
|
303
|
+
# `foobar`.
|
294
304
|
class ResourceSearchResult
|
295
305
|
include ::Google::Protobuf::MessageExts
|
296
306
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -317,7 +327,7 @@ module Google
|
|
317
327
|
#
|
318
328
|
# To search against the `resource`:
|
319
329
|
#
|
320
|
-
# * use a field query. Example: `resource
|
330
|
+
# * use a field query. Example: `resource:organizations/123`
|
321
331
|
# @!attribute [rw] project
|
322
332
|
# @return [::String]
|
323
333
|
# The project that the associated GCP resource belongs to, in the form of
|
@@ -338,13 +348,13 @@ module Google
|
|
338
348
|
#
|
339
349
|
# To search against the `policy` bindings:
|
340
350
|
#
|
341
|
-
# * use a field query
|
351
|
+
# * use a field query:
|
342
352
|
# - query by the policy contained members. Example:
|
343
|
-
# `policy
|
353
|
+
# `policy:amy@gmail.com`
|
344
354
|
# - query by the policy contained roles. Example:
|
345
|
-
# `policy
|
346
|
-
# - query by the policy contained roles'
|
347
|
-
# `policy.role.permissions
|
355
|
+
# `policy:roles/compute.admin`
|
356
|
+
# - query by the policy contained roles' included permissions. Example:
|
357
|
+
# `policy.role.permissions:compute.instances.create`
|
348
358
|
# @!attribute [rw] explanation
|
349
359
|
# @return [::Google::Cloud::Asset::V1::IamPolicySearchResult::Explanation]
|
350
360
|
# Explanation about the IAM policy search result. It contains additional
|
@@ -358,7 +368,7 @@ module Google
|
|
358
368
|
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Asset::V1::IamPolicySearchResult::Explanation::Permissions}]
|
359
369
|
# The map from roles to their included permissions that match the
|
360
370
|
# permission query (i.e., a query containing `policy.role.permissions:`).
|
361
|
-
# Example: if query `policy.role.permissions
|
371
|
+
# Example: if query `policy.role.permissions:compute.disk.get`
|
362
372
|
# matches a policy binding that contains owner role, the
|
363
373
|
# matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
|
364
374
|
# roles can also be found in the returned `policy` bindings. Note that the
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-asset-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: google-cloud-errors
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|