google-cloud-asset-v1 0.20.1 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/asset/v1/asset_service/client.rb +183 -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/assets_pb.rb +0 -1
- data/lib/google/cloud/asset/v1/version.rb +1 -1
- data/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb +0 -2
- data/proto_docs/google/cloud/asset/v1/asset_service.rb +200 -0
- 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: d8af562b0115d3d973426bda368ef1ec3e9068ec877174ce025f6da784f197e3
|
4
|
+
data.tar.gz: d7dcef2f57cd7ec3b82dae5491518ecfb655e7a71174ab02e72609fe8493cdb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 650b132db2f02dcc24ad3f36cd631034d8da3b01054ab3ce5ff90466b8e3aa50de6e72613ecb836317ae094c9040c25e9fbd99fa4dbdb525f9bae732cb4e856f
|
7
|
+
data.tar.gz: 95f1007bd217d967d4d47f76d7a1ad516f1ebf0a8a86d2bb0a907dce0444fab8e4f046532c0a8af88410078ba45f2dbec1332ec70808228795fe5020a4c98bd3
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
@@ -112,6 +112,30 @@ 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.create_saved_query.timeout = 60.0
|
121
|
+
|
122
|
+
default_config.rpcs.get_saved_query.timeout = 60.0
|
123
|
+
default_config.rpcs.get_saved_query.retry_policy = {
|
124
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
125
|
+
}
|
126
|
+
|
127
|
+
default_config.rpcs.list_saved_queries.timeout = 60.0
|
128
|
+
default_config.rpcs.list_saved_queries.retry_policy = {
|
129
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
130
|
+
}
|
131
|
+
|
132
|
+
default_config.rpcs.update_saved_query.timeout = 60.0
|
133
|
+
|
134
|
+
default_config.rpcs.delete_saved_query.timeout = 60.0
|
135
|
+
default_config.rpcs.delete_saved_query.retry_policy = {
|
136
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
137
|
+
}
|
138
|
+
|
115
139
|
default_config.rpcs.batch_get_effective_iam_policies.timeout = 300.0
|
116
140
|
default_config.rpcs.batch_get_effective_iam_policies.retry_policy = {
|
117
141
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
@@ -1856,6 +1880,158 @@ module Google
|
|
1856
1880
|
raise ::Google::Cloud::Error.from_error(e)
|
1857
1881
|
end
|
1858
1882
|
|
1883
|
+
##
|
1884
|
+
# Issue a job that queries assets using a SQL statement compatible with
|
1885
|
+
# [BigQuery Standard
|
1886
|
+
# SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
|
1887
|
+
#
|
1888
|
+
# If the query execution finishes within timeout and there's no pagination,
|
1889
|
+
# the full query results will be returned in the `QueryAssetsResponse`.
|
1890
|
+
#
|
1891
|
+
# Otherwise, full query results can be obtained by issuing extra requests
|
1892
|
+
# with the `job_reference` from the a previous `QueryAssets` call.
|
1893
|
+
#
|
1894
|
+
# Note, the query result has approximately 10 GB limitation enforced by
|
1895
|
+
# BigQuery
|
1896
|
+
# https://cloud.google.com/bigquery/docs/best-practices-performance-output,
|
1897
|
+
# queries return larger results will result in errors.
|
1898
|
+
#
|
1899
|
+
# @overload query_assets(request, options = nil)
|
1900
|
+
# Pass arguments to `query_assets` via a request object, either of type
|
1901
|
+
# {::Google::Cloud::Asset::V1::QueryAssetsRequest} or an equivalent Hash.
|
1902
|
+
#
|
1903
|
+
# @param request [::Google::Cloud::Asset::V1::QueryAssetsRequest, ::Hash]
|
1904
|
+
# A request object representing the call parameters. Required. To specify no
|
1905
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1906
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1907
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1908
|
+
#
|
1909
|
+
# @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)
|
1910
|
+
# Pass arguments to `query_assets` via keyword arguments. Note that at
|
1911
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1912
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1913
|
+
#
|
1914
|
+
# @param parent [::String]
|
1915
|
+
# Required. The relative name of the root asset. This can only be an
|
1916
|
+
# organization number (such as "organizations/123"), a project ID (such as
|
1917
|
+
# "projects/my-project-id"), or a project number (such as "projects/12345"),
|
1918
|
+
# or a folder number (such as "folders/123").
|
1919
|
+
#
|
1920
|
+
# Only assets belonging to the `parent` will be returned.
|
1921
|
+
# @param statement [::String]
|
1922
|
+
# Optional. A SQL statement that's compatible with [BigQuery Standard
|
1923
|
+
# SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
|
1924
|
+
# @param job_reference [::String]
|
1925
|
+
# Optional. Reference to the query job, which is from the
|
1926
|
+
# `QueryAssetsResponse` of previous `QueryAssets` call.
|
1927
|
+
# @param page_size [::Integer]
|
1928
|
+
# Optional. The maximum number of rows to return in the results. Responses
|
1929
|
+
# are limited to 10 MB and 1000 rows.
|
1930
|
+
#
|
1931
|
+
# By default, the maximum row count is 1000. When the byte or row count limit
|
1932
|
+
# is reached, the rest of the query results will be paginated.
|
1933
|
+
#
|
1934
|
+
# The field will be ignored when [output_config] is specified.
|
1935
|
+
# @param page_token [::String]
|
1936
|
+
# Optional. A page token received from previous `QueryAssets`.
|
1937
|
+
#
|
1938
|
+
# The field will be ignored when [output_config] is specified.
|
1939
|
+
# @param timeout [::Google::Protobuf::Duration, ::Hash]
|
1940
|
+
# Optional. Specifies the maximum amount of time that the client is willing
|
1941
|
+
# to wait for the query to complete. By default, this limit is 5 min for the
|
1942
|
+
# first query, and 1 minute for the following queries. If the query is
|
1943
|
+
# complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
|
1944
|
+
# false.
|
1945
|
+
#
|
1946
|
+
# Like BigQuery [jobs.query
|
1947
|
+
# API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
|
1948
|
+
# The call is not guaranteed to wait for the specified timeout; it typically
|
1949
|
+
# returns after around 200 seconds (200,000 milliseconds), even if the query
|
1950
|
+
# is not complete.
|
1951
|
+
#
|
1952
|
+
# The field will be ignored when [output_config] is specified.
|
1953
|
+
# @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash]
|
1954
|
+
# Optional. [start_time] is required. [start_time] must be less than
|
1955
|
+
# [end_time] Defaults [end_time] to now if [start_time] is set and
|
1956
|
+
# [end_time] isn't. Maximum permitted time range is 7 days.
|
1957
|
+
# @param read_time [::Google::Protobuf::Timestamp, ::Hash]
|
1958
|
+
# Optional. Queries cloud assets as they appeared at the specified point in
|
1959
|
+
# time.
|
1960
|
+
# @param output_config [::Google::Cloud::Asset::V1::QueryAssetsOutputConfig, ::Hash]
|
1961
|
+
# Optional. Destination where the query results will be saved.
|
1962
|
+
#
|
1963
|
+
# When this field is specified, the query results won't be saved in the
|
1964
|
+
# [QueryAssetsResponse.query_result]. Instead
|
1965
|
+
# [QueryAssetsResponse.output_config] will be set.
|
1966
|
+
#
|
1967
|
+
# Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
|
1968
|
+
# to check the status of the query job when passed to a following
|
1969
|
+
# [QueryAssets] API call.
|
1970
|
+
#
|
1971
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1972
|
+
# @yieldparam response [::Google::Cloud::Asset::V1::QueryAssetsResponse]
|
1973
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1974
|
+
#
|
1975
|
+
# @return [::Google::Cloud::Asset::V1::QueryAssetsResponse]
|
1976
|
+
#
|
1977
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1978
|
+
#
|
1979
|
+
# @example Basic example
|
1980
|
+
# require "google/cloud/asset/v1"
|
1981
|
+
#
|
1982
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1983
|
+
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
1984
|
+
#
|
1985
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1986
|
+
# request = Google::Cloud::Asset::V1::QueryAssetsRequest.new
|
1987
|
+
#
|
1988
|
+
# # Call the query_assets method.
|
1989
|
+
# result = client.query_assets request
|
1990
|
+
#
|
1991
|
+
# # The returned object is of type Google::Cloud::Asset::V1::QueryAssetsResponse.
|
1992
|
+
# p result
|
1993
|
+
#
|
1994
|
+
def query_assets request, options = nil
|
1995
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1996
|
+
|
1997
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::QueryAssetsRequest
|
1998
|
+
|
1999
|
+
# Converts hash and nil to an options object
|
2000
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2001
|
+
|
2002
|
+
# Customize the options with defaults
|
2003
|
+
metadata = @config.rpcs.query_assets.metadata.to_h
|
2004
|
+
|
2005
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2006
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2007
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2008
|
+
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
2009
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2010
|
+
|
2011
|
+
header_params = {}
|
2012
|
+
if request.parent
|
2013
|
+
header_params["parent"] = request.parent
|
2014
|
+
end
|
2015
|
+
|
2016
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2017
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2018
|
+
|
2019
|
+
options.apply_defaults timeout: @config.rpcs.query_assets.timeout,
|
2020
|
+
metadata: metadata,
|
2021
|
+
retry_policy: @config.rpcs.query_assets.retry_policy
|
2022
|
+
|
2023
|
+
options.apply_defaults timeout: @config.timeout,
|
2024
|
+
metadata: @config.metadata,
|
2025
|
+
retry_policy: @config.retry_policy
|
2026
|
+
|
2027
|
+
@asset_service_stub.call_rpc :query_assets, request, options: options do |response, operation|
|
2028
|
+
yield response, operation if block_given?
|
2029
|
+
return response
|
2030
|
+
end
|
2031
|
+
rescue ::GRPC::BadStatus => e
|
2032
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2033
|
+
end
|
2034
|
+
|
1859
2035
|
##
|
1860
2036
|
# Creates a saved query in a parent project/folder/organization.
|
1861
2037
|
#
|
@@ -2646,6 +2822,11 @@ module Google
|
|
2646
2822
|
#
|
2647
2823
|
attr_reader :analyze_move
|
2648
2824
|
##
|
2825
|
+
# RPC-specific configuration for `query_assets`
|
2826
|
+
# @return [::Gapic::Config::Method]
|
2827
|
+
#
|
2828
|
+
attr_reader :query_assets
|
2829
|
+
##
|
2649
2830
|
# RPC-specific configuration for `create_saved_query`
|
2650
2831
|
# @return [::Gapic::Config::Method]
|
2651
2832
|
#
|
@@ -2704,6 +2885,8 @@ module Google
|
|
2704
2885
|
@analyze_iam_policy_longrunning = ::Gapic::Config::Method.new analyze_iam_policy_longrunning_config
|
2705
2886
|
analyze_move_config = parent_rpcs.analyze_move if parent_rpcs.respond_to? :analyze_move
|
2706
2887
|
@analyze_move = ::Gapic::Config::Method.new analyze_move_config
|
2888
|
+
query_assets_config = parent_rpcs.query_assets if parent_rpcs.respond_to? :query_assets
|
2889
|
+
@query_assets = ::Gapic::Config::Method.new query_assets_config
|
2707
2890
|
create_saved_query_config = parent_rpcs.create_saved_query if parent_rpcs.respond_to? :create_saved_query
|
2708
2891
|
@create_saved_query = ::Gapic::Config::Method.new create_saved_query_config
|
2709
2892
|
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.
|
@@ -3,9 +3,7 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
-
require 'google/protobuf/empty_pb'
|
7
6
|
require 'google/protobuf/timestamp_pb'
|
8
|
-
require 'google/api/annotations_pb'
|
9
7
|
|
10
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
9
|
add_file("google/cloud/orgpolicy/v1/orgpolicy.proto", :syntax => :proto3) do
|
@@ -1583,6 +1583,206 @@ module Google
|
|
1583
1583
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1584
1584
|
end
|
1585
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
|
+
|
1586
1786
|
# A request message for
|
1587
1787
|
# {::Google::Cloud::Asset::V1::AssetService::Client#batch_get_effective_iam_policies AssetService.BatchGetEffectiveIamPolicies}.
|
1588
1788
|
# @!attribute [rw] scope
|
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.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: 2022-
|
11
|
+
date: 2022-09-28 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.12'
|
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.12'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|