google-cloud-asset-v1 0.19.0 → 0.21.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 +5 -5
- data/lib/google/cloud/asset/v1/asset_service/client.rb +179 -2
- data/lib/google/cloud/asset/v1/asset_service/operations.rb +3 -0
- data/lib/google/cloud/asset/v1/asset_service_pb.rb +55 -0
- data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +15 -0
- data/lib/google/cloud/asset/v1/version.rb +1 -1
- data/proto_docs/google/cloud/asset/v1/asset_service.rb +210 -2
- data/proto_docs/google/cloud/asset/v1/assets.rb +3 -2
- data/proto_docs/google/protobuf/empty.rb +0 -2
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3707e5c254ca43502c0169aaf0948734bc5d801fdb0754abbec34f17787cb5c3
|
4
|
+
data.tar.gz: 7e404e7cbcdb10c94c7f62321eaf88fcee4745fbbc330a345861d94126e76241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f486ec177ea1c1557db69e775bb0ba8cca6f0a0e01a5ceba28b9920fd362a6c040c4c741ec08bd41ddfef3e2cac7e99a61e40d0efffaec531eb0225bf0237557
|
7
|
+
data.tar.gz: c6c6c1144eec85735c6345698175eb499677dea87549207d55c5075202067853b6f60b4031950f3911b17f1e9a98ec791c9d35c8f8bafd9160d8822c940b56a7
|
data/README.md
CHANGED
@@ -76,14 +76,14 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
|
|
76
76
|
|
77
77
|
## Supported Ruby Versions
|
78
78
|
|
79
|
-
This library is supported on Ruby 2.
|
79
|
+
This library is supported on Ruby 2.6+.
|
80
80
|
|
81
81
|
Google provides official support for Ruby versions that are actively supported
|
82
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
83
|
-
in security maintenance, and not end of life.
|
84
|
-
|
85
|
-
|
86
|
-
|
83
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
84
|
+
still work, but are unsupported and not recommended. See
|
85
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
86
|
+
support schedule.
|
87
87
|
|
88
88
|
## Which client should I use?
|
89
89
|
|
@@ -112,6 +112,16 @@ module Google
|
|
112
112
|
|
113
113
|
default_config.rpcs.analyze_iam_policy_longrunning.timeout = 60.0
|
114
114
|
|
115
|
+
default_config.rpcs.query_assets.timeout = 200.0
|
116
|
+
default_config.rpcs.query_assets.retry_policy = {
|
117
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
118
|
+
}
|
119
|
+
|
120
|
+
default_config.rpcs.batch_get_effective_iam_policies.timeout = 300.0
|
121
|
+
default_config.rpcs.batch_get_effective_iam_policies.retry_policy = {
|
122
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
123
|
+
}
|
124
|
+
|
115
125
|
default_config
|
116
126
|
end
|
117
127
|
yield @configure if block_given?
|
@@ -1145,6 +1155,14 @@ module Google
|
|
1145
1155
|
# * `labels.env:*` to find Cloud resources that have a label "env".
|
1146
1156
|
# * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
|
1147
1157
|
# encryption key whose name contains the word "key".
|
1158
|
+
# * `relationships:instance-group-1` to find Cloud resources that have
|
1159
|
+
# relationships with "instance-group-1" in the related resource name.
|
1160
|
+
# * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
|
1161
|
+
# have relationships of type "INSTANCE_TO_INSTANCEGROUP".
|
1162
|
+
# * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
|
1163
|
+
# compute instances that have relationships with "instance-group-1" in the
|
1164
|
+
# compute instance group resource name, for relationship type
|
1165
|
+
# "INSTANCE_TO_INSTANCEGROUP".
|
1148
1166
|
# * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
|
1149
1167
|
# word.
|
1150
1168
|
# * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
|
@@ -1358,8 +1376,8 @@ module Google
|
|
1358
1376
|
# compared against each Cloud IAM policy binding, including its principals,
|
1359
1377
|
# roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
|
1360
1378
|
# contain the bindings that match your query. To learn more about the IAM
|
1361
|
-
# policy structure, see [IAM policy
|
1362
|
-
#
|
1379
|
+
# policy structure, see the [IAM policy
|
1380
|
+
# documentation](https://cloud.google.com/iam/help/allow-policies/structure).
|
1363
1381
|
#
|
1364
1382
|
# Examples:
|
1365
1383
|
#
|
@@ -1843,6 +1861,158 @@ module Google
|
|
1843
1861
|
raise ::Google::Cloud::Error.from_error(e)
|
1844
1862
|
end
|
1845
1863
|
|
1864
|
+
##
|
1865
|
+
# Issue a job that queries assets using a SQL statement compatible with
|
1866
|
+
# [BigQuery Standard
|
1867
|
+
# SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
|
1868
|
+
#
|
1869
|
+
# If the query execution finishes within timeout and there's no pagination,
|
1870
|
+
# the full query results will be returned in the `QueryAssetsResponse`.
|
1871
|
+
#
|
1872
|
+
# Otherwise, full query results can be obtained by issuing extra requests
|
1873
|
+
# with the `job_reference` from the a previous `QueryAssets` call.
|
1874
|
+
#
|
1875
|
+
# Note, the query result has approximately 10 GB limitation enforced by
|
1876
|
+
# BigQuery
|
1877
|
+
# https://cloud.google.com/bigquery/docs/best-practices-performance-output,
|
1878
|
+
# queries return larger results will result in errors.
|
1879
|
+
#
|
1880
|
+
# @overload query_assets(request, options = nil)
|
1881
|
+
# Pass arguments to `query_assets` via a request object, either of type
|
1882
|
+
# {::Google::Cloud::Asset::V1::QueryAssetsRequest} or an equivalent Hash.
|
1883
|
+
#
|
1884
|
+
# @param request [::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Hash]
|
1885
|
+
# A request object representing the call parameters. Required. To specify no
|
1886
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1887
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1888
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1889
|
+
#
|
1890
|
+
# @overload query_assets(parent: nil, statement: nil, job_reference: nil, page_size: nil, page_token: nil, timeout: nil, read_time_window: nil, read_time: nil, output_config: nil)
|
1891
|
+
# Pass arguments to `query_assets` via keyword arguments. Note that at
|
1892
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1893
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1894
|
+
#
|
1895
|
+
# @param parent [::String]
|
1896
|
+
# Required. The relative name of the root asset. This can only be an
|
1897
|
+
# organization number (such as "organizations/123"), a project ID (such as
|
1898
|
+
# "projects/my-project-id"), or a project number (such as "projects/12345"),
|
1899
|
+
# or a folder number (such as "folders/123").
|
1900
|
+
#
|
1901
|
+
# Only assets belonging to the `parent` will be returned.
|
1902
|
+
# @param statement [::String]
|
1903
|
+
# Optional. A SQL statement that's compatible with [BigQuery Standard
|
1904
|
+
# SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
|
1905
|
+
# @param job_reference [::String]
|
1906
|
+
# Optional. Reference to the query job, which is from the
|
1907
|
+
# `QueryAssetsResponse` of previous `QueryAssets` call.
|
1908
|
+
# @param page_size [::Integer]
|
1909
|
+
# Optional. The maximum number of rows to return in the results. Responses
|
1910
|
+
# are limited to 10 MB and 1000 rows.
|
1911
|
+
#
|
1912
|
+
# By default, the maximum row count is 1000. When the byte or row count limit
|
1913
|
+
# is reached, the rest of the query results will be paginated.
|
1914
|
+
#
|
1915
|
+
# The field will be ignored when [output_config] is specified.
|
1916
|
+
# @param page_token [::String]
|
1917
|
+
# Optional. A page token received from previous `QueryAssets`.
|
1918
|
+
#
|
1919
|
+
# The field will be ignored when [output_config] is specified.
|
1920
|
+
# @param timeout [::Google::Protobuf::Duration, ::Hash]
|
1921
|
+
# Optional. Specifies the maximum amount of time that the client is willing
|
1922
|
+
# to wait for the query to complete. By default, this limit is 5 min for the
|
1923
|
+
# first query, and 1 minute for the following queries. If the query is
|
1924
|
+
# complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
|
1925
|
+
# false.
|
1926
|
+
#
|
1927
|
+
# Like BigQuery [jobs.query
|
1928
|
+
# API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
|
1929
|
+
# The call is not guaranteed to wait for the specified timeout; it typically
|
1930
|
+
# returns after around 200 seconds (200,000 milliseconds), even if the query
|
1931
|
+
# is not complete.
|
1932
|
+
#
|
1933
|
+
# The field will be ignored when [output_config] is specified.
|
1934
|
+
# @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash]
|
1935
|
+
# Optional. [start_time] is required. [start_time] must be less than
|
1936
|
+
# [end_time] Defaults [end_time] to now if [start_time] is set and
|
1937
|
+
# [end_time] isn't. Maximum permitted time range is 7 days.
|
1938
|
+
# @param read_time [::Google::Protobuf::Timestamp, ::Hash]
|
1939
|
+
# Optional. Queries cloud assets as they appeared at the specified point in
|
1940
|
+
# time.
|
1941
|
+
# @param output_config [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig, ::Hash]
|
1942
|
+
# Optional. Destination where the query results will be saved.
|
1943
|
+
#
|
1944
|
+
# When this field is specified, the query results won't be saved in the
|
1945
|
+
# [QueryAssetsResponse.query_result]. Instead
|
1946
|
+
# [QueryAssetsResponse.output_config] will be set.
|
1947
|
+
#
|
1948
|
+
# Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
|
1949
|
+
# to check the status of the query job when passed to a following
|
1950
|
+
# [QueryAssets] API call.
|
1951
|
+
#
|
1952
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1953
|
+
# @yieldparam response [::Google::Cloud::Asset::V1::QueryAssetsResponse]
|
1954
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1955
|
+
#
|
1956
|
+
# @return [::Google::Cloud::Asset::V1::QueryAssetsResponse]
|
1957
|
+
#
|
1958
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1959
|
+
#
|
1960
|
+
# @example Basic example
|
1961
|
+
# require "google/cloud/asset/v1"
|
1962
|
+
#
|
1963
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1964
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
1965
|
+
#
|
1966
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1967
|
+
# request = Google::Cloud::Asset::V1::QueryAssetsRequest.new
|
1968
|
+
#
|
1969
|
+
# # Call the query_assets method.
|
1970
|
+
# result = client.query_assets request
|
1971
|
+
#
|
1972
|
+
# # The returned object is of type Google::Cloud::Asset::V1::QueryAssetsResponse.
|
1973
|
+
# p result
|
1974
|
+
#
|
1975
|
+
def query_assets request, options = nil
|
1976
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1977
|
+
|
1978
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::QueryAssetsRequest
|
1979
|
+
|
1980
|
+
# Converts hash and nil to an options object
|
1981
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1982
|
+
|
1983
|
+
# Customize the options with defaults
|
1984
|
+
metadata = @config.rpcs.query_assets.metadata.to_h
|
1985
|
+
|
1986
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1987
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1988
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1989
|
+
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
1990
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1991
|
+
|
1992
|
+
header_params = {}
|
1993
|
+
if request.parent
|
1994
|
+
header_params["parent"] = request.parent
|
1995
|
+
end
|
1996
|
+
|
1997
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1998
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1999
|
+
|
2000
|
+
options.apply_defaults timeout: @config.rpcs.query_assets.timeout,
|
2001
|
+
metadata: metadata,
|
2002
|
+
retry_policy: @config.rpcs.query_assets.retry_policy
|
2003
|
+
|
2004
|
+
options.apply_defaults timeout: @config.timeout,
|
2005
|
+
metadata: @config.metadata,
|
2006
|
+
retry_policy: @config.retry_policy
|
2007
|
+
|
2008
|
+
@asset_service_stub.call_rpc :query_assets, request, options: options do |response, operation|
|
2009
|
+
yield response, operation if block_given?
|
2010
|
+
return response
|
2011
|
+
end
|
2012
|
+
rescue ::GRPC::BadStatus => e
|
2013
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2014
|
+
end
|
2015
|
+
|
1846
2016
|
##
|
1847
2017
|
# Creates a saved query in a parent project/folder/organization.
|
1848
2018
|
#
|
@@ -2633,6 +2803,11 @@ module Google
|
|
2633
2803
|
#
|
2634
2804
|
attr_reader :analyze_move
|
2635
2805
|
##
|
2806
|
+
# RPC-specific configuration for `query_assets`
|
2807
|
+
# @return [::Gapic::Config::Method]
|
2808
|
+
#
|
2809
|
+
attr_reader :query_assets
|
2810
|
+
##
|
2636
2811
|
# RPC-specific configuration for `create_saved_query`
|
2637
2812
|
# @return [::Gapic::Config::Method]
|
2638
2813
|
#
|
@@ -2691,6 +2866,8 @@ module Google
|
|
2691
2866
|
@analyze_iam_policy_longrunning = ::Gapic::Config::Method.new analyze_iam_policy_longrunning_config
|
2692
2867
|
analyze_move_config = parent_rpcs.analyze_move if parent_rpcs.respond_to? :analyze_move
|
2693
2868
|
@analyze_move = ::Gapic::Config::Method.new analyze_move_config
|
2869
|
+
query_assets_config = parent_rpcs.query_assets if parent_rpcs.respond_to? :query_assets
|
2870
|
+
@query_assets = ::Gapic::Config::Method.new query_assets_config
|
2694
2871
|
create_saved_query_config = parent_rpcs.create_saved_query if parent_rpcs.respond_to? :create_saved_query
|
2695
2872
|
@create_saved_query = ::Gapic::Config::Method.new create_saved_query_config
|
2696
2873
|
get_saved_query_config = parent_rpcs.get_saved_query if parent_rpcs.respond_to? :get_saved_query
|
@@ -13,6 +13,7 @@ require 'google/longrunning/operations_pb'
|
|
13
13
|
require 'google/protobuf/duration_pb'
|
14
14
|
require 'google/protobuf/empty_pb'
|
15
15
|
require 'google/protobuf/field_mask_pb'
|
16
|
+
require 'google/protobuf/struct_pb'
|
16
17
|
require 'google/protobuf/timestamp_pb'
|
17
18
|
require 'google/rpc/status_pb'
|
18
19
|
require 'google/type/expr_pb'
|
@@ -297,6 +298,53 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
297
298
|
add_message "google.cloud.asset.v1.MoveImpact" do
|
298
299
|
optional :detail, :string, 1
|
299
300
|
end
|
301
|
+
add_message "google.cloud.asset.v1.QueryAssetsOutputConfig" do
|
302
|
+
optional :bigquery_destination, :message, 1, "google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination"
|
303
|
+
end
|
304
|
+
add_message "google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination" do
|
305
|
+
optional :dataset, :string, 1
|
306
|
+
optional :table, :string, 2
|
307
|
+
optional :write_disposition, :string, 3
|
308
|
+
end
|
309
|
+
add_message "google.cloud.asset.v1.QueryAssetsRequest" do
|
310
|
+
optional :parent, :string, 1
|
311
|
+
optional :page_size, :int32, 4
|
312
|
+
optional :page_token, :string, 5
|
313
|
+
optional :timeout, :message, 6, "google.protobuf.Duration"
|
314
|
+
optional :output_config, :message, 9, "google.cloud.asset.v1.QueryAssetsOutputConfig"
|
315
|
+
oneof :query do
|
316
|
+
optional :statement, :string, 2
|
317
|
+
optional :job_reference, :string, 3
|
318
|
+
end
|
319
|
+
oneof :time do
|
320
|
+
optional :read_time_window, :message, 7, "google.cloud.asset.v1.TimeWindow"
|
321
|
+
optional :read_time, :message, 8, "google.protobuf.Timestamp"
|
322
|
+
end
|
323
|
+
end
|
324
|
+
add_message "google.cloud.asset.v1.QueryAssetsResponse" do
|
325
|
+
optional :job_reference, :string, 1
|
326
|
+
optional :done, :bool, 2
|
327
|
+
oneof :response do
|
328
|
+
optional :error, :message, 3, "google.rpc.Status"
|
329
|
+
optional :query_result, :message, 4, "google.cloud.asset.v1.QueryResult"
|
330
|
+
optional :output_config, :message, 5, "google.cloud.asset.v1.QueryAssetsOutputConfig"
|
331
|
+
end
|
332
|
+
end
|
333
|
+
add_message "google.cloud.asset.v1.QueryResult" do
|
334
|
+
repeated :rows, :message, 1, "google.protobuf.Struct"
|
335
|
+
optional :schema, :message, 2, "google.cloud.asset.v1.TableSchema"
|
336
|
+
optional :next_page_token, :string, 3
|
337
|
+
optional :total_rows, :int64, 4
|
338
|
+
end
|
339
|
+
add_message "google.cloud.asset.v1.TableSchema" do
|
340
|
+
repeated :fields, :message, 1, "google.cloud.asset.v1.TableFieldSchema"
|
341
|
+
end
|
342
|
+
add_message "google.cloud.asset.v1.TableFieldSchema" do
|
343
|
+
optional :field, :string, 1
|
344
|
+
optional :type, :string, 2
|
345
|
+
optional :mode, :string, 3
|
346
|
+
repeated :fields, :message, 4, "google.cloud.asset.v1.TableFieldSchema"
|
347
|
+
end
|
300
348
|
add_message "google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest" do
|
301
349
|
optional :scope, :string, 1
|
302
350
|
repeated :names, :string, 3
|
@@ -384,6 +432,13 @@ module Google
|
|
384
432
|
MoveAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveAnalysis").msgclass
|
385
433
|
MoveAnalysisResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveAnalysisResult").msgclass
|
386
434
|
MoveImpact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.MoveImpact").msgclass
|
435
|
+
QueryAssetsOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsOutputConfig").msgclass
|
436
|
+
QueryAssetsOutputConfig::BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination").msgclass
|
437
|
+
QueryAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsRequest").msgclass
|
438
|
+
QueryAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryAssetsResponse").msgclass
|
439
|
+
QueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.QueryResult").msgclass
|
440
|
+
TableSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TableSchema").msgclass
|
441
|
+
TableFieldSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TableFieldSchema").msgclass
|
387
442
|
BatchGetEffectiveIamPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest").msgclass
|
388
443
|
BatchGetEffectiveIamPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse").msgclass
|
389
444
|
BatchGetEffectiveIamPoliciesResponse::EffectiveIamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy").msgclass
|
@@ -97,6 +97,21 @@ module Google
|
|
97
97
|
# The policies and configuration are subject to change before the actual
|
98
98
|
# resource migration takes place.
|
99
99
|
rpc :AnalyzeMove, ::Google::Cloud::Asset::V1::AnalyzeMoveRequest, ::Google::Cloud::Asset::V1::AnalyzeMoveResponse
|
100
|
+
# Issue a job that queries assets using a SQL statement compatible with
|
101
|
+
# [BigQuery Standard
|
102
|
+
# SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
|
103
|
+
#
|
104
|
+
# If the query execution finishes within timeout and there's no pagination,
|
105
|
+
# the full query results will be returned in the `QueryAssetsResponse`.
|
106
|
+
#
|
107
|
+
# Otherwise, full query results can be obtained by issuing extra requests
|
108
|
+
# with the `job_reference` from the a previous `QueryAssets` call.
|
109
|
+
#
|
110
|
+
# Note, the query result has approximately 10 GB limitation enforced by
|
111
|
+
# BigQuery
|
112
|
+
# https://cloud.google.com/bigquery/docs/best-practices-performance-output,
|
113
|
+
# queries return larger results will result in errors.
|
114
|
+
rpc :QueryAssets, ::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Google::Cloud::Asset::V1::QueryAssetsResponse
|
100
115
|
# Creates a saved query in a parent project/folder/organization.
|
101
116
|
rpc :CreateSavedQuery, ::Google::Cloud::Asset::V1::CreateSavedQueryRequest, ::Google::Cloud::Asset::V1::SavedQuery
|
102
117
|
# Gets details about a saved query.
|
@@ -649,6 +649,14 @@ module Google
|
|
649
649
|
# * `labels.env:*` to find Cloud resources that have a label "env".
|
650
650
|
# * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
|
651
651
|
# encryption key whose name contains the word "key".
|
652
|
+
# * `relationships:instance-group-1` to find Cloud resources that have
|
653
|
+
# relationships with "instance-group-1" in the related resource name.
|
654
|
+
# * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
|
655
|
+
# have relationships of type "INSTANCE_TO_INSTANCEGROUP".
|
656
|
+
# * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
|
657
|
+
# compute instances that have relationships with "instance-group-1" in the
|
658
|
+
# compute instance group resource name, for relationship type
|
659
|
+
# "INSTANCE_TO_INSTANCEGROUP".
|
652
660
|
# * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
|
653
661
|
# word.
|
654
662
|
# * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
|
@@ -797,8 +805,8 @@ module Google
|
|
797
805
|
# compared against each Cloud IAM policy binding, including its principals,
|
798
806
|
# roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
|
799
807
|
# contain the bindings that match your query. To learn more about the IAM
|
800
|
-
# policy structure, see [IAM policy
|
801
|
-
#
|
808
|
+
# policy structure, see the [IAM policy
|
809
|
+
# documentation](https://cloud.google.com/iam/help/allow-policies/structure).
|
802
810
|
#
|
803
811
|
# Examples:
|
804
812
|
#
|
@@ -1575,6 +1583,206 @@ module Google
|
|
1575
1583
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1576
1584
|
end
|
1577
1585
|
|
1586
|
+
# Output configuration query assets.
|
1587
|
+
# @!attribute [rw] bigquery_destination
|
1588
|
+
# @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig::BigQueryDestination]
|
1589
|
+
# BigQuery destination where the query results will be saved.
|
1590
|
+
class QueryAssetsOutputConfig
|
1591
|
+
include ::Google::Protobuf::MessageExts
|
1592
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1593
|
+
|
1594
|
+
# BigQuery destination.
|
1595
|
+
# @!attribute [rw] dataset
|
1596
|
+
# @return [::String]
|
1597
|
+
# Required. The BigQuery dataset where the query results will be saved. It
|
1598
|
+
# has the format of "projects/\\{projectId}/datasets/\\{datasetId}".
|
1599
|
+
# @!attribute [rw] table
|
1600
|
+
# @return [::String]
|
1601
|
+
# Required. The BigQuery table where the query results will be saved. If
|
1602
|
+
# this table does not exist, a new table with the given name will be
|
1603
|
+
# created.
|
1604
|
+
# @!attribute [rw] write_disposition
|
1605
|
+
# @return [::String]
|
1606
|
+
# Specifies the action that occurs if the destination table or partition
|
1607
|
+
# already exists. The following values are supported:
|
1608
|
+
#
|
1609
|
+
# * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
|
1610
|
+
# overwrites the entire table or all the partitions data.
|
1611
|
+
# * WRITE_APPEND: If the table or partition already exists, BigQuery
|
1612
|
+
# appends the data to the table or the latest partition.
|
1613
|
+
# * WRITE_EMPTY: If the table already exists and contains data, an error is
|
1614
|
+
# returned.
|
1615
|
+
class BigQueryDestination
|
1616
|
+
include ::Google::Protobuf::MessageExts
|
1617
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1618
|
+
end
|
1619
|
+
end
|
1620
|
+
|
1621
|
+
# QueryAssets request.
|
1622
|
+
# @!attribute [rw] parent
|
1623
|
+
# @return [::String]
|
1624
|
+
# Required. The relative name of the root asset. This can only be an
|
1625
|
+
# organization number (such as "organizations/123"), a project ID (such as
|
1626
|
+
# "projects/my-project-id"), or a project number (such as "projects/12345"),
|
1627
|
+
# or a folder number (such as "folders/123").
|
1628
|
+
#
|
1629
|
+
# Only assets belonging to the `parent` will be returned.
|
1630
|
+
# @!attribute [rw] statement
|
1631
|
+
# @return [::String]
|
1632
|
+
# Optional. A SQL statement that's compatible with [BigQuery Standard
|
1633
|
+
# SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
|
1634
|
+
# @!attribute [rw] job_reference
|
1635
|
+
# @return [::String]
|
1636
|
+
# Optional. Reference to the query job, which is from the
|
1637
|
+
# `QueryAssetsResponse` of previous `QueryAssets` call.
|
1638
|
+
# @!attribute [rw] page_size
|
1639
|
+
# @return [::Integer]
|
1640
|
+
# Optional. The maximum number of rows to return in the results. Responses
|
1641
|
+
# are limited to 10 MB and 1000 rows.
|
1642
|
+
#
|
1643
|
+
# By default, the maximum row count is 1000. When the byte or row count limit
|
1644
|
+
# is reached, the rest of the query results will be paginated.
|
1645
|
+
#
|
1646
|
+
# The field will be ignored when [output_config] is specified.
|
1647
|
+
# @!attribute [rw] page_token
|
1648
|
+
# @return [::String]
|
1649
|
+
# Optional. A page token received from previous `QueryAssets`.
|
1650
|
+
#
|
1651
|
+
# The field will be ignored when [output_config] is specified.
|
1652
|
+
# @!attribute [rw] timeout
|
1653
|
+
# @return [::Google::Protobuf::Duration]
|
1654
|
+
# Optional. Specifies the maximum amount of time that the client is willing
|
1655
|
+
# to wait for the query to complete. By default, this limit is 5 min for the
|
1656
|
+
# first query, and 1 minute for the following queries. If the query is
|
1657
|
+
# complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
|
1658
|
+
# false.
|
1659
|
+
#
|
1660
|
+
# Like BigQuery [jobs.query
|
1661
|
+
# API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
|
1662
|
+
# The call is not guaranteed to wait for the specified timeout; it typically
|
1663
|
+
# returns after around 200 seconds (200,000 milliseconds), even if the query
|
1664
|
+
# is not complete.
|
1665
|
+
#
|
1666
|
+
# The field will be ignored when [output_config] is specified.
|
1667
|
+
# @!attribute [rw] read_time_window
|
1668
|
+
# @return [::Google::Cloud::Asset::V1::TimeWindow]
|
1669
|
+
# Optional. [start_time] is required. [start_time] must be less than
|
1670
|
+
# [end_time] Defaults [end_time] to now if [start_time] is set and
|
1671
|
+
# [end_time] isn't. Maximum permitted time range is 7 days.
|
1672
|
+
# @!attribute [rw] read_time
|
1673
|
+
# @return [::Google::Protobuf::Timestamp]
|
1674
|
+
# Optional. Queries cloud assets as they appeared at the specified point in
|
1675
|
+
# time.
|
1676
|
+
# @!attribute [rw] output_config
|
1677
|
+
# @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig]
|
1678
|
+
# Optional. Destination where the query results will be saved.
|
1679
|
+
#
|
1680
|
+
# When this field is specified, the query results won't be saved in the
|
1681
|
+
# [QueryAssetsResponse.query_result]. Instead
|
1682
|
+
# [QueryAssetsResponse.output_config] will be set.
|
1683
|
+
#
|
1684
|
+
# Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
|
1685
|
+
# to check the status of the query job when passed to a following
|
1686
|
+
# [QueryAssets] API call.
|
1687
|
+
class QueryAssetsRequest
|
1688
|
+
include ::Google::Protobuf::MessageExts
|
1689
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1690
|
+
end
|
1691
|
+
|
1692
|
+
# QueryAssets response.
|
1693
|
+
# @!attribute [rw] job_reference
|
1694
|
+
# @return [::String]
|
1695
|
+
# Reference to a query job.
|
1696
|
+
# @!attribute [rw] done
|
1697
|
+
# @return [::Boolean]
|
1698
|
+
# The query response, which can be either an `error` or a valid `response`.
|
1699
|
+
#
|
1700
|
+
# If `done` == `false` and the query result is being saved in a output, the
|
1701
|
+
# output_config field will be set.
|
1702
|
+
# If `done` == `true`, exactly one of
|
1703
|
+
# `error`, `query_result` or `output_config` will be set.
|
1704
|
+
# @!attribute [rw] error
|
1705
|
+
# @return [::Google::Rpc::Status]
|
1706
|
+
# Error status.
|
1707
|
+
# @!attribute [rw] query_result
|
1708
|
+
# @return [::Google::Cloud::Asset::V1::QueryResult]
|
1709
|
+
# Result of the query.
|
1710
|
+
# @!attribute [rw] output_config
|
1711
|
+
# @return [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig]
|
1712
|
+
# Output configuration which indicates instead of being returned in API
|
1713
|
+
# response on the fly, the query result will be saved in a specific output.
|
1714
|
+
class QueryAssetsResponse
|
1715
|
+
include ::Google::Protobuf::MessageExts
|
1716
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1717
|
+
end
|
1718
|
+
|
1719
|
+
# Execution results of the query.
|
1720
|
+
#
|
1721
|
+
# The result is formatted as rows represented by BigQuery compatible [schema].
|
1722
|
+
# When pagination is necessary, it will contains the page token to retrieve
|
1723
|
+
# the results of following pages.
|
1724
|
+
# @!attribute [rw] rows
|
1725
|
+
# @return [::Array<::Google::Protobuf::Struct>]
|
1726
|
+
# Each row hold a query result in the format of `Struct`.
|
1727
|
+
# @!attribute [rw] schema
|
1728
|
+
# @return [::Google::Cloud::Asset::V1::TableSchema]
|
1729
|
+
# Describes the format of the [rows].
|
1730
|
+
# @!attribute [rw] next_page_token
|
1731
|
+
# @return [::String]
|
1732
|
+
# Token to retrieve the next page of the results.
|
1733
|
+
# @!attribute [rw] total_rows
|
1734
|
+
# @return [::Integer]
|
1735
|
+
# Total rows of the whole query results.
|
1736
|
+
class QueryResult
|
1737
|
+
include ::Google::Protobuf::MessageExts
|
1738
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1739
|
+
end
|
1740
|
+
|
1741
|
+
# BigQuery Compatible table schema.
|
1742
|
+
# @!attribute [rw] fields
|
1743
|
+
# @return [::Array<::Google::Cloud::Asset::V1::TableFieldSchema>]
|
1744
|
+
# Describes the fields in a table.
|
1745
|
+
class TableSchema
|
1746
|
+
include ::Google::Protobuf::MessageExts
|
1747
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1748
|
+
end
|
1749
|
+
|
1750
|
+
# A field in TableSchema.
|
1751
|
+
# @!attribute [rw] field
|
1752
|
+
# @return [::String]
|
1753
|
+
# The field name. The name must contain only letters (a-z, A-Z),
|
1754
|
+
# numbers (0-9), or underscores (_), and must start with a letter or
|
1755
|
+
# underscore. The maximum length is 128 characters.
|
1756
|
+
# @!attribute [rw] type
|
1757
|
+
# @return [::String]
|
1758
|
+
# The field data type. Possible values include
|
1759
|
+
# * STRING
|
1760
|
+
# * BYTES
|
1761
|
+
# * INTEGER
|
1762
|
+
# * FLOAT
|
1763
|
+
# * BOOLEAN
|
1764
|
+
# * TIMESTAMP
|
1765
|
+
# * DATE
|
1766
|
+
# * TIME
|
1767
|
+
# * DATETIME
|
1768
|
+
# * GEOGRAPHY,
|
1769
|
+
# * NUMERIC,
|
1770
|
+
# * BIGNUMERIC,
|
1771
|
+
# * RECORD
|
1772
|
+
# (where RECORD indicates that the field contains a nested schema).
|
1773
|
+
# @!attribute [rw] mode
|
1774
|
+
# @return [::String]
|
1775
|
+
# The field mode. Possible values include NULLABLE, REQUIRED and
|
1776
|
+
# REPEATED. The default value is NULLABLE.
|
1777
|
+
# @!attribute [rw] fields
|
1778
|
+
# @return [::Array<::Google::Cloud::Asset::V1::TableFieldSchema>]
|
1779
|
+
# Describes the nested schema fields if the type property is set
|
1780
|
+
# to RECORD.
|
1781
|
+
class TableFieldSchema
|
1782
|
+
include ::Google::Protobuf::MessageExts
|
1783
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1784
|
+
end
|
1785
|
+
|
1578
1786
|
# A request message for
|
1579
1787
|
# {::Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies AssetService.BatchGetEffectiveIamPolicies}.
|
1580
1788
|
# @!attribute [rw] scope
|
@@ -115,8 +115,8 @@ module Google
|
|
115
115
|
# effectively policy is the union of both the policy set on this resource
|
116
116
|
# and each policy set on all of the resource's ancestry resource levels in
|
117
117
|
# the hierarchy. See
|
118
|
-
# [this topic](https://cloud.google.com/iam/
|
119
|
-
# more information.
|
118
|
+
# [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
|
119
|
+
# for more information.
|
120
120
|
# @!attribute [rw] org_policy
|
121
121
|
# @return [::Array<::Google::Cloud::OrgPolicy::V1::Policy>]
|
122
122
|
# A representation of an [organization
|
@@ -297,6 +297,7 @@ module Google
|
|
297
297
|
end
|
298
298
|
|
299
299
|
# A result of Resource Search, containing information of a cloud resource.
|
300
|
+
# Next ID: 29
|
300
301
|
# @!attribute [rw] name
|
301
302
|
# @return [::String]
|
302
303
|
# The full resource name of this resource. Example:
|
@@ -26,8 +26,6 @@ module Google
|
|
26
26
|
# service Foo {
|
27
27
|
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
28
28
|
# }
|
29
|
-
#
|
30
|
-
# The JSON representation for `Empty` is empty JSON object `{}`.
|
31
29
|
class Empty
|
32
30
|
include ::Google::Protobuf::MessageExts
|
33
31
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
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.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.10'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.10'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -104,28 +104,28 @@ dependencies:
|
|
104
104
|
requirements:
|
105
105
|
- - "~>"
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: 1.
|
107
|
+
version: 1.26.1
|
108
108
|
type: :development
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
112
|
- - "~>"
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version: 1.
|
114
|
+
version: 1.26.1
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: minitest
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
119
|
- - "~>"
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version: '5.
|
121
|
+
version: '5.16'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
126
|
- - "~>"
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version: '5.
|
128
|
+
version: '5.16'
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: minitest-focus
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,14 +160,14 @@ dependencies:
|
|
160
160
|
requirements:
|
161
161
|
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
|
-
version: '
|
163
|
+
version: '13.0'
|
164
164
|
type: :development
|
165
165
|
prerelease: false
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
168
|
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
|
-
version: '
|
170
|
+
version: '13.0'
|
171
171
|
- !ruby/object:Gem::Dependency
|
172
172
|
name: redcarpet
|
173
173
|
requirement: !ruby/object:Gem::Requirement
|
@@ -271,7 +271,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
271
271
|
requirements:
|
272
272
|
- - ">="
|
273
273
|
- !ruby/object:Gem::Version
|
274
|
-
version: '2.
|
274
|
+
version: '2.6'
|
275
275
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
276
276
|
requirements:
|
277
277
|
- - ">="
|