managed_identities_service.proto 14 KB

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