asset.proto 5.6 KB

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