• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/securitycenter/v1/security_health_analytics_custom_config.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
25option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb";
26option java_multiple_files = true;
27option java_outer_classname = "SecurityHealthAnalyticsCustomModuleProto";
28option java_package = "com.google.cloud.securitycenter.v1";
29option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
30option ruby_package = "Google::Cloud::SecurityCenter::V1";
31option (google.api.resource_definition) = {
32  type: "securitycenter.googleapis.com/SecurityHealthAnalyticsSettings"
33  pattern: "organizations/{organization}/securityHealthAnalyticsSettings"
34  pattern: "folders/{folder}/securityHealthAnalyticsSettings"
35  pattern: "projects/{project}/securityHealthAnalyticsSettings"
36};
37
38// Represents an instance of a Security Health Analytics custom module,
39// including its full module name, display name, enablement state, and last
40// updated time. You can create a custom module at the organization, folder, or
41// project level. Custom modules that you create at the organization or folder
42// level are inherited by the child folders and projects.
43message SecurityHealthAnalyticsCustomModule {
44  option (google.api.resource) = {
45    type: "securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule"
46    pattern: "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{custom_module}"
47    pattern: "folders/{folder}/securityHealthAnalyticsSettings/customModules/{custom_module}"
48    pattern: "projects/{project}/securityHealthAnalyticsSettings/customModules/{custom_module}"
49  };
50
51  // Possible enablement states of a custom module.
52  enum EnablementState {
53    // Unspecified enablement state.
54    ENABLEMENT_STATE_UNSPECIFIED = 0;
55
56    // The module is enabled at the given CRM resource.
57    ENABLED = 1;
58
59    // The module is disabled at the given CRM resource.
60    DISABLED = 2;
61
62    // State is inherited from an ancestor module. The module will either
63    // be effectively ENABLED or DISABLED based on its closest non-inherited
64    // ancestor module in the CRM hierarchy.
65    INHERITED = 3;
66  }
67
68  // Immutable. The resource name of the custom module.
69  // Its format is
70  // "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}",
71  // or
72  // "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}",
73  // or
74  // "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}"
75  //
76  // The id {customModule} is server-generated and is not user settable.
77  // It will be a numeric id containing 1-20 digits.
78  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
79
80  // The display name of the Security Health Analytics custom module. This
81  // display name becomes the finding category for all findings that are
82  // returned by this custom module. The display name must be between 1 and
83  // 128 characters, start with a lowercase letter, and contain alphanumeric
84  // characters or underscores only.
85  string display_name = 2;
86
87  // The enablement state of the custom module.
88  EnablementState enablement_state = 4;
89
90  // Output only. The time at which the custom module was last updated.
91  google.protobuf.Timestamp update_time = 5
92      [(google.api.field_behavior) = OUTPUT_ONLY];
93
94  // Output only. The editor that last updated the custom module.
95  string last_editor = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
96
97  // Output only. If empty, indicates that the custom module was created in the
98  // organization, folder, or project in which you are viewing the custom
99  // module. Otherwise, `ancestor_module` specifies the organization or folder
100  // from which the custom module is inherited.
101  string ancestor_module = 7 [
102    (google.api.field_behavior) = OUTPUT_ONLY,
103    (google.api.resource_reference) = {
104      type: "securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule"
105    }
106  ];
107
108  // The user specified custom configuration for the module.
109  CustomConfig custom_config = 8;
110}
111