assets.proto 4.5 KB

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