xref: /aosp_15_r20/external/googleapis/google/cloud/securitycenter/v1/asset.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.securitycenter.v1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/securitycenter/v1/folder.proto";
21*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/securitycenter/v1/security_marks.proto";
22*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/struct.proto";
23*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto";
24*d5c09012SAndroid Build Coastguard Worker
25*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.SecurityCenter.V1";
26*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb";
27*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
28*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.securitycenter.v1";
29*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
30*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::SecurityCenter::V1";
31*d5c09012SAndroid Build Coastguard Worker
32*d5c09012SAndroid Build Coastguard Worker// Security Command Center representation of a Google Cloud
33*d5c09012SAndroid Build Coastguard Worker// resource.
34*d5c09012SAndroid Build Coastguard Worker//
35*d5c09012SAndroid Build Coastguard Worker// The Asset is a Security Command Center resource that captures information
36*d5c09012SAndroid Build Coastguard Worker// about a single Google Cloud resource. All modifications to an Asset are only
37*d5c09012SAndroid Build Coastguard Worker// within the context of Security Command Center and don't affect the referenced
38*d5c09012SAndroid Build Coastguard Worker// Google Cloud resource.
39*d5c09012SAndroid Build Coastguard Workermessage Asset {
40*d5c09012SAndroid Build Coastguard Worker  option (google.api.resource) = {
41*d5c09012SAndroid Build Coastguard Worker    type: "securitycenter.googleapis.com/Asset"
42*d5c09012SAndroid Build Coastguard Worker    pattern: "organizations/{organization}/assets/{asset}"
43*d5c09012SAndroid Build Coastguard Worker    pattern: "folders/{folder}/assets/{asset}"
44*d5c09012SAndroid Build Coastguard Worker    pattern: "projects/{project}/assets/{asset}"
45*d5c09012SAndroid Build Coastguard Worker  };
46*d5c09012SAndroid Build Coastguard Worker
47*d5c09012SAndroid Build Coastguard Worker  // Security Command Center managed properties. These properties are managed by
48*d5c09012SAndroid Build Coastguard Worker  // Security Command Center and cannot be modified by the user.
49*d5c09012SAndroid Build Coastguard Worker  message SecurityCenterProperties {
50*d5c09012SAndroid Build Coastguard Worker    // The full resource name of the Google Cloud resource this asset
51*d5c09012SAndroid Build Coastguard Worker    // represents. This field is immutable after create time. See:
52*d5c09012SAndroid Build Coastguard Worker    // https://cloud.google.com/apis/design/resource_names#full_resource_name
53*d5c09012SAndroid Build Coastguard Worker    string resource_name = 1;
54*d5c09012SAndroid Build Coastguard Worker
55*d5c09012SAndroid Build Coastguard Worker    // The type of the Google Cloud resource. Examples include: APPLICATION,
56*d5c09012SAndroid Build Coastguard Worker    // PROJECT, and ORGANIZATION. This is a case insensitive field defined by
57*d5c09012SAndroid Build Coastguard Worker    // Security Command Center and/or the producer of the resource and is
58*d5c09012SAndroid Build Coastguard Worker    // immutable after create time.
59*d5c09012SAndroid Build Coastguard Worker    string resource_type = 2;
60*d5c09012SAndroid Build Coastguard Worker
61*d5c09012SAndroid Build Coastguard Worker    // The full resource name of the immediate parent of the resource. See:
62*d5c09012SAndroid Build Coastguard Worker    // https://cloud.google.com/apis/design/resource_names#full_resource_name
63*d5c09012SAndroid Build Coastguard Worker    string resource_parent = 3;
64*d5c09012SAndroid Build Coastguard Worker
65*d5c09012SAndroid Build Coastguard Worker    // The full resource name of the project the resource belongs to. See:
66*d5c09012SAndroid Build Coastguard Worker    // https://cloud.google.com/apis/design/resource_names#full_resource_name
67*d5c09012SAndroid Build Coastguard Worker    string resource_project = 4;
68*d5c09012SAndroid Build Coastguard Worker
69*d5c09012SAndroid Build Coastguard Worker    // Owners of the Google Cloud resource.
70*d5c09012SAndroid Build Coastguard Worker    repeated string resource_owners = 5;
71*d5c09012SAndroid Build Coastguard Worker
72*d5c09012SAndroid Build Coastguard Worker    // The user defined display name for this resource.
73*d5c09012SAndroid Build Coastguard Worker    string resource_display_name = 6;
74*d5c09012SAndroid Build Coastguard Worker
75*d5c09012SAndroid Build Coastguard Worker    // The user defined display name for the parent of this resource.
76*d5c09012SAndroid Build Coastguard Worker    string resource_parent_display_name = 7;
77*d5c09012SAndroid Build Coastguard Worker
78*d5c09012SAndroid Build Coastguard Worker    // The user defined display name for the project of this resource.
79*d5c09012SAndroid Build Coastguard Worker    string resource_project_display_name = 8;
80*d5c09012SAndroid Build Coastguard Worker
81*d5c09012SAndroid Build Coastguard Worker    // Contains a Folder message for each folder in the assets ancestry.
82*d5c09012SAndroid Build Coastguard Worker    // The first folder is the deepest nested folder, and the last folder is the
83*d5c09012SAndroid Build Coastguard Worker    // folder directly under the Organization.
84*d5c09012SAndroid Build Coastguard Worker    repeated Folder folders = 10;
85*d5c09012SAndroid Build Coastguard Worker  }
86*d5c09012SAndroid Build Coastguard Worker
87*d5c09012SAndroid Build Coastguard Worker  // Cloud IAM Policy information associated with the Google Cloud resource
88*d5c09012SAndroid Build Coastguard Worker  // described by the Security Command Center asset. This information is managed
89*d5c09012SAndroid Build Coastguard Worker  // and defined by the Google Cloud resource and cannot be modified by the
90*d5c09012SAndroid Build Coastguard Worker  // user.
91*d5c09012SAndroid Build Coastguard Worker  message IamPolicy {
92*d5c09012SAndroid Build Coastguard Worker    // The JSON representation of the Policy associated with the asset.
93*d5c09012SAndroid Build Coastguard Worker    // See https://cloud.google.com/iam/reference/rest/v1/Policy for format
94*d5c09012SAndroid Build Coastguard Worker    // details.
95*d5c09012SAndroid Build Coastguard Worker    string policy_blob = 1;
96*d5c09012SAndroid Build Coastguard Worker  }
97*d5c09012SAndroid Build Coastguard Worker
98*d5c09012SAndroid Build Coastguard Worker  // The relative resource name of this asset. See:
99*d5c09012SAndroid Build Coastguard Worker  // https://cloud.google.com/apis/design/resource_names#relative_resource_name
100*d5c09012SAndroid Build Coastguard Worker  // Example:
101*d5c09012SAndroid Build Coastguard Worker  // "organizations/{organization_id}/assets/{asset_id}".
102*d5c09012SAndroid Build Coastguard Worker  string name = 1;
103*d5c09012SAndroid Build Coastguard Worker
104*d5c09012SAndroid Build Coastguard Worker  // Security Command Center managed properties. These properties are managed by
105*d5c09012SAndroid Build Coastguard Worker  // Security Command Center and cannot be modified by the user.
106*d5c09012SAndroid Build Coastguard Worker  SecurityCenterProperties security_center_properties = 2;
107*d5c09012SAndroid Build Coastguard Worker
108*d5c09012SAndroid Build Coastguard Worker  // Resource managed properties. These properties are managed and defined by
109*d5c09012SAndroid Build Coastguard Worker  // the Google Cloud resource and cannot be modified by the user.
110*d5c09012SAndroid Build Coastguard Worker  map<string, google.protobuf.Value> resource_properties = 7;
111*d5c09012SAndroid Build Coastguard Worker
112*d5c09012SAndroid Build Coastguard Worker  // User specified security marks. These marks are entirely managed by the user
113*d5c09012SAndroid Build Coastguard Worker  // and come from the SecurityMarks resource that belongs to the asset.
114*d5c09012SAndroid Build Coastguard Worker  SecurityMarks security_marks = 8;
115*d5c09012SAndroid Build Coastguard Worker
116*d5c09012SAndroid Build Coastguard Worker  // The time at which the asset was created in Security Command Center.
117*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Timestamp create_time = 9;
118*d5c09012SAndroid Build Coastguard Worker
119*d5c09012SAndroid Build Coastguard Worker  // The time at which the asset was last updated or added in Cloud SCC.
120*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Timestamp update_time = 10;
121*d5c09012SAndroid Build Coastguard Worker
122*d5c09012SAndroid Build Coastguard Worker  // Cloud IAM Policy information associated with the Google Cloud resource
123*d5c09012SAndroid Build Coastguard Worker  // described by the Security Command Center asset. This information is managed
124*d5c09012SAndroid Build Coastguard Worker  // and defined by the Google Cloud resource and cannot be modified by the
125*d5c09012SAndroid Build Coastguard Worker  // user.
126*d5c09012SAndroid Build Coastguard Worker  IamPolicy iam_policy = 11;
127*d5c09012SAndroid Build Coastguard Worker
128*d5c09012SAndroid Build Coastguard Worker  // The canonical name of the resource. It's either
129*d5c09012SAndroid Build Coastguard Worker  // "organizations/{organization_id}/assets/{asset_id}",
130*d5c09012SAndroid Build Coastguard Worker  // "folders/{folder_id}/assets/{asset_id}" or
131*d5c09012SAndroid Build Coastguard Worker  // "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
132*d5c09012SAndroid Build Coastguard Worker  // ancestor of the resource.
133*d5c09012SAndroid Build Coastguard Worker  string canonical_name = 13;
134*d5c09012SAndroid Build Coastguard Worker}
135