managed_identities_service.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. // Copyright 2019 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. //
  15. syntax = "proto3";
  16. package google.cloud.managedidentities.v1beta1;
  17. import "google/api/annotations.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/cloud/managedidentities/v1beta1/resource.proto";
  20. import "google/longrunning/operations.proto";
  21. import "google/protobuf/field_mask.proto";
  22. import "google/protobuf/timestamp.proto";
  23. import "google/api/client.proto";
  24. option csharp_namespace = "Google.Cloud.ManagedIdentities.V1Beta1";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/managedidentities/v1beta1;managedidentities";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "ManagedIdentitiesServiceProto";
  28. option java_package = "com.google.cloud.managedidentities.v1beta1";
  29. option objc_class_prefix = "GCMI";
  30. option php_namespace = "Google\\Cloud\\ManagedIdentities\\V1beta1";
  31. option ruby_package = "Google::Cloud::ManagedIdentities::V1beta1";
  32. service ManagedIdentitiesService {
  33. option (google.api.default_host) = "managedidentities.googleapis.com";
  34. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  35. // Creates a Microsoft AD domain.
  36. rpc CreateMicrosoftAdDomain(CreateMicrosoftAdDomainRequest) returns (google.longrunning.Operation) {
  37. option (google.api.http) = {
  38. post: "/v1beta1/{parent=projects/*/locations/global}/domains"
  39. body: "domain"
  40. };
  41. option (google.longrunning.operation_info) = {
  42. response_type: "Domain"
  43. metadata_type: "OpMetadata"
  44. };
  45. }
  46. // Resets a domain's administrator password.
  47. rpc ResetAdminPassword(ResetAdminPasswordRequest) returns (ResetAdminPasswordResponse) {
  48. option (google.api.http) = {
  49. post: "/v1beta1/{name=projects/*/locations/global/domains/*}:resetAdminPassword"
  50. body: "*"
  51. };
  52. }
  53. // Lists domains in a project.
  54. rpc ListDomains(ListDomainsRequest) returns (ListDomainsResponse) {
  55. option (google.api.http) = {
  56. get: "/v1beta1/{parent=projects/*/locations/global}/domains"
  57. };
  58. }
  59. // Gets information about a domain.
  60. rpc GetDomain(GetDomainRequest) returns (Domain) {
  61. option (google.api.http) = {
  62. get: "/v1beta1/{name=projects/*/locations/global/domains/*}"
  63. };
  64. }
  65. // Updates the metadata and configuration of a domain.
  66. rpc UpdateDomain(UpdateDomainRequest) returns (google.longrunning.Operation) {
  67. option (google.api.http) = {
  68. patch: "/v1beta1/{domain.name=projects/*/locations/global/domains/*}"
  69. body: "domain"
  70. };
  71. option (google.longrunning.operation_info) = {
  72. response_type: "Domain"
  73. metadata_type: "OpMetadata"
  74. };
  75. }
  76. // Deletes a domain.
  77. rpc DeleteDomain(DeleteDomainRequest) returns (google.longrunning.Operation) {
  78. option (google.api.http) = {
  79. delete: "/v1beta1/{name=projects/*/locations/global/domains/*}"
  80. };
  81. option (google.longrunning.operation_info) = {
  82. response_type: "google.protobuf.Empty"
  83. metadata_type: "OpMetadata"
  84. };
  85. }
  86. // Adds an AD trust to a domain.
  87. rpc AttachTrust(AttachTrustRequest) returns (google.longrunning.Operation) {
  88. option (google.api.http) = {
  89. post: "/v1beta1/{name=projects/*/locations/global/domains/*}:attachTrust"
  90. body: "*"
  91. };
  92. option (google.longrunning.operation_info) = {
  93. response_type: "Domain"
  94. metadata_type: "OpMetadata"
  95. };
  96. }
  97. // Updates the DNS conditional forwarder.
  98. rpc ReconfigureTrust(ReconfigureTrustRequest) returns (google.longrunning.Operation) {
  99. option (google.api.http) = {
  100. post: "/v1beta1/{name=projects/*/locations/global/domains/*}:reconfigureTrust"
  101. body: "*"
  102. };
  103. option (google.longrunning.operation_info) = {
  104. response_type: "Domain"
  105. metadata_type: "OpMetadata"
  106. };
  107. }
  108. // Removes an AD trust.
  109. rpc DetachTrust(DetachTrustRequest) returns (google.longrunning.Operation) {
  110. option (google.api.http) = {
  111. post: "/v1beta1/{name=projects/*/locations/global/domains/*}:detachTrust"
  112. body: "*"
  113. };
  114. option (google.longrunning.operation_info) = {
  115. response_type: "Domain"
  116. metadata_type: "OpMetadata"
  117. };
  118. }
  119. // Validates a trust state, that the target domain is reachable, and that the
  120. // target domain is able to accept incoming trust requests.
  121. rpc ValidateTrust(ValidateTrustRequest) returns (google.longrunning.Operation) {
  122. option (google.api.http) = {
  123. post: "/v1beta1/{name=projects/*/locations/global/domains/*}:validateTrust"
  124. body: "*"
  125. };
  126. option (google.longrunning.operation_info) = {
  127. response_type: "Domain"
  128. metadata_type: "OpMetadata"
  129. };
  130. }
  131. }
  132. // Represents the metadata of the long-running operation.
  133. message OpMetadata {
  134. // Output only. The time the operation was created.
  135. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  136. // Output only. The time the operation finished running.
  137. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  138. // Output only. Server-defined resource path for the target of the operation.
  139. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  140. // Output only. Name of the verb executed by the operation.
  141. string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  142. // Output only. Identifies whether the user has requested cancellation
  143. // of the operation. Operations that have successfully been cancelled
  144. // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  145. // corresponding to `Code.CANCELLED`.
  146. bool requested_cancellation = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  147. // Output only. API version used to start the operation.
  148. string api_version = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  149. }
  150. // Request message for
  151. // [CreateMicrosoftAdDomain][google.cloud.managedidentities.v1beta1.CreateMicrosoftAdDomain]
  152. message CreateMicrosoftAdDomainRequest {
  153. // The resource project name and location using the form:
  154. // `projects/{project_id}/locations/global`
  155. string parent = 1;
  156. // A domain name, e.g. mydomain.myorg.com, with the following restrictions:
  157. // * Must contain only lowercase letters, numbers, periods and hyphens.
  158. // * Must start with a letter.
  159. // * Must contain between 2-64 characters.
  160. // * Must end with a number or a letter.
  161. // * Must not start with period.
  162. // * First segement length (mydomain form example above) shouldn't exceed
  163. // 15 chars.
  164. // * The last segment cannot be fully numeric.
  165. // * Must be unique within the customer project.
  166. string domain_name = 2;
  167. // A Managed Identity domain resource.
  168. Domain domain = 3;
  169. }
  170. // Request message for
  171. // [ResetAdminPassword][google.cloud.managedidentities.v1beta1.ResetAdminPassword]
  172. message ResetAdminPasswordRequest {
  173. // The domain resource name using the form:
  174. // `projects/{project_id}/locations/global/domains/{domain_name}`
  175. string name = 1;
  176. }
  177. // Response message for
  178. // [ResetAdminPassword][google.cloud.managedidentities.v1beta1.ResetAdminPassword]
  179. message ResetAdminPasswordResponse {
  180. // A random password. See [admin][google.cloud.managedidentities.v1beta1.Domain.admin] for more information.
  181. string password = 1;
  182. }
  183. // Request message for
  184. // [ListDomains][google.cloud.managedidentities.v1beta1.ListDomains]
  185. message ListDomainsRequest {
  186. // Required. The resource name of the domain location using the form:
  187. // `projects/{project_id}/locations/global`
  188. string parent = 1;
  189. // Optional. The maximum number of items to return.
  190. // If not specified, a default value of 1000 will be used.
  191. // Regardless of the page_size value, the response may include a partial list.
  192. // Callers should rely on a response's
  193. // [next_page_token][google.cloud.managedidentities.v1beta1.ListDomainsResponse.next_page_token]
  194. // to determine if there are additional results to list.
  195. int32 page_size = 2;
  196. // The `next_page_token` value returned from a previous ListDomainsRequest
  197. // request, if any.
  198. string page_token = 3;
  199. // Optional. A filter specifying constraints of a list operation.
  200. // For example, `Domain.fqdn="mydomain.myorginization"`.
  201. string filter = 4;
  202. // Optional. Specifies the ordering of results. See
  203. // [Sorting
  204. // order](https://cloud.google.com/apis/design/design_patterns#sorting_order)
  205. // for more information.
  206. string order_by = 5;
  207. }
  208. // Response message for
  209. // [ListDomains][google.cloud.managedidentities.v1beta1.ListDomains]
  210. message ListDomainsResponse {
  211. // A list of Managed Identities Service domains in the project.
  212. repeated Domain domains = 1;
  213. // A token to retrieve the next page of results, or empty if there are no more
  214. // results in the list.
  215. string next_page_token = 2;
  216. // A list of locations that could not be reached.
  217. repeated string unreachable = 3;
  218. }
  219. // Request message for
  220. // [GetDomain][google.cloud.managedidentities.v1beta1.GetDomain]
  221. message GetDomainRequest {
  222. // The domain resource name using the form:
  223. // `projects/{project_id}/locations/global/domains/{domain_name}`
  224. string name = 1;
  225. }
  226. // Request message for
  227. // [UpdateDomain][google.cloud.managedidentities.v1beta1.UpdateDomain]
  228. message UpdateDomainRequest {
  229. // Mask of fields to update. At least one path must be supplied in this
  230. // field. The elements of the repeated paths field may only include
  231. // fields from [Domain][google.cloud.managedidentities.v1beta1.Domain]:
  232. // * `labels`
  233. // * `locations`
  234. // * `authorized_networks`
  235. google.protobuf.FieldMask update_mask = 1;
  236. // Domain message with updated fields. Only supported fields specified in
  237. // update_mask are updated.
  238. Domain domain = 2;
  239. }
  240. // Request message for
  241. // [DeleteDomain][google.cloud.managedidentities.v1beta1.DeleteDomain]
  242. message DeleteDomainRequest {
  243. // The domain resource name using the form:
  244. // `projects/{project_id}/locations/global/domains/{domain_name}`
  245. string name = 1;
  246. }
  247. // Request message for
  248. // [AttachTrust][google.cloud.managedidentities.v1beta1.AttachTrust]
  249. message AttachTrustRequest {
  250. // The resource domain name, project name and location using the form:
  251. // `projects/{project_id}/locations/global/domains/{domain_name}`
  252. string name = 1;
  253. // The domain trust resource.
  254. Trust trust = 2;
  255. }
  256. // Request message for
  257. // [ReconfigureTrust][google.cloud.managedidentities.v1beta1.ReconfigureTrust]
  258. message ReconfigureTrustRequest {
  259. // The resource domain name, project name and location using the form:
  260. // `projects/{project_id}/locations/global/domains/{domain_name}`
  261. string name = 1;
  262. // The fully-qualified target domain name which will be in trust with current
  263. // domain.
  264. string target_domain_name = 2;
  265. // The target DNS server IP addresses to resolve the remote domain involved
  266. // in the trust.
  267. repeated string target_dns_ip_addresses = 3;
  268. }
  269. // Request message for
  270. // [DetachTrust][google.cloud.managedidentities.v1beta1.DetachTrust]
  271. message DetachTrustRequest {
  272. // The resource domain name, project name, and location using the form:
  273. // `projects/{project_id}/locations/global/domains/{domain_name}`
  274. string name = 1;
  275. // The domain trust resource to removed.
  276. Trust trust = 2;
  277. }
  278. // Request message for
  279. // [ValidateTrust][google.cloud.managedidentities.v1beta1.ValidateTrust]
  280. message ValidateTrustRequest {
  281. // The resource domain name, project name, and location using the form:
  282. // `projects/{project_id}/locations/global/domains/{domain_name}`
  283. string name = 1;
  284. // The domain trust to validate trust state for.
  285. Trust trust = 2;
  286. }