managed_identities_service.proto 16 KB

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