xref: /aosp_15_r20/external/googleapis/google/cloud/securitycenter/v2/security_marks.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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//     http://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
15syntax = "proto3";
16
17package google.cloud.securitycenter.v2;
18
19import "google/api/resource.proto";
20
21option csharp_namespace = "Google.Cloud.SecurityCenter.V2";
22option go_package = "cloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb";
23option java_multiple_files = true;
24option java_outer_classname = "SecurityMarksProto";
25option java_package = "com.google.cloud.securitycenter.v2";
26option php_namespace = "Google\\Cloud\\SecurityCenter\\V2";
27option ruby_package = "Google::Cloud::SecurityCenter::V2";
28
29// User specified security marks that are attached to the parent Security
30// Command Center resource. Security marks are scoped within a Security Command
31// Center organization -- they can be modified and viewed by all users who have
32// proper permissions on the organization.
33message SecurityMarks {
34  option (google.api.resource) = {
35    type: "securitycenter.googleapis.com/SecurityMarks"
36    pattern: "organizations/{organization}/assets/{asset}/securityMarks"
37    pattern: "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks"
38    pattern: "organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks"
39    pattern: "folders/{folder}/assets/{asset}/securityMarks"
40    pattern: "folders/{folder}/sources/{source}/findings/{finding}/securityMarks"
41    pattern: "folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks"
42    pattern: "projects/{project}/assets/{asset}/securityMarks"
43    pattern: "projects/{project}/sources/{source}/findings/{finding}/securityMarks"
44    pattern: "projects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarks"
45  };
46
47  // The relative resource name of the SecurityMarks. See:
48  // https://cloud.google.com/apis/design/resource_names#relative_resource_name
49  // The following list shows some examples:
50  //
51  // + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
52  // +
53  // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
54  // +
55  // `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
56  string name = 1;
57
58  // Mutable user specified security marks belonging to the parent resource.
59  // Constraints are as follows:
60  //
61  //   * Keys and values are treated as case insensitive
62  //   * Keys must be between 1 - 256 characters (inclusive)
63  //   * Keys must be letters, numbers, underscores, or dashes
64  //   * Values have leading and trailing whitespace trimmed, remaining
65  //     characters must be between 1 - 4096 characters (inclusive)
66  map<string, string> marks = 2;
67
68  // The canonical name of the marks. The following list shows some examples:
69  //
70  // + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
71  // +
72  // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
73  // +
74  // `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
75  // + `folders/{folder_id}/assets/{asset_id}/securityMarks`
76  // +
77  // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
78  // +
79  // `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
80  // + `projects/{project_number}/assets/{asset_id}/securityMarks`
81  // +
82  // `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
83  // +
84  // `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
85  string canonical_name = 3;
86}
87