1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.cloud.asset.v1;
20 import "google/api/annotations.proto";
21 import "google/iam/v1/policy.proto";
22 import "google/protobuf/any.proto";
23 import "google/protobuf/struct.proto";
24 import "google/protobuf/timestamp.proto";
26 option csharp_namespace = "Google.Cloud.Asset.V1";
27 option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset";
28 option java_multiple_files = true;
29 option java_outer_classname = "AssetProto";
30 option java_package = "com.google.cloud.asset.v1";
31 option php_namespace = "Google\\Cloud\\Asset\\V1";
34 // Temporal asset. In addition to the asset, the temporal asset includes the
35 // status of the asset and valid from and to time of it.
36 message TemporalAsset {
37 // The time window when the asset data and state was observed.
38 TimeWindow window = 1;
40 // If the asset is deleted or not.
47 // A time window of (start_time, end_time].
49 // Start time of the time window (exclusive).
50 google.protobuf.Timestamp start_time = 1;
52 // End time of the time window (inclusive).
53 // Current timestamp if not specified.
54 google.protobuf.Timestamp end_time = 2;
57 // Cloud asset. This includes all Google Cloud Platform resources,
58 // Cloud IAM policies, and other non-GCP assets.
60 // The full name of the asset. For example:
61 // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
63 // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
64 // for more information.
67 // Type of the asset. Example: "compute.googleapis.com/Disk".
68 string asset_type = 2;
70 // Representation of the resource.
71 Resource resource = 3;
73 // Representation of the actual Cloud IAM policy set on a cloud resource. For
74 // each resource, there must be at most one Cloud IAM policy set on it.
75 google.iam.v1.Policy iam_policy = 4;
78 // Representation of a cloud resource.
80 // The API version. Example: "v1".
83 // The URL of the discovery document containing the resource's JSON schema.
85 // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
86 // It will be left unspecified for resources without a discovery-based API,
87 // such as Cloud Bigtable.
88 string discovery_document_uri = 2;
90 // The JSON schema name listed in the discovery document.
91 // Example: "Project". It will be left unspecified for resources (such as
92 // Cloud Bigtable) without a discovery-based API.
93 string discovery_name = 3;
95 // The REST URL for accessing the resource. An HTTP GET operation using this
96 // URL returns the resource itself.
98 // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
99 // It will be left unspecified for resources without a REST API.
100 string resource_url = 4;
102 // The full name of the immediate parent of this resource. See
104 // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
105 // for more information.
107 // For GCP assets, it is the parent resource defined in the [Cloud IAM policy
108 // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
110 // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
112 // For third-party assets, it is up to the users to define.
115 // The content of the resource, in which some sensitive fields are scrubbed
116 // away and may not be present.
117 google.protobuf.Struct data = 6;