google-cloud-asset 0.8.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +272 -0
  6. data/README.md +36 -24
  7. data/lib/{google/cloud/asset/v1/doc/google/protobuf/empty.rb → google-cloud-asset.rb} +4 -14
  8. data/lib/google/cloud/asset.rb +76 -116
  9. data/lib/google/cloud/asset/version.rb +1 -1
  10. metadata +73 -78
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/asset/v1.rb +0 -146
  13. data/lib/google/cloud/asset/v1/asset_service_client.rb +0 -669
  14. data/lib/google/cloud/asset/v1/asset_service_client_config.json +0 -61
  15. data/lib/google/cloud/asset/v1/asset_service_pb.rb +0 -123
  16. data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +0 -69
  17. data/lib/google/cloud/asset/v1/assets_pb.rb +0 -51
  18. data/lib/google/cloud/asset/v1/credentials.rb +0 -41
  19. data/lib/google/cloud/asset/v1/doc/google/cloud/asset/v1/asset_service.rb +0 -295
  20. data/lib/google/cloud/asset/v1/doc/google/cloud/asset/v1/assets.rb +0 -116
  21. data/lib/google/cloud/asset/v1/doc/google/iam/v1/policy.rb +0 -151
  22. data/lib/google/cloud/asset/v1/doc/google/longrunning/operations.rb +0 -51
  23. data/lib/google/cloud/asset/v1/doc/google/protobuf/any.rb +0 -131
  24. data/lib/google/cloud/asset/v1/doc/google/protobuf/field_mask.rb +0 -222
  25. data/lib/google/cloud/asset/v1/doc/google/protobuf/struct.rb +0 -74
  26. data/lib/google/cloud/asset/v1/doc/google/protobuf/timestamp.rb +0 -113
  27. data/lib/google/cloud/asset/v1/doc/google/rpc/status.rb +0 -39
  28. data/lib/google/cloud/asset/v1/doc/google/type/expr.rb +0 -45
  29. data/lib/google/cloud/asset/v1/helpers.rb +0 -39
  30. data/lib/google/cloud/asset/v1beta1.rb +0 -146
  31. data/lib/google/cloud/asset/v1beta1/asset_service_client.rb +0 -400
  32. data/lib/google/cloud/asset/v1beta1/asset_service_client_config.json +0 -36
  33. data/lib/google/cloud/asset/v1beta1/asset_service_pb.rb +0 -67
  34. data/lib/google/cloud/asset/v1beta1/asset_service_services_pb.rb +0 -59
  35. data/lib/google/cloud/asset/v1beta1/assets_pb.rb +0 -50
  36. data/lib/google/cloud/asset/v1beta1/credentials.rb +0 -41
  37. data/lib/google/cloud/asset/v1beta1/doc/google/cloud/asset/v1beta1/asset_service.rb +0 -140
  38. data/lib/google/cloud/asset/v1beta1/doc/google/cloud/asset/v1beta1/assets.rb +0 -108
  39. data/lib/google/cloud/asset/v1beta1/doc/google/iam/v1/policy.rb +0 -151
  40. data/lib/google/cloud/asset/v1beta1/doc/google/longrunning/operations.rb +0 -51
  41. data/lib/google/cloud/asset/v1beta1/doc/google/protobuf/any.rb +0 -131
  42. data/lib/google/cloud/asset/v1beta1/doc/google/protobuf/struct.rb +0 -74
  43. data/lib/google/cloud/asset/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
  44. data/lib/google/cloud/asset/v1beta1/doc/google/rpc/status.rb +0 -39
  45. data/lib/google/cloud/asset/v1beta1/doc/google/type/expr.rb +0 -45
  46. data/lib/google/cloud/asset/v1beta1/helpers.rb +0 -31
  47. data/lib/google/cloud/orgpolicy/v1/doc/google/cloud/orgpolicy/v1/orgpolicy.rb +0 -308
  48. data/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb +0 -55
@@ -1,61 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.cloud.asset.v1.AssetService": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": []
10
- },
11
- "retry_params": {
12
- "default": {
13
- "initial_retry_delay_millis": 100,
14
- "retry_delay_multiplier": 1.3,
15
- "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 20000,
17
- "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 20000,
19
- "total_timeout_millis": 600000
20
- }
21
- },
22
- "methods": {
23
- "ExportAssets": {
24
- "timeout_millis": 600000,
25
- "retry_codes_name": "non_idempotent",
26
- "retry_params_name": "default"
27
- },
28
- "BatchGetAssetsHistory": {
29
- "timeout_millis": 600000,
30
- "retry_codes_name": "idempotent",
31
- "retry_params_name": "default"
32
- },
33
- "CreateFeed": {
34
- "timeout_millis": 30000,
35
- "retry_codes_name": "non_idempotent",
36
- "retry_params_name": "default"
37
- },
38
- "GetFeed": {
39
- "timeout_millis": 10000,
40
- "retry_codes_name": "idempotent",
41
- "retry_params_name": "default"
42
- },
43
- "ListFeeds": {
44
- "timeout_millis": 10000,
45
- "retry_codes_name": "idempotent",
46
- "retry_params_name": "default"
47
- },
48
- "UpdateFeed": {
49
- "timeout_millis": 30000,
50
- "retry_codes_name": "non_idempotent",
51
- "retry_params_name": "default"
52
- },
53
- "DeleteFeed": {
54
- "timeout_millis": 30000,
55
- "retry_codes_name": "idempotent",
56
- "retry_params_name": "default"
57
- }
58
- }
59
- }
60
- }
61
- }
@@ -1,123 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/asset/v1/asset_service.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/api/resource_pb'
11
- require 'google/cloud/asset/v1/assets_pb'
12
- require 'google/longrunning/operations_pb'
13
- require 'google/protobuf/empty_pb'
14
- require 'google/protobuf/field_mask_pb'
15
- require 'google/protobuf/timestamp_pb'
16
- Google::Protobuf::DescriptorPool.generated_pool.build do
17
- add_message "google.cloud.asset.v1.ExportAssetsRequest" do
18
- optional :parent, :string, 1
19
- optional :read_time, :message, 2, "google.protobuf.Timestamp"
20
- repeated :asset_types, :string, 3
21
- optional :content_type, :enum, 4, "google.cloud.asset.v1.ContentType"
22
- optional :output_config, :message, 5, "google.cloud.asset.v1.OutputConfig"
23
- end
24
- add_message "google.cloud.asset.v1.ExportAssetsResponse" do
25
- optional :read_time, :message, 1, "google.protobuf.Timestamp"
26
- optional :output_config, :message, 2, "google.cloud.asset.v1.OutputConfig"
27
- end
28
- add_message "google.cloud.asset.v1.BatchGetAssetsHistoryRequest" do
29
- optional :parent, :string, 1
30
- repeated :asset_names, :string, 2
31
- optional :content_type, :enum, 3, "google.cloud.asset.v1.ContentType"
32
- optional :read_time_window, :message, 4, "google.cloud.asset.v1.TimeWindow"
33
- end
34
- add_message "google.cloud.asset.v1.BatchGetAssetsHistoryResponse" do
35
- repeated :assets, :message, 1, "google.cloud.asset.v1.TemporalAsset"
36
- end
37
- add_message "google.cloud.asset.v1.CreateFeedRequest" do
38
- optional :parent, :string, 1
39
- optional :feed_id, :string, 2
40
- optional :feed, :message, 3, "google.cloud.asset.v1.Feed"
41
- end
42
- add_message "google.cloud.asset.v1.GetFeedRequest" do
43
- optional :name, :string, 1
44
- end
45
- add_message "google.cloud.asset.v1.ListFeedsRequest" do
46
- optional :parent, :string, 1
47
- end
48
- add_message "google.cloud.asset.v1.ListFeedsResponse" do
49
- repeated :feeds, :message, 1, "google.cloud.asset.v1.Feed"
50
- end
51
- add_message "google.cloud.asset.v1.UpdateFeedRequest" do
52
- optional :feed, :message, 1, "google.cloud.asset.v1.Feed"
53
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
54
- end
55
- add_message "google.cloud.asset.v1.DeleteFeedRequest" do
56
- optional :name, :string, 1
57
- end
58
- add_message "google.cloud.asset.v1.OutputConfig" do
59
- oneof :destination do
60
- optional :gcs_destination, :message, 1, "google.cloud.asset.v1.GcsDestination"
61
- optional :bigquery_destination, :message, 2, "google.cloud.asset.v1.BigQueryDestination"
62
- end
63
- end
64
- add_message "google.cloud.asset.v1.GcsDestination" do
65
- oneof :object_uri do
66
- optional :uri, :string, 1
67
- optional :uri_prefix, :string, 2
68
- end
69
- end
70
- add_message "google.cloud.asset.v1.BigQueryDestination" do
71
- optional :dataset, :string, 1
72
- optional :table, :string, 2
73
- optional :force, :bool, 3
74
- end
75
- add_message "google.cloud.asset.v1.PubsubDestination" do
76
- optional :topic, :string, 1
77
- end
78
- add_message "google.cloud.asset.v1.FeedOutputConfig" do
79
- oneof :destination do
80
- optional :pubsub_destination, :message, 1, "google.cloud.asset.v1.PubsubDestination"
81
- end
82
- end
83
- add_message "google.cloud.asset.v1.Feed" do
84
- optional :name, :string, 1
85
- repeated :asset_names, :string, 2
86
- repeated :asset_types, :string, 3
87
- optional :content_type, :enum, 4, "google.cloud.asset.v1.ContentType"
88
- optional :feed_output_config, :message, 5, "google.cloud.asset.v1.FeedOutputConfig"
89
- end
90
- add_enum "google.cloud.asset.v1.ContentType" do
91
- value :CONTENT_TYPE_UNSPECIFIED, 0
92
- value :RESOURCE, 1
93
- value :IAM_POLICY, 2
94
- value :ORG_POLICY, 4
95
- value :ACCESS_POLICY, 5
96
- end
97
- end
98
-
99
- module Google
100
- module Cloud
101
- module Asset
102
- module V1
103
- ExportAssetsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ExportAssetsRequest").msgclass
104
- ExportAssetsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ExportAssetsResponse").msgclass
105
- BatchGetAssetsHistoryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetAssetsHistoryRequest").msgclass
106
- BatchGetAssetsHistoryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetAssetsHistoryResponse").msgclass
107
- CreateFeedRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.CreateFeedRequest").msgclass
108
- GetFeedRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GetFeedRequest").msgclass
109
- ListFeedsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListFeedsRequest").msgclass
110
- ListFeedsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListFeedsResponse").msgclass
111
- UpdateFeedRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.UpdateFeedRequest").msgclass
112
- DeleteFeedRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.DeleteFeedRequest").msgclass
113
- OutputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.OutputConfig").msgclass
114
- GcsDestination = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsDestination").msgclass
115
- BigQueryDestination = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BigQueryDestination").msgclass
116
- PubsubDestination = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PubsubDestination").msgclass
117
- FeedOutputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.FeedOutputConfig").msgclass
118
- Feed = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Feed").msgclass
119
- ContentType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ContentType").enummodule
120
- end
121
- end
122
- end
123
- end
@@ -1,69 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/cloud/asset/v1/asset_service.proto for package 'google.cloud.asset.v1'
3
- # Original file comments:
4
- # Copyright 2019 Google LLC.
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
- #
19
-
20
-
21
- require 'grpc'
22
- require 'google/cloud/asset/v1/asset_service_pb'
23
-
24
- module Google
25
- module Cloud
26
- module Asset
27
- module V1
28
- module AssetService
29
- # Asset service definition.
30
- class Service
31
-
32
- include GRPC::GenericService
33
-
34
- self.marshal_class_method = :encode
35
- self.unmarshal_class_method = :decode
36
- self.service_name = 'google.cloud.asset.v1.AssetService'
37
-
38
- # Exports assets with time and resource types to a given Cloud Storage
39
- # location. The output format is newline-delimited JSON.
40
- # This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
41
- # to keep track of the export.
42
- rpc :ExportAssets, ExportAssetsRequest, Google::Longrunning::Operation
43
- # Batch gets the update history of assets that overlap a time window.
44
- # For RESOURCE content, this API outputs history with asset in both
45
- # non-delete or deleted status.
46
- # For IAM_POLICY content, this API outputs history when the asset and its
47
- # attached IAM POLICY both exist. This can create gaps in the output history.
48
- # If a specified asset does not exist, this API returns an INVALID_ARGUMENT
49
- # error.
50
- rpc :BatchGetAssetsHistory, BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse
51
- # Creates a feed in a parent project/folder/organization to listen to its
52
- # asset updates.
53
- rpc :CreateFeed, CreateFeedRequest, Feed
54
- # Gets details about an asset feed.
55
- rpc :GetFeed, GetFeedRequest, Feed
56
- # Lists all asset feeds in a parent project/folder/organization.
57
- rpc :ListFeeds, ListFeedsRequest, ListFeedsResponse
58
- # Updates an asset feed configuration.
59
- rpc :UpdateFeed, UpdateFeedRequest, Feed
60
- # Deletes an asset feed.
61
- rpc :DeleteFeed, DeleteFeedRequest, Google::Protobuf::Empty
62
- end
63
-
64
- Stub = Service.rpc_stub_class
65
- end
66
- end
67
- end
68
- end
69
- end
@@ -1,51 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/asset/v1/assets.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/resource_pb'
8
- require 'google/iam/v1/policy_pb'
9
- require 'google/protobuf/any_pb'
10
- require 'google/protobuf/struct_pb'
11
- require 'google/protobuf/timestamp_pb'
12
- require 'google/api/annotations_pb'
13
- Google::Protobuf::DescriptorPool.generated_pool.build do
14
- add_message "google.cloud.asset.v1.TemporalAsset" do
15
- optional :window, :message, 1, "google.cloud.asset.v1.TimeWindow"
16
- optional :deleted, :bool, 2
17
- optional :asset, :message, 3, "google.cloud.asset.v1.Asset"
18
- end
19
- add_message "google.cloud.asset.v1.TimeWindow" do
20
- optional :start_time, :message, 1, "google.protobuf.Timestamp"
21
- optional :end_time, :message, 2, "google.protobuf.Timestamp"
22
- end
23
- add_message "google.cloud.asset.v1.Asset" do
24
- optional :name, :string, 1
25
- optional :asset_type, :string, 2
26
- optional :resource, :message, 3, "google.cloud.asset.v1.Resource"
27
- optional :iam_policy, :message, 4, "google.iam.v1.Policy"
28
- repeated :ancestors, :string, 10
29
- end
30
- add_message "google.cloud.asset.v1.Resource" do
31
- optional :version, :string, 1
32
- optional :discovery_document_uri, :string, 2
33
- optional :discovery_name, :string, 3
34
- optional :resource_url, :string, 4
35
- optional :parent, :string, 5
36
- optional :data, :message, 6, "google.protobuf.Struct"
37
- end
38
- end
39
-
40
- module Google
41
- module Cloud
42
- module Asset
43
- module V1
44
- TemporalAsset = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TemporalAsset").msgclass
45
- TimeWindow = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TimeWindow").msgclass
46
- Asset = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Asset").msgclass
47
- Resource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Resource").msgclass
48
- end
49
- end
50
- end
51
- end
@@ -1,41 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- require "googleauth"
17
-
18
- module Google
19
- module Cloud
20
- module Asset
21
- module V1
22
- class Credentials < Google::Auth::Credentials
23
- SCOPE = [
24
- "https://www.googleapis.com/auth/cloud-platform"
25
- ].freeze
26
- PATH_ENV_VARS = %w(ASSET_CREDENTIALS
27
- ASSET_KEYFILE
28
- GOOGLE_CLOUD_CREDENTIALS
29
- GOOGLE_CLOUD_KEYFILE
30
- GCLOUD_KEYFILE)
31
- JSON_ENV_VARS = %w(ASSET_CREDENTIALS_JSON
32
- ASSET_KEYFILE_JSON
33
- GOOGLE_CLOUD_CREDENTIALS_JSON
34
- GOOGLE_CLOUD_KEYFILE_JSON
35
- GCLOUD_KEYFILE_JSON)
36
- DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,295 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Asset
19
- module V1
20
- # Export asset request.
21
- # @!attribute [rw] parent
22
- # @return [String]
23
- # Required. The relative name of the root asset. This can only be an
24
- # organization number (such as "organizations/123"), a project ID (such as
25
- # "projects/my-project-id"), or a project number (such as "projects/12345"),
26
- # or a folder number (such as "folders/123").
27
- # @!attribute [rw] read_time
28
- # @return [Google::Protobuf::Timestamp]
29
- # Timestamp to take an asset snapshot. This can only be set to a timestamp
30
- # between 2018-10-02 UTC (inclusive) and the current time. If not specified,
31
- # the current time will be used. Due to delays in resource data collection
32
- # and indexing, there is a volatile window during which running the same
33
- # query may get different results.
34
- # @!attribute [rw] asset_types
35
- # @return [Array<String>]
36
- # A list of asset types of which to take a snapshot for. For example:
37
- # "compute.googleapis.com/Disk". If specified, only matching assets will be
38
- # returned. See [Introduction to Cloud Asset
39
- # Inventory](https://cloud.google.com/resource-manager-inventory/docs/overview)
40
- # for all supported asset types.
41
- # @!attribute [rw] content_type
42
- # @return [Google::Cloud::Asset::V1::ContentType]
43
- # Asset content type. If not specified, no content but the asset name will be
44
- # returned.
45
- # @!attribute [rw] output_config
46
- # @return [Google::Cloud::Asset::V1::OutputConfig]
47
- # Required. Output configuration indicating where the results will be output
48
- # to. All results will be in newline delimited JSON format.
49
- class ExportAssetsRequest; end
50
-
51
- # The export asset response. This message is returned by the
52
- # {Google::Longrunning::Operations::GetOperation} method in the returned
53
- # {Google::Longrunning::Operation#response} field.
54
- # @!attribute [rw] read_time
55
- # @return [Google::Protobuf::Timestamp]
56
- # Time the snapshot was taken.
57
- # @!attribute [rw] output_config
58
- # @return [Google::Cloud::Asset::V1::OutputConfig]
59
- # Output configuration indicating where the results were output to.
60
- # All results are in JSON format.
61
- class ExportAssetsResponse; end
62
-
63
- # Batch get assets history request.
64
- # @!attribute [rw] parent
65
- # @return [String]
66
- # Required. The relative name of the root asset. It can only be an
67
- # organization number (such as "organizations/123"), a project ID (such as
68
- # "projects/my-project-id")", or a project number (such as "projects/12345").
69
- # @!attribute [rw] asset_names
70
- # @return [Array<String>]
71
- # A list of the full names of the assets. For example:
72
- # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
73
- # See [Resource
74
- # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
75
- # and [Resource Name
76
- # Format](https://cloud.google.com/resource-manager-inventory/docs/resource-name-format)
77
- # for more info.
78
- #
79
- # The request becomes a no-op if the asset name list is empty, and the max
80
- # size of the asset name list is 100 in one request.
81
- # @!attribute [rw] content_type
82
- # @return [Google::Cloud::Asset::V1::ContentType]
83
- # Optional. The content type.
84
- # @!attribute [rw] read_time_window
85
- # @return [Google::Cloud::Asset::V1::TimeWindow]
86
- # Optional. The time window for the asset history. Both start_time and
87
- # end_time are optional and if set, it must be after 2018-10-02 UTC. If
88
- # end_time is not set, it is default to current timestamp. If start_time is
89
- # not set, the snapshot of the assets at end_time will be returned. The
90
- # returned results contain all temporal assets whose time window overlap with
91
- # read_time_window.
92
- class BatchGetAssetsHistoryRequest; end
93
-
94
- # Batch get assets history response.
95
- # @!attribute [rw] assets
96
- # @return [Array<Google::Cloud::Asset::V1::TemporalAsset>]
97
- # A list of assets with valid time windows.
98
- class BatchGetAssetsHistoryResponse; end
99
-
100
- # Create asset feed request.
101
- # @!attribute [rw] parent
102
- # @return [String]
103
- # Required. The name of the project/folder/organization where this feed
104
- # should be created in. It can only be an organization number (such as
105
- # "organizations/123"), a folder number (such as "folders/123"), a project ID
106
- # (such as "projects/my-project-id")", or a project number (such as
107
- # "projects/12345").
108
- # @!attribute [rw] feed_id
109
- # @return [String]
110
- # Required. This is the client-assigned asset feed identifier and it needs to
111
- # be unique under a specific parent project/folder/organization.
112
- # @!attribute [rw] feed
113
- # @return [Google::Cloud::Asset::V1::Feed]
114
- # Required. The feed details. The field `name` must be empty and it will be generated
115
- # in the format of:
116
- # projects/project_number/feeds/feed_id
117
- # folders/folder_number/feeds/feed_id
118
- # organizations/organization_number/feeds/feed_id
119
- class CreateFeedRequest; end
120
-
121
- # Get asset feed request.
122
- # @!attribute [rw] name
123
- # @return [String]
124
- # Required. The name of the Feed and it must be in the format of:
125
- # projects/project_number/feeds/feed_id
126
- # folders/folder_number/feeds/feed_id
127
- # organizations/organization_number/feeds/feed_id
128
- class GetFeedRequest; end
129
-
130
- # List asset feeds request.
131
- # @!attribute [rw] parent
132
- # @return [String]
133
- # Required. The parent project/folder/organization whose feeds are to be
134
- # listed. It can only be using project/folder/organization number (such as
135
- # "folders/12345")", or a project ID (such as "projects/my-project-id").
136
- class ListFeedsRequest; end
137
-
138
- # @!attribute [rw] feeds
139
- # @return [Array<Google::Cloud::Asset::V1::Feed>]
140
- # A list of feeds.
141
- class ListFeedsResponse; end
142
-
143
- # Update asset feed request.
144
- # @!attribute [rw] feed
145
- # @return [Google::Cloud::Asset::V1::Feed]
146
- # Required. The new values of feed details. It must match an existing feed and the
147
- # field `name` must be in the format of:
148
- # projects/project_number/feeds/feed_id or
149
- # folders/folder_number/feeds/feed_id or
150
- # organizations/organization_number/feeds/feed_id.
151
- # @!attribute [rw] update_mask
152
- # @return [Google::Protobuf::FieldMask]
153
- # Required. Only updates the `feed` fields indicated by this mask.
154
- # The field mask must not be empty, and it must not contain fields that
155
- # are immutable or only set by the server.
156
- class UpdateFeedRequest; end
157
-
158
- # @!attribute [rw] name
159
- # @return [String]
160
- # Required. The name of the feed and it must be in the format of:
161
- # projects/project_number/feeds/feed_id
162
- # folders/folder_number/feeds/feed_id
163
- # organizations/organization_number/feeds/feed_id
164
- class DeleteFeedRequest; end
165
-
166
- # Output configuration for export assets destination.
167
- # @!attribute [rw] gcs_destination
168
- # @return [Google::Cloud::Asset::V1::GcsDestination]
169
- # Destination on Cloud Storage.
170
- # @!attribute [rw] bigquery_destination
171
- # @return [Google::Cloud::Asset::V1::BigQueryDestination]
172
- # Destination on BigQuery. The output table stores the fields in asset
173
- # proto as columns in BigQuery. The resource/iam_policy field is converted
174
- # to a record with each field to a column, except metadata to a single JSON
175
- # string.
176
- class OutputConfig; end
177
-
178
- # A Cloud Storage location.
179
- # @!attribute [rw] uri
180
- # @return [String]
181
- # The uri of the Cloud Storage object. It's the same uri that is used by
182
- # gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
183
- # Editing Object
184
- # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
185
- # for more information.
186
- # @!attribute [rw] uri_prefix
187
- # @return [String]
188
- # The uri prefix of all generated Cloud Storage objects. For example:
189
- # "gs://bucket_name/object_name_prefix". Each object uri is in format:
190
- # "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
191
- # contains assets for that type. <shard number> starts from 0. For example:
192
- # "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
193
- # the first shard of output objects containing all
194
- # compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
195
- # returned if file with the same name "gs://bucket_name/object_name_prefix"
196
- # already exists.
197
- class GcsDestination; end
198
-
199
- # A BigQuery destination.
200
- # @!attribute [rw] dataset
201
- # @return [String]
202
- # Required. The BigQuery dataset in format
203
- # "projects/projectId/datasets/datasetId", to which the snapshot result
204
- # should be exported. If this dataset does not exist, the export call returns
205
- # an error.
206
- # @!attribute [rw] table
207
- # @return [String]
208
- # Required. The BigQuery table to which the snapshot result should be
209
- # written. If this table does not exist, a new table with the given name
210
- # will be created.
211
- # @!attribute [rw] force
212
- # @return [true, false]
213
- # If the destination table already exists and this flag is `TRUE`, the
214
- # table will be overwritten by the contents of assets snapshot. If the flag
215
- # is not set and the destination table already exists, the export call
216
- # returns an error.
217
- class BigQueryDestination; end
218
-
219
- # A Cloud Pubsub destination.
220
- # @!attribute [rw] topic
221
- # @return [String]
222
- # The name of the Cloud Pub/Sub topic to publish to.
223
- # For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
224
- class PubsubDestination; end
225
-
226
- # Output configuration for asset feed destination.
227
- # @!attribute [rw] pubsub_destination
228
- # @return [Google::Cloud::Asset::V1::PubsubDestination]
229
- # Destination on Cloud Pubsub.
230
- class FeedOutputConfig; end
231
-
232
- # An asset feed used to export asset updates to a destinations.
233
- # An asset feed filter controls what updates are exported.
234
- # The asset feed must be created within a project, organization, or
235
- # folder. Supported destinations are:
236
- # Cloud Pub/Sub topics.
237
- # @!attribute [rw] name
238
- # @return [String]
239
- # Required. The format will be
240
- # projects/\\{project_number}/feeds/{client-assigned_feed_identifier} or
241
- # folders/\\{folder_number}/feeds/{client-assigned_feed_identifier} or
242
- # organizations/\\{organization_number}/feeds/{client-assigned_feed_identifier}
243
- #
244
- # The client-assigned feed identifier must be unique within the parent
245
- # project/folder/organization.
246
- # @!attribute [rw] asset_names
247
- # @return [Array<String>]
248
- # A list of the full names of the assets to receive updates. You must specify
249
- # either or both of asset_names and asset_types. Only asset updates matching
250
- # specified asset_names and asset_types are exported to the feed. For
251
- # example:
252
- # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
253
- # See [Resource
254
- # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
255
- # for more info.
256
- # @!attribute [rw] asset_types
257
- # @return [Array<String>]
258
- # A list of types of the assets to receive updates. You must specify either
259
- # or both of asset_names and asset_types. Only asset updates matching
260
- # specified asset_names and asset_types are exported to the feed.
261
- # For example:
262
- # "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
263
- # Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
264
- # for all supported asset types.
265
- # @!attribute [rw] content_type
266
- # @return [Google::Cloud::Asset::V1::ContentType]
267
- # Asset content type. If not specified, no content but the asset name and
268
- # type will be returned.
269
- # @!attribute [rw] feed_output_config
270
- # @return [Google::Cloud::Asset::V1::FeedOutputConfig]
271
- # Required. Feed output configuration defining where the asset updates are
272
- # published to.
273
- class Feed; end
274
-
275
- # Asset content type.
276
- module ContentType
277
- # Unspecified content type.
278
- CONTENT_TYPE_UNSPECIFIED = 0
279
-
280
- # Resource metadata.
281
- RESOURCE = 1
282
-
283
- # The actual IAM policy set on a resource.
284
- IAM_POLICY = 2
285
-
286
- # The Cloud Organization Policy set on an asset.
287
- ORG_POLICY = 4
288
-
289
- # The Cloud Access context mananger Policy set on an asset.
290
- ACCESS_POLICY = 5
291
- end
292
- end
293
- end
294
- end
295
- end