google-cloud-asset-v1 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7601e08b3f6d242baec633460a4e82037603a86284c15071dda3595e20984b4d
4
- data.tar.gz: 5dddf6f643e226cc7a0c9d070bd755a9735fad69d33ad1237070b80d38276a24
3
+ metadata.gz: 3a33096b1fa6262e9bd69d258c12d8cd8ff8efa76c1537c0d49e4e2941e3516e
4
+ data.tar.gz: aa07a54ad150dd6707ea2f775a46730cdf9275c8c57b943f0d7dd8c7385aa210
5
5
  SHA512:
6
- metadata.gz: 5ee7a713b523233cdc7b35f12ae891388713619ca96743a8e3b1d3c30bdefd09a3be70ec00c0ada079c0a93ab85d890d1d3c7e11b7b266b51ba9d7406765ad5e
7
- data.tar.gz: b3d0f7fa841d88066fe72e4835cd33891a0fb9be93ce60a80a221647bf4850e72901ee5b429c36aa733983648083d024d3118044a00099ca6e1d31dc236395e6
6
+ metadata.gz: 6d83fa78c7480975dc0ce2102c27421e22f1132ec29170eadf3bdf319a5e2419e09762fca2a83c8a1118d47fe5182f0822211556bcab6f4bd63c32419fde2595
7
+ data.tar.gz: 2e57428a82dffbf427466096119e6d0c7030d0dd232778c25d40062ece4dc8d789702e2df36e4d223ede5a491f7adf8e319be6bcc4b89fba711b68fd78db01bc
@@ -82,6 +82,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
82
82
  optional :dataset, :string, 1
83
83
  optional :table, :string, 2
84
84
  optional :force, :bool, 3
85
+ optional :partition_spec, :message, 4, "google.cloud.asset.v1.PartitionSpec"
86
+ optional :separate_tables_per_asset_type, :bool, 5
87
+ end
88
+ add_message "google.cloud.asset.v1.PartitionSpec" do
89
+ optional :partition_key, :enum, 1, "google.cloud.asset.v1.PartitionSpec.PartitionKey"
90
+ end
91
+ add_enum "google.cloud.asset.v1.PartitionSpec.PartitionKey" do
92
+ value :PARTITION_KEY_UNSPECIFIED, 0
93
+ value :READ_TIME, 1
94
+ value :REQUEST_TIME, 2
85
95
  end
86
96
  add_message "google.cloud.asset.v1.PubsubDestination" do
87
97
  optional :topic, :string, 1
@@ -150,6 +160,8 @@ module Google
150
160
  GcsOutputResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsOutputResult").msgclass
151
161
  GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsDestination").msgclass
152
162
  BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BigQueryDestination").msgclass
163
+ PartitionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PartitionSpec").msgclass
164
+ PartitionSpec::PartitionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PartitionSpec.PartitionKey").enummodule
153
165
  PubsubDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PubsubDestination").msgclass
154
166
  FeedOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.FeedOutputConfig").msgclass
155
167
  Feed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Feed").msgclass
@@ -43,7 +43,7 @@ module Google
43
43
  # at least 2 seconds with exponential retry to poll the export operation
44
44
  # result. For regular-size resource parent, the export operation usually
45
45
  # finishes within 5 minutes.
46
- rpc :ExportAssets, Google::Cloud::Asset::V1::ExportAssetsRequest, Google::Longrunning::Operation
46
+ rpc :ExportAssets, ::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Google::Longrunning::Operation
47
47
  # Batch gets the update history of assets that overlap a time window.
48
48
  # For IAM_POLICY content, this API outputs history when the asset and its
49
49
  # attached IAM POLICY both exist. This can create gaps in the output history.
@@ -51,28 +51,28 @@ module Google
51
51
  # deleted status.
52
52
  # If a specified asset does not exist, this API returns an INVALID_ARGUMENT
53
53
  # error.
54
- rpc :BatchGetAssetsHistory, Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse
54
+ rpc :BatchGetAssetsHistory, ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse
55
55
  # Creates a feed in a parent project/folder/organization to listen to its
56
56
  # asset updates.
57
- rpc :CreateFeed, Google::Cloud::Asset::V1::CreateFeedRequest, Google::Cloud::Asset::V1::Feed
57
+ rpc :CreateFeed, ::Google::Cloud::Asset::V1::CreateFeedRequest, ::Google::Cloud::Asset::V1::Feed
58
58
  # Gets details about an asset feed.
59
- rpc :GetFeed, Google::Cloud::Asset::V1::GetFeedRequest, Google::Cloud::Asset::V1::Feed
59
+ rpc :GetFeed, ::Google::Cloud::Asset::V1::GetFeedRequest, ::Google::Cloud::Asset::V1::Feed
60
60
  # Lists all asset feeds in a parent project/folder/organization.
61
- rpc :ListFeeds, Google::Cloud::Asset::V1::ListFeedsRequest, Google::Cloud::Asset::V1::ListFeedsResponse
61
+ rpc :ListFeeds, ::Google::Cloud::Asset::V1::ListFeedsRequest, ::Google::Cloud::Asset::V1::ListFeedsResponse
62
62
  # Updates an asset feed configuration.
63
- rpc :UpdateFeed, Google::Cloud::Asset::V1::UpdateFeedRequest, Google::Cloud::Asset::V1::Feed
63
+ rpc :UpdateFeed, ::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Google::Cloud::Asset::V1::Feed
64
64
  # Deletes an asset feed.
65
- rpc :DeleteFeed, Google::Cloud::Asset::V1::DeleteFeedRequest, Google::Protobuf::Empty
65
+ rpc :DeleteFeed, ::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Google::Protobuf::Empty
66
66
  # Searches all Cloud resources within the specified scope, such as a project,
67
67
  # folder, or organization. The caller must be granted the
68
68
  # `cloudasset.assets.searchAllResources` permission on the desired scope,
69
69
  # otherwise the request will be rejected.
70
- rpc :SearchAllResources, Google::Cloud::Asset::V1::SearchAllResourcesRequest, Google::Cloud::Asset::V1::SearchAllResourcesResponse
70
+ rpc :SearchAllResources, ::Google::Cloud::Asset::V1::SearchAllResourcesRequest, ::Google::Cloud::Asset::V1::SearchAllResourcesResponse
71
71
  # Searches all IAM policies within the specified scope, such as a project,
72
72
  # folder, or organization. The caller must be granted the
73
73
  # `cloudasset.assets.searchAllIamPolicies` permission on the desired scope,
74
74
  # otherwise the request will be rejected.
75
- rpc :SearchAllIamPolicies, Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse
75
+ rpc :SearchAllIamPolicies, ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, ::Google::Cloud::Asset::V1::SearchAllIamPoliciesResponse
76
76
  end
77
77
 
78
78
  Stub = Service.rpc_stub_class
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Asset
23
23
  module V1
24
- VERSION = "0.6.1"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -287,11 +287,91 @@ module Google
287
287
  # table will be overwritten by the contents of assets snapshot. If the flag
288
288
  # is `FALSE` or unset and the destination table already exists, the export
289
289
  # call returns an INVALID_ARGUMEMT error.
290
+ # @!attribute [rw] partition_spec
291
+ # @return [::Google::Cloud::Asset::V1::PartitionSpec]
292
+ # [partition_spec] determines whether to export to partitioned table(s) and
293
+ # how to partition the data.
294
+ #
295
+ # If [partition_spec] is unset or [partition_spec.partion_key] is unset or
296
+ # `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
297
+ # non-partitioned table(s). [force] will decide whether to overwrite existing
298
+ # table(s).
299
+ #
300
+ # If [partition_spec] is specified. First, the snapshot results will be
301
+ # written to partitioned table(s) with two additional timestamp columns,
302
+ # readTime and requestTime, one of which will be the partition key. Secondly,
303
+ # in the case when any destination table already exists, it will first try to
304
+ # update existing table's schema as necessary by appending additional
305
+ # columns. Then, if [force] is `TRUE`, the corresponding partition will be
306
+ # overwritten by the snapshot results (data in different partitions will
307
+ # remain intact); if [force] is unset or `FALSE`, it will append the data. An
308
+ # error will be returned if the schema update or data appension fails.
309
+ # @!attribute [rw] separate_tables_per_asset_type
310
+ # @return [::Boolean]
311
+ # If this flag is `TRUE`, the snapshot results will be written to one or
312
+ # multiple tables, each of which contains results of one asset type. The
313
+ # [force] and [partition_spec] fields will apply to each of them.
314
+ #
315
+ # Field [table] will be concatenated with "_" and the asset type names (see
316
+ # https://cloud.google.com/asset-inventory/docs/supported-asset-types for
317
+ # supported asset types) to construct per-asset-type table names, in which
318
+ # all non-alphanumeric characters like "." and "/" will be substituted by
319
+ # "_". Example: if field [table] is "mytable" and snapshot results
320
+ # contain "storage.googleapis.com/Bucket" assets, the corresponding table
321
+ # name will be "mytable_storage_googleapis_com_Bucket". If any of these
322
+ # tables does not exist, a new table with the concatenated name will be
323
+ # created.
324
+ #
325
+ # When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
326
+ # each table will include RECORD-type columns mapped to the nested fields in
327
+ # the Asset.resource.data field of that asset type (up to the 15 nested level
328
+ # BigQuery supports
329
+ # (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
330
+ # fields in >15 nested levels will be stored in JSON format string as a child
331
+ # column of its parent RECORD column.
332
+ #
333
+ # If error occurs when exporting to any table, the whole export call will
334
+ # return an error but the export results that already succeed will persist.
335
+ # Example: if exporting to table_type_A succeeds when exporting to
336
+ # table_type_B fails during one export call, the results in table_type_A will
337
+ # persist and there will not be partial results persisting in a table.
290
338
  class BigQueryDestination
291
339
  include ::Google::Protobuf::MessageExts
292
340
  extend ::Google::Protobuf::MessageExts::ClassMethods
293
341
  end
294
342
 
343
+ # Specifications of BigQuery partitioned table as export destination.
344
+ # @!attribute [rw] partition_key
345
+ # @return [::Google::Cloud::Asset::V1::PartitionSpec::PartitionKey]
346
+ # The partition key for BigQuery partitioned table.
347
+ class PartitionSpec
348
+ include ::Google::Protobuf::MessageExts
349
+ extend ::Google::Protobuf::MessageExts::ClassMethods
350
+
351
+ # This enum is used to determine the partition key column when exporting
352
+ # assets to BigQuery partitioned table(s). Note that, if the partition key is
353
+ # a timestamp column, the actual partition is based on its date value
354
+ # (expressed in UTC. see details in
355
+ # https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables).
356
+ module PartitionKey
357
+ # Unspecified partition key. If used, it means using non-partitioned table.
358
+ PARTITION_KEY_UNSPECIFIED = 0
359
+
360
+ # The time when the snapshot is taken. If specified as partition key, the
361
+ # result table(s) is partitoned by the additional timestamp column,
362
+ # readTime. If [read_time] in ExportAssetsRequest is specified, the
363
+ # readTime column's value will be the same as it. Otherwise, its value will
364
+ # be the current time that is used to take the snapshot.
365
+ READ_TIME = 1
366
+
367
+ # The time when the request is received and started to be processed. If
368
+ # specified as partition key, the result table(s) is partitoned by the
369
+ # requestTime column, an additional timestamp column representing when the
370
+ # request was received.
371
+ REQUEST_TIME = 2
372
+ end
373
+ end
374
+
295
375
  # A Pub/Sub destination.
296
376
  # @!attribute [rw] topic
297
377
  # @return [::String]
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.6.1
4
+ version: 0.7.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: 2020-09-10 00:00:00.000000000 Z
11
+ date: 2020-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  - !ruby/object:Gem::Version
239
239
  version: '0'
240
240
  requirements: []
241
- rubygems_version: 3.1.3
241
+ rubygems_version: 3.1.4
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: API Client library for the Cloud Asset V1 API