assets.proto 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // Copyright 2020 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.asset.v1p1beta1;
  16. import "google/iam/v1/policy.proto";
  17. import "google/api/annotations.proto";
  18. option cc_enable_arenas = true;
  19. option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "AssetProto";
  23. option java_package = "com.google.cloud.asset.v1p1beta1";
  24. option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1";
  25. // The standard metadata of a cloud resource.
  26. message StandardResourceMetadata {
  27. // The full resource name. For example:
  28. // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
  29. // See [Resource
  30. // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  31. // for more information.
  32. string name = 1;
  33. // The type of this resource.
  34. // For example: "compute.googleapis.com/Disk".
  35. string asset_type = 2;
  36. // The project that this resource belongs to, in the form of
  37. // `projects/{project_number}`.
  38. string project = 3;
  39. // The display name of this resource.
  40. string display_name = 4;
  41. // One or more paragraphs of text description of this resource. Maximum length
  42. // could be up to 1M bytes.
  43. string description = 5;
  44. // Additional searchable attributes of this resource.
  45. // Informational only. The exact set of attributes is subject to change.
  46. // For example: project id, DNS name etc.
  47. repeated string additional_attributes = 10;
  48. // Location can be "global", regional like "us-east1", or zonal like
  49. // "us-west1-b".
  50. string location = 11;
  51. // Labels associated with this resource. See [Labelling and grouping GCP
  52. // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
  53. // for more information.
  54. map<string, string> labels = 12;
  55. // Network tags associated with this resource. Like labels, network tags are a
  56. // type of annotations used to group GCP resources. See [Labelling GCP
  57. // resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
  58. // for more information.
  59. repeated string network_tags = 13;
  60. }
  61. // The result for a IAM Policy search.
  62. message IamPolicySearchResult {
  63. // Explanation about the IAM policy search result.
  64. message Explanation {
  65. // The map from roles to their included permission matching the permission
  66. // query (e.g. containing `policy.role.permissions:`). A sample role string:
  67. // "roles/compute.instanceAdmin". The roles can also be found in the
  68. // returned `policy` bindings. Note that the map is populated only if
  69. // requesting with a permission query.
  70. map<string, Permissions> matched_permissions = 1;
  71. }
  72. // The [full resource
  73. // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  74. // of the resource associated with this IAM policy.
  75. string resource = 1;
  76. // The project that the associated GCP resource belongs to, in the form of
  77. // `projects/{project_number}`. If an IAM policy is set on a resource (like VM
  78. // instance, Cloud Storage bucket), the project field will indicate the
  79. // project that contains the resource. If an IAM policy is set on a folder or
  80. // orgnization, the project field will be empty.
  81. string project = 3;
  82. // The IAM policy directly set on the given resource. Note that the original
  83. // IAM policy can contain multiple bindings. This only contains the bindings
  84. // that match the given query. For queries that don't contain a constrain on
  85. // policies (e.g. an empty query), this contains all the bindings.
  86. google.iam.v1.Policy policy = 4;
  87. // Explanation about the IAM policy search result. It contains additional
  88. // information to explain why the search result matches the query.
  89. Explanation explanation = 5;
  90. }
  91. // IAM permissions
  92. message Permissions {
  93. // A list of permissions. A sample permission string: "compute.disk.get".
  94. repeated string permissions = 1;
  95. }