asset.proto 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. // Copyright 2021 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. syntax = "proto3";
  15. package google.cloud.securitycenter.v1;
  16. import "google/api/resource.proto";
  17. import "google/cloud/securitycenter/v1/folder.proto";
  18. import "google/cloud/securitycenter/v1/security_marks.proto";
  19. import "google/protobuf/struct.proto";
  20. import "google/protobuf/timestamp.proto";
  21. import "google/api/annotations.proto";
  22. option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
  23. option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
  24. option java_multiple_files = true;
  25. option java_package = "com.google.cloud.securitycenter.v1";
  26. option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
  27. option ruby_package = "Google::Cloud::SecurityCenter::V1";
  28. // Security Command Center representation of a Google Cloud
  29. // resource.
  30. //
  31. // The Asset is a Security Command Center resource that captures information
  32. // about a single Google Cloud resource. All modifications to an Asset are only
  33. // within the context of Security Command Center and don't affect the referenced
  34. // Google Cloud resource.
  35. message Asset {
  36. option (google.api.resource) = {
  37. type: "securitycenter.googleapis.com/Asset"
  38. pattern: "organizations/{organization}/assets/{asset}"
  39. pattern: "folders/{folder}/assets/{asset}"
  40. pattern: "projects/{project}/assets/{asset}"
  41. };
  42. // Security Command Center managed properties. These properties are managed by
  43. // Security Command Center and cannot be modified by the user.
  44. message SecurityCenterProperties {
  45. // The full resource name of the Google Cloud resource this asset
  46. // represents. This field is immutable after create time. See:
  47. // https://cloud.google.com/apis/design/resource_names#full_resource_name
  48. string resource_name = 1;
  49. // The type of the Google Cloud resource. Examples include: APPLICATION,
  50. // PROJECT, and ORGANIZATION. This is a case insensitive field defined by
  51. // Security Command Center and/or the producer of the resource and is
  52. // immutable after create time.
  53. string resource_type = 2;
  54. // The full resource name of the immediate parent of the resource. See:
  55. // https://cloud.google.com/apis/design/resource_names#full_resource_name
  56. string resource_parent = 3;
  57. // The full resource name of the project the resource belongs to. See:
  58. // https://cloud.google.com/apis/design/resource_names#full_resource_name
  59. string resource_project = 4;
  60. // Owners of the Google Cloud resource.
  61. repeated string resource_owners = 5;
  62. // The user defined display name for this resource.
  63. string resource_display_name = 6;
  64. // The user defined display name for the parent of this resource.
  65. string resource_parent_display_name = 7;
  66. // The user defined display name for the project of this resource.
  67. string resource_project_display_name = 8;
  68. // Contains a Folder message for each folder in the assets ancestry.
  69. // The first folder is the deepest nested folder, and the last folder is the
  70. // folder directly under the Organization.
  71. repeated Folder folders = 10;
  72. }
  73. // Cloud IAM Policy information associated with the Google Cloud resource
  74. // described by the Security Command Center asset. This information is managed
  75. // and defined by the Google Cloud resource and cannot be modified by the
  76. // user.
  77. message IamPolicy {
  78. // The JSON representation of the Policy associated with the asset.
  79. // See https://cloud.google.com/iam/reference/rest/v1/Policy for format
  80. // details.
  81. string policy_blob = 1;
  82. }
  83. // The relative resource name of this asset. See:
  84. // https://cloud.google.com/apis/design/resource_names#relative_resource_name
  85. // Example:
  86. // "organizations/{organization_id}/assets/{asset_id}".
  87. string name = 1;
  88. // Security Command Center managed properties. These properties are managed by
  89. // Security Command Center and cannot be modified by the user.
  90. SecurityCenterProperties security_center_properties = 2;
  91. // Resource managed properties. These properties are managed and defined by
  92. // the Google Cloud resource and cannot be modified by the user.
  93. map<string, google.protobuf.Value> resource_properties = 7;
  94. // User specified security marks. These marks are entirely managed by the user
  95. // and come from the SecurityMarks resource that belongs to the asset.
  96. SecurityMarks security_marks = 8;
  97. // The time at which the asset was created in Security Command Center.
  98. google.protobuf.Timestamp create_time = 9;
  99. // The time at which the asset was last updated or added in Cloud SCC.
  100. google.protobuf.Timestamp update_time = 10;
  101. // Cloud IAM Policy information associated with the Google Cloud resource
  102. // described by the Security Command Center asset. This information is managed
  103. // and defined by the Google Cloud resource and cannot be modified by the
  104. // user.
  105. IamPolicy iam_policy = 11;
  106. // The canonical name of the resource. It's either
  107. // "organizations/{organization_id}/assets/{asset_id}",
  108. // "folders/{folder_id}/assets/{asset_id}" or
  109. // "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
  110. // ancestor of the resource.
  111. string canonical_name = 13;
  112. }