access_context_manager.proto 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986
  1. // Copyright 2022 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.identity.accesscontextmanager.v1;
  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/iam/v1/iam_policy.proto";
  21. import "google/iam/v1/policy.proto";
  22. import "google/identity/accesscontextmanager/v1/access_level.proto";
  23. import "google/identity/accesscontextmanager/v1/access_policy.proto";
  24. import "google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto";
  25. import "google/identity/accesscontextmanager/v1/service_perimeter.proto";
  26. import "google/longrunning/operations.proto";
  27. import "google/protobuf/field_mask.proto";
  28. option csharp_namespace = "Google.Identity.AccessContextManager.V1";
  29. option go_package = "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1;accesscontextmanager";
  30. option java_multiple_files = true;
  31. option java_outer_classname = "AccessContextManagerProto";
  32. option java_package = "com.google.identity.accesscontextmanager.v1";
  33. option objc_class_prefix = "GACM";
  34. option php_namespace = "Google\\Identity\\AccessContextManager\\V1";
  35. option ruby_package = "Google::Identity::AccessContextManager::V1";
  36. // API for setting [access levels]
  37. // [google.identity.accesscontextmanager.v1.AccessLevel] and [service
  38. // perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]
  39. // for Google Cloud projects. Each organization has one [access policy]
  40. // [google.identity.accesscontextmanager.v1.AccessPolicy] that contains the
  41. // [access levels] [google.identity.accesscontextmanager.v1.AccessLevel]
  42. // and [service perimeters]
  43. // [google.identity.accesscontextmanager.v1.ServicePerimeter]. This
  44. // [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy] is
  45. // applicable to all resources in the organization.
  46. // AccessPolicies
  47. service AccessContextManager {
  48. option (google.api.default_host) = "accesscontextmanager.googleapis.com";
  49. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  50. // Lists all [access policies]
  51. // [google.identity.accesscontextmanager.v1.AccessPolicy] in an
  52. // organization.
  53. rpc ListAccessPolicies(ListAccessPoliciesRequest) returns (ListAccessPoliciesResponse) {
  54. option (google.api.http) = {
  55. get: "/v1/accessPolicies"
  56. };
  57. }
  58. // Returns an [access policy]
  59. // [google.identity.accesscontextmanager.v1.AccessPolicy] based on the name.
  60. rpc GetAccessPolicy(GetAccessPolicyRequest) returns (AccessPolicy) {
  61. option (google.api.http) = {
  62. get: "/v1/{name=accessPolicies/*}"
  63. };
  64. option (google.api.method_signature) = "name";
  65. }
  66. // Creates an access policy. This method fails if the organization already has
  67. // an access policy. The long-running operation has a successful status
  68. // after the access policy propagates to long-lasting storage.
  69. // Syntactic and basic semantic errors are returned in `metadata` as a
  70. // BadRequest proto.
  71. rpc CreateAccessPolicy(AccessPolicy) returns (google.longrunning.Operation) {
  72. option (google.api.http) = {
  73. post: "/v1/accessPolicies"
  74. body: "*"
  75. };
  76. option (google.longrunning.operation_info) = {
  77. response_type: "AccessPolicy"
  78. metadata_type: "AccessContextManagerOperationMetadata"
  79. };
  80. }
  81. // Updates an [access policy]
  82. // [google.identity.accesscontextmanager.v1.AccessPolicy]. The
  83. // long-running operation from this RPC has a successful status after the
  84. // changes to the [access policy]
  85. // [google.identity.accesscontextmanager.v1.AccessPolicy] propagate
  86. // to long-lasting storage.
  87. rpc UpdateAccessPolicy(UpdateAccessPolicyRequest) returns (google.longrunning.Operation) {
  88. option (google.api.http) = {
  89. patch: "/v1/{policy.name=accessPolicies/*}"
  90. body: "policy"
  91. };
  92. option (google.api.method_signature) = "policy,update_mask";
  93. option (google.longrunning.operation_info) = {
  94. response_type: "AccessPolicy"
  95. metadata_type: "AccessContextManagerOperationMetadata"
  96. };
  97. }
  98. // Deletes an [access policy]
  99. // [google.identity.accesscontextmanager.v1.AccessPolicy] based on the
  100. // resource name. The long-running operation has a successful status after the
  101. // [access policy] [google.identity.accesscontextmanager.v1.AccessPolicy]
  102. // is removed from long-lasting storage.
  103. rpc DeleteAccessPolicy(DeleteAccessPolicyRequest) returns (google.longrunning.Operation) {
  104. option (google.api.http) = {
  105. delete: "/v1/{name=accessPolicies/*}"
  106. };
  107. option (google.api.method_signature) = "name";
  108. option (google.longrunning.operation_info) = {
  109. response_type: "google.protobuf.Empty"
  110. metadata_type: "AccessContextManagerOperationMetadata"
  111. };
  112. }
  113. // Lists all [access levels]
  114. // [google.identity.accesscontextmanager.v1.AccessLevel] for an access
  115. // policy.
  116. rpc ListAccessLevels(ListAccessLevelsRequest) returns (ListAccessLevelsResponse) {
  117. option (google.api.http) = {
  118. get: "/v1/{parent=accessPolicies/*}/accessLevels"
  119. };
  120. option (google.api.method_signature) = "parent";
  121. }
  122. // Gets an [access level]
  123. // [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource
  124. // name.
  125. rpc GetAccessLevel(GetAccessLevelRequest) returns (AccessLevel) {
  126. option (google.api.http) = {
  127. get: "/v1/{name=accessPolicies/*/accessLevels/*}"
  128. };
  129. option (google.api.method_signature) = "name";
  130. }
  131. // Creates an [access level]
  132. // [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running
  133. // operation from this RPC has a successful status after the [access
  134. // level] [google.identity.accesscontextmanager.v1.AccessLevel]
  135. // propagates to long-lasting storage. If [access levels]
  136. // [google.identity.accesscontextmanager.v1.AccessLevel] contain
  137. // errors, an error response is returned for the first error encountered.
  138. rpc CreateAccessLevel(CreateAccessLevelRequest) returns (google.longrunning.Operation) {
  139. option (google.api.http) = {
  140. post: "/v1/{parent=accessPolicies/*}/accessLevels"
  141. body: "access_level"
  142. };
  143. option (google.api.method_signature) = "parent,access_level";
  144. option (google.longrunning.operation_info) = {
  145. response_type: "AccessLevel"
  146. metadata_type: "AccessContextManagerOperationMetadata"
  147. };
  148. }
  149. // Updates an [access level]
  150. // [google.identity.accesscontextmanager.v1.AccessLevel]. The long-running
  151. // operation from this RPC has a successful status after the changes to
  152. // the [access level]
  153. // [google.identity.accesscontextmanager.v1.AccessLevel] propagate
  154. // to long-lasting storage. If [access levels]
  155. // [google.identity.accesscontextmanager.v1.AccessLevel] contain
  156. // errors, an error response is returned for the first error encountered.
  157. rpc UpdateAccessLevel(UpdateAccessLevelRequest) returns (google.longrunning.Operation) {
  158. option (google.api.http) = {
  159. patch: "/v1/{access_level.name=accessPolicies/*/accessLevels/*}"
  160. body: "access_level"
  161. };
  162. option (google.api.method_signature) = "access_level,update_mask";
  163. option (google.longrunning.operation_info) = {
  164. response_type: "AccessLevel"
  165. metadata_type: "AccessContextManagerOperationMetadata"
  166. };
  167. }
  168. // Deletes an [access level]
  169. // [google.identity.accesscontextmanager.v1.AccessLevel] based on the resource
  170. // name. The long-running operation from this RPC has a successful status
  171. // after the [access level]
  172. // [google.identity.accesscontextmanager.v1.AccessLevel] has been removed
  173. // from long-lasting storage.
  174. rpc DeleteAccessLevel(DeleteAccessLevelRequest) returns (google.longrunning.Operation) {
  175. option (google.api.http) = {
  176. delete: "/v1/{name=accessPolicies/*/accessLevels/*}"
  177. };
  178. option (google.api.method_signature) = "name";
  179. option (google.longrunning.operation_info) = {
  180. response_type: "google.protobuf.Empty"
  181. metadata_type: "AccessContextManagerOperationMetadata"
  182. };
  183. }
  184. // Replaces all existing [access levels]
  185. // [google.identity.accesscontextmanager.v1.AccessLevel] in an [access
  186. // policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with
  187. // the [access levels]
  188. // [google.identity.accesscontextmanager.v1.AccessLevel] provided. This
  189. // is done atomically. The long-running operation from this RPC has a
  190. // successful status after all replacements propagate to long-lasting
  191. // storage. If the replacement contains errors, an error response is returned
  192. // for the first error encountered. Upon error, the replacement is cancelled,
  193. // and existing [access levels]
  194. // [google.identity.accesscontextmanager.v1.AccessLevel] are not
  195. // affected. The Operation.response field contains
  196. // ReplaceAccessLevelsResponse. Removing [access levels]
  197. // [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing
  198. // [service perimeters]
  199. // [google.identity.accesscontextmanager.v1.ServicePerimeter] result in an
  200. // error.
  201. rpc ReplaceAccessLevels(ReplaceAccessLevelsRequest) returns (google.longrunning.Operation) {
  202. option (google.api.http) = {
  203. post: "/v1/{parent=accessPolicies/*}/accessLevels:replaceAll"
  204. body: "*"
  205. };
  206. option (google.longrunning.operation_info) = {
  207. response_type: "ReplaceAccessLevelsResponse"
  208. metadata_type: "AccessContextManagerOperationMetadata"
  209. };
  210. }
  211. // Lists all [service perimeters]
  212. // [google.identity.accesscontextmanager.v1.ServicePerimeter] for an
  213. // access policy.
  214. rpc ListServicePerimeters(ListServicePerimetersRequest) returns (ListServicePerimetersResponse) {
  215. option (google.api.http) = {
  216. get: "/v1/{parent=accessPolicies/*}/servicePerimeters"
  217. };
  218. option (google.api.method_signature) = "parent";
  219. }
  220. // Gets a [service perimeter]
  221. // [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the
  222. // resource name.
  223. rpc GetServicePerimeter(GetServicePerimeterRequest) returns (ServicePerimeter) {
  224. option (google.api.http) = {
  225. get: "/v1/{name=accessPolicies/*/servicePerimeters/*}"
  226. };
  227. option (google.api.method_signature) = "name";
  228. }
  229. // Creates a [service perimeter]
  230. // [google.identity.accesscontextmanager.v1.ServicePerimeter]. The
  231. // long-running operation from this RPC has a successful status after the
  232. // [service perimeter]
  233. // [google.identity.accesscontextmanager.v1.ServicePerimeter]
  234. // propagates to long-lasting storage. If a [service perimeter]
  235. // [google.identity.accesscontextmanager.v1.ServicePerimeter] contains
  236. // errors, an error response is returned for the first error encountered.
  237. rpc CreateServicePerimeter(CreateServicePerimeterRequest) returns (google.longrunning.Operation) {
  238. option (google.api.http) = {
  239. post: "/v1/{parent=accessPolicies/*}/servicePerimeters"
  240. body: "service_perimeter"
  241. };
  242. option (google.api.method_signature) = "parent,service_perimeter";
  243. option (google.longrunning.operation_info) = {
  244. response_type: "ServicePerimeter"
  245. metadata_type: "AccessContextManagerOperationMetadata"
  246. };
  247. }
  248. // Updates a [service perimeter]
  249. // [google.identity.accesscontextmanager.v1.ServicePerimeter]. The
  250. // long-running operation from this RPC has a successful status after the
  251. // [service perimeter]
  252. // [google.identity.accesscontextmanager.v1.ServicePerimeter]
  253. // propagates to long-lasting storage. If a [service perimeter]
  254. // [google.identity.accesscontextmanager.v1.ServicePerimeter] contains
  255. // errors, an error response is returned for the first error encountered.
  256. rpc UpdateServicePerimeter(UpdateServicePerimeterRequest) returns (google.longrunning.Operation) {
  257. option (google.api.http) = {
  258. patch: "/v1/{service_perimeter.name=accessPolicies/*/servicePerimeters/*}"
  259. body: "service_perimeter"
  260. };
  261. option (google.api.method_signature) = "service_perimeter,update_mask";
  262. option (google.longrunning.operation_info) = {
  263. response_type: "ServicePerimeter"
  264. metadata_type: "AccessContextManagerOperationMetadata"
  265. };
  266. }
  267. // Deletes a [service perimeter]
  268. // [google.identity.accesscontextmanager.v1.ServicePerimeter] based on the
  269. // resource name. The long-running operation from this RPC has a successful
  270. // status after the [service perimeter]
  271. // [google.identity.accesscontextmanager.v1.ServicePerimeter] is removed from
  272. // long-lasting storage.
  273. rpc DeleteServicePerimeter(DeleteServicePerimeterRequest) returns (google.longrunning.Operation) {
  274. option (google.api.http) = {
  275. delete: "/v1/{name=accessPolicies/*/servicePerimeters/*}"
  276. };
  277. option (google.api.method_signature) = "name";
  278. option (google.longrunning.operation_info) = {
  279. response_type: "google.protobuf.Empty"
  280. metadata_type: "AccessContextManagerOperationMetadata"
  281. };
  282. }
  283. // Replace all existing [service perimeters]
  284. // [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [access
  285. // policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the
  286. // [service perimeters]
  287. // [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This
  288. // is done atomically. The long-running operation from this RPC has a
  289. // successful status after all replacements propagate to long-lasting storage.
  290. // Replacements containing errors result in an error response for the first
  291. // error encountered. Upon an error, replacement are cancelled and existing
  292. // [service perimeters]
  293. // [google.identity.accesscontextmanager.v1.ServicePerimeter] are not
  294. // affected. The Operation.response field contains
  295. // ReplaceServicePerimetersResponse.
  296. rpc ReplaceServicePerimeters(ReplaceServicePerimetersRequest) returns (google.longrunning.Operation) {
  297. option (google.api.http) = {
  298. post: "/v1/{parent=accessPolicies/*}/servicePerimeters:replaceAll"
  299. body: "*"
  300. };
  301. option (google.longrunning.operation_info) = {
  302. response_type: "ReplaceServicePerimetersResponse"
  303. metadata_type: "AccessContextManagerOperationMetadata"
  304. };
  305. }
  306. // Commits the dry-run specification for all the [service perimeters]
  307. // [google.identity.accesscontextmanager.v1.ServicePerimeter] in an
  308. // [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
  309. // A commit operation on a service perimeter involves copying its `spec` field
  310. // to the `status` field of the service perimeter. Only [service perimeters]
  311. // [google.identity.accesscontextmanager.v1.ServicePerimeter] with
  312. // `use_explicit_dry_run_spec` field set to true are affected by a commit
  313. // operation. The long-running operation from this RPC has a successful
  314. // status after the dry-run specifications for all the [service perimeters]
  315. // [google.identity.accesscontextmanager.v1.ServicePerimeter] have been
  316. // committed. If a commit fails, it causes the long-running operation to
  317. // return an error response and the entire commit operation is cancelled.
  318. // When successful, the Operation.response field contains
  319. // CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are
  320. // cleared after a successful commit operation.
  321. rpc CommitServicePerimeters(CommitServicePerimetersRequest) returns (google.longrunning.Operation) {
  322. option (google.api.http) = {
  323. post: "/v1/{parent=accessPolicies/*}/servicePerimeters:commit"
  324. body: "*"
  325. };
  326. option (google.longrunning.operation_info) = {
  327. response_type: "CommitServicePerimetersResponse"
  328. metadata_type: "AccessContextManagerOperationMetadata"
  329. };
  330. }
  331. // Lists all [GcpUserAccessBindings]
  332. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a
  333. // Google Cloud organization.
  334. rpc ListGcpUserAccessBindings(ListGcpUserAccessBindingsRequest) returns (ListGcpUserAccessBindingsResponse) {
  335. option (google.api.http) = {
  336. get: "/v1/{parent=organizations/*}/gcpUserAccessBindings"
  337. };
  338. option (google.api.method_signature) = "parent";
  339. }
  340. // Gets the [GcpUserAccessBinding]
  341. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with
  342. // the given name.
  343. rpc GetGcpUserAccessBinding(GetGcpUserAccessBindingRequest) returns (GcpUserAccessBinding) {
  344. option (google.api.http) = {
  345. get: "/v1/{name=organizations/*/gcpUserAccessBindings/*}"
  346. };
  347. option (google.api.method_signature) = "name";
  348. }
  349. // Creates a [GcpUserAccessBinding]
  350. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the
  351. // client specifies a [name]
  352. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name],
  353. // the server ignores it. Fails if a resource already exists with the same
  354. // [group_key]
  355. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key].
  356. // Completion of this long-running operation does not necessarily signify that
  357. // the new binding is deployed onto all affected users, which may take more
  358. // time.
  359. rpc CreateGcpUserAccessBinding(CreateGcpUserAccessBindingRequest) returns (google.longrunning.Operation) {
  360. option (google.api.http) = {
  361. post: "/v1/{parent=organizations/*}/gcpUserAccessBindings"
  362. body: "gcp_user_access_binding"
  363. };
  364. option (google.api.method_signature) = "parent,gcp_user_access_binding";
  365. option (google.longrunning.operation_info) = {
  366. response_type: "GcpUserAccessBinding"
  367. metadata_type: "GcpUserAccessBindingOperationMetadata"
  368. };
  369. }
  370. // Updates a [GcpUserAccessBinding]
  371. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding].
  372. // Completion of this long-running operation does not necessarily signify that
  373. // the changed binding is deployed onto all affected users, which may take
  374. // more time.
  375. rpc UpdateGcpUserAccessBinding(UpdateGcpUserAccessBindingRequest) returns (google.longrunning.Operation) {
  376. option (google.api.http) = {
  377. patch: "/v1/{gcp_user_access_binding.name=organizations/*/gcpUserAccessBindings/*}"
  378. body: "gcp_user_access_binding"
  379. };
  380. option (google.api.method_signature) = "gcp_user_access_binding,update_mask";
  381. option (google.longrunning.operation_info) = {
  382. response_type: "GcpUserAccessBinding"
  383. metadata_type: "GcpUserAccessBindingOperationMetadata"
  384. };
  385. }
  386. // Deletes a [GcpUserAccessBinding]
  387. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding].
  388. // Completion of this long-running operation does not necessarily signify that
  389. // the binding deletion is deployed onto all affected users, which may take
  390. // more time.
  391. rpc DeleteGcpUserAccessBinding(DeleteGcpUserAccessBindingRequest) returns (google.longrunning.Operation) {
  392. option (google.api.http) = {
  393. delete: "/v1/{name=organizations/*/gcpUserAccessBindings/*}"
  394. };
  395. option (google.api.method_signature) = "name";
  396. option (google.longrunning.operation_info) = {
  397. response_type: "google.protobuf.Empty"
  398. metadata_type: "GcpUserAccessBindingOperationMetadata"
  399. };
  400. }
  401. // Sets the IAM policy for the specified Access Context Manager
  402. // [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
  403. // This method replaces the existing IAM policy on the access policy. The IAM
  404. // policy controls the set of users who can perform specific operations on the
  405. // Access Context Manager [access
  406. // policy][google.identity.accesscontextmanager.v1.AccessPolicy].
  407. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  408. option (google.api.http) = {
  409. post: "/v1/{resource=accessPolicies/*}:setIamPolicy"
  410. body: "*"
  411. };
  412. }
  413. // Gets the IAM policy for the specified Access Context Manager
  414. // [access policy][google.identity.accesscontextmanager.v1.AccessPolicy].
  415. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  416. option (google.api.http) = {
  417. post: "/v1/{resource=accessPolicies/*}:getIamPolicy"
  418. body: "*"
  419. };
  420. }
  421. // Returns the IAM permissions that the caller has on the specified Access
  422. // Context Manager resource. The resource can be an
  423. // [AccessPolicy][google.identity.accesscontextmanager.v1.AccessPolicy],
  424. // [AccessLevel][google.identity.accesscontextmanager.v1.AccessLevel], or
  425. // [ServicePerimeter][google.identity.accesscontextmanager.v1.ServicePerimeter
  426. // ]. This method does not support other resources.
  427. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  428. option (google.api.http) = {
  429. post: "/v1/{resource=accessPolicies/*}:testIamPermissions"
  430. body: "*"
  431. additional_bindings {
  432. post: "/v1/{resource=accessPolicies/*/accessLevels/*}:testIamPermissions"
  433. body: "*"
  434. }
  435. additional_bindings {
  436. post: "/v1/{resource=accessPolicies/*/servicePerimeters/*}:testIamPermissions"
  437. body: "*"
  438. }
  439. };
  440. }
  441. }
  442. // A request to list all `AccessPolicies` for a container.
  443. message ListAccessPoliciesRequest {
  444. // Required. Resource name for the container to list AccessPolicy instances
  445. // from.
  446. //
  447. // Format:
  448. // `organizations/{org_id}`
  449. string parent = 1 [
  450. (google.api.field_behavior) = REQUIRED,
  451. (google.api.resource_reference) = {
  452. type: "cloudresourcemanager.googleapis.com/Organization"
  453. }
  454. ];
  455. // Number of AccessPolicy instances to include in the list. Default 100.
  456. int32 page_size = 2;
  457. // Next page token for the next batch of AccessPolicy instances. Defaults to
  458. // the first page of results.
  459. string page_token = 3;
  460. }
  461. // A response to `ListAccessPoliciesRequest`.
  462. message ListAccessPoliciesResponse {
  463. // List of the AccessPolicy instances.
  464. repeated AccessPolicy access_policies = 1;
  465. // The pagination token to retrieve the next page of results. If the value is
  466. // empty, no further results remain.
  467. string next_page_token = 2;
  468. }
  469. // A request to get a particular `AccessPolicy`.
  470. message GetAccessPolicyRequest {
  471. // Required. Resource name for the access policy to get.
  472. //
  473. // Format `accessPolicies/{policy_id}`
  474. string name = 1 [
  475. (google.api.field_behavior) = REQUIRED,
  476. (google.api.resource_reference) = {
  477. type: "accesscontextmanager.googleapis.com/AccessPolicy"
  478. }
  479. ];
  480. }
  481. // A request to update an `AccessPolicy`.
  482. message UpdateAccessPolicyRequest {
  483. // Required. The updated AccessPolicy.
  484. AccessPolicy policy = 1 [(google.api.field_behavior) = REQUIRED];
  485. // Required. Mask to control which fields get updated. Must be non-empty.
  486. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  487. }
  488. // A request to delete an `AccessPolicy`.
  489. message DeleteAccessPolicyRequest {
  490. // Required. Resource name for the access policy to delete.
  491. //
  492. // Format `accessPolicies/{policy_id}`
  493. string name = 1 [
  494. (google.api.field_behavior) = REQUIRED,
  495. (google.api.resource_reference) = {
  496. type: "accesscontextmanager.googleapis.com/AccessPolicy"
  497. }
  498. ];
  499. }
  500. // A request to list all `AccessLevels` in an `AccessPolicy`.
  501. message ListAccessLevelsRequest {
  502. // Required. Resource name for the access policy to list [Access Levels]
  503. // [google.identity.accesscontextmanager.v1.AccessLevel] from.
  504. //
  505. // Format:
  506. // `accessPolicies/{policy_id}`
  507. string parent = 1 [
  508. (google.api.field_behavior) = REQUIRED,
  509. (google.api.resource_reference) = {
  510. child_type: "accesscontextmanager.googleapis.com/AccessLevel"
  511. }
  512. ];
  513. // Number of [Access Levels]
  514. // [google.identity.accesscontextmanager.v1.AccessLevel] to include in
  515. // the list. Default 100.
  516. int32 page_size = 2;
  517. // Next page token for the next batch of [Access Level]
  518. // [google.identity.accesscontextmanager.v1.AccessLevel] instances.
  519. // Defaults to the first page of results.
  520. string page_token = 3;
  521. // Whether to return `BasicLevels` in the Cloud Common Expression language, as
  522. // `CustomLevels`, rather than as `BasicLevels`. Defaults to returning
  523. // `AccessLevels` in the format they were defined.
  524. LevelFormat access_level_format = 4;
  525. }
  526. // A response to `ListAccessLevelsRequest`.
  527. message ListAccessLevelsResponse {
  528. // List of the [Access Level]
  529. // [google.identity.accesscontextmanager.v1.AccessLevel] instances.
  530. repeated AccessLevel access_levels = 1;
  531. // The pagination token to retrieve the next page of results. If the value is
  532. // empty, no further results remain.
  533. string next_page_token = 2;
  534. }
  535. // A request to get a particular `AccessLevel`.
  536. message GetAccessLevelRequest {
  537. // Required. Resource name for the [Access Level]
  538. // [google.identity.accesscontextmanager.v1.AccessLevel].
  539. //
  540. // Format:
  541. // `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
  542. string name = 1 [
  543. (google.api.field_behavior) = REQUIRED,
  544. (google.api.resource_reference) = {
  545. type: "accesscontextmanager.googleapis.com/AccessLevel"
  546. }
  547. ];
  548. // Whether to return `BasicLevels` in the Cloud Common Expression
  549. // Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where
  550. // [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel]
  551. // are returned as `BasicLevels` or `CustomLevels` based on how they were
  552. // created. If set to CEL, all [Access Levels]
  553. // [google.identity.accesscontextmanager.v1.AccessLevel] are returned as
  554. // `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent
  555. // `CustomLevels`.
  556. LevelFormat access_level_format = 2;
  557. }
  558. // A request to create an `AccessLevel`.
  559. message CreateAccessLevelRequest {
  560. // Required. Resource name for the access policy which owns this [Access
  561. // Level] [google.identity.accesscontextmanager.v1.AccessLevel].
  562. //
  563. // Format: `accessPolicies/{policy_id}`
  564. string parent = 1 [
  565. (google.api.field_behavior) = REQUIRED,
  566. (google.api.resource_reference) = {
  567. child_type: "accesscontextmanager.googleapis.com/AccessLevel"
  568. }
  569. ];
  570. // Required. The [Access Level]
  571. // [google.identity.accesscontextmanager.v1.AccessLevel] to create.
  572. // Syntactic correctness of the [Access Level]
  573. // [google.identity.accesscontextmanager.v1.AccessLevel] is a
  574. // precondition for creation.
  575. AccessLevel access_level = 2 [(google.api.field_behavior) = REQUIRED];
  576. }
  577. // A request to update an `AccessLevel`.
  578. message UpdateAccessLevelRequest {
  579. // Required. The updated [Access Level]
  580. // [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic
  581. // correctness of the [Access Level]
  582. // [google.identity.accesscontextmanager.v1.AccessLevel] is a
  583. // precondition for creation.
  584. AccessLevel access_level = 1 [(google.api.field_behavior) = REQUIRED];
  585. // Required. Mask to control which fields get updated. Must be non-empty.
  586. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  587. }
  588. // A request to delete an `AccessLevel`.
  589. message DeleteAccessLevelRequest {
  590. // Required. Resource name for the [Access Level]
  591. // [google.identity.accesscontextmanager.v1.AccessLevel].
  592. //
  593. // Format:
  594. // `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
  595. string name = 1 [
  596. (google.api.field_behavior) = REQUIRED,
  597. (google.api.resource_reference) = {
  598. type: "accesscontextmanager.googleapis.com/AccessLevel"
  599. }
  600. ];
  601. }
  602. // A request to replace all existing Access Levels in an Access Policy with
  603. // the Access Levels provided. This is done atomically.
  604. message ReplaceAccessLevelsRequest {
  605. // Required. Resource name for the access policy which owns these
  606. // [Access Levels]
  607. // [google.identity.accesscontextmanager.v1.AccessLevel].
  608. //
  609. // Format: `accessPolicies/{policy_id}`
  610. string parent = 1 [
  611. (google.api.field_behavior) = REQUIRED,
  612. (google.api.resource_reference) = {
  613. child_type: "accesscontextmanager.googleapis.com/AccessLevel"
  614. }
  615. ];
  616. // Required. The desired [Access Levels]
  617. // [google.identity.accesscontextmanager.v1.AccessLevel] that should
  618. // replace all existing [Access Levels]
  619. // [google.identity.accesscontextmanager.v1.AccessLevel] in the
  620. // [Access Policy]
  621. // [google.identity.accesscontextmanager.v1.AccessPolicy].
  622. repeated AccessLevel access_levels = 2 [(google.api.field_behavior) = REQUIRED];
  623. // Optional. The etag for the version of the [Access Policy]
  624. // [google.identity.accesscontextmanager.v1.AccessPolicy] that this
  625. // replace operation is to be performed on. If, at the time of replace, the
  626. // etag for the Access Policy stored in Access Context Manager is different
  627. // from the specified etag, then the replace operation will not be performed
  628. // and the call will fail. This field is not required. If etag is not
  629. // provided, the operation will be performed as if a valid etag is provided.
  630. string etag = 4;
  631. }
  632. // A response to ReplaceAccessLevelsRequest. This will be put inside of
  633. // Operation.response field.
  634. message ReplaceAccessLevelsResponse {
  635. // List of the [Access Level]
  636. // [google.identity.accesscontextmanager.v1.AccessLevel] instances.
  637. repeated AccessLevel access_levels = 1;
  638. }
  639. // A request to list all `ServicePerimeters` in an `AccessPolicy`.
  640. message ListServicePerimetersRequest {
  641. // Required. Resource name for the access policy to list [Service Perimeters]
  642. // [google.identity.accesscontextmanager.v1.ServicePerimeter] from.
  643. //
  644. // Format:
  645. // `accessPolicies/{policy_id}`
  646. string parent = 1 [
  647. (google.api.field_behavior) = REQUIRED,
  648. (google.api.resource_reference) = {
  649. child_type: "accesscontextmanager.googleapis.com/ServicePerimeter"
  650. }
  651. ];
  652. // Number of [Service Perimeters]
  653. // [google.identity.accesscontextmanager.v1.ServicePerimeter] to include
  654. // in the list. Default 100.
  655. int32 page_size = 2;
  656. // Next page token for the next batch of [Service Perimeter]
  657. // [google.identity.accesscontextmanager.v1.ServicePerimeter] instances.
  658. // Defaults to the first page of results.
  659. string page_token = 3;
  660. }
  661. // A response to `ListServicePerimetersRequest`.
  662. message ListServicePerimetersResponse {
  663. // List of the [Service Perimeter]
  664. // [google.identity.accesscontextmanager.v1.ServicePerimeter] instances.
  665. repeated ServicePerimeter service_perimeters = 1;
  666. // The pagination token to retrieve the next page of results. If the value is
  667. // empty, no further results remain.
  668. string next_page_token = 2;
  669. }
  670. // A request to get a particular `ServicePerimeter`.
  671. message GetServicePerimeterRequest {
  672. // Required. Resource name for the [Service Perimeter]
  673. // [google.identity.accesscontextmanager.v1.ServicePerimeter].
  674. //
  675. // Format:
  676. // `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}`
  677. string name = 1 [
  678. (google.api.field_behavior) = REQUIRED,
  679. (google.api.resource_reference) = {
  680. type: "accesscontextmanager.googleapis.com/ServicePerimeter"
  681. }
  682. ];
  683. }
  684. // A request to create a `ServicePerimeter`.
  685. message CreateServicePerimeterRequest {
  686. // Required. Resource name for the access policy which owns this [Service
  687. // Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter].
  688. //
  689. // Format: `accessPolicies/{policy_id}`
  690. string parent = 1 [
  691. (google.api.field_behavior) = REQUIRED,
  692. (google.api.resource_reference) = {
  693. child_type: "accesscontextmanager.googleapis.com/ServicePerimeter"
  694. }
  695. ];
  696. // Required. The [Service Perimeter]
  697. // [google.identity.accesscontextmanager.v1.ServicePerimeter] to create.
  698. // Syntactic correctness of the [Service Perimeter]
  699. // [google.identity.accesscontextmanager.v1.ServicePerimeter] is a
  700. // precondition for creation.
  701. ServicePerimeter service_perimeter = 2 [(google.api.field_behavior) = REQUIRED];
  702. }
  703. // A request to update a `ServicePerimeter`.
  704. message UpdateServicePerimeterRequest {
  705. // Required. The updated `ServicePerimeter`. Syntactic correctness of the
  706. // `ServicePerimeter` is a precondition for creation.
  707. ServicePerimeter service_perimeter = 1 [(google.api.field_behavior) = REQUIRED];
  708. // Required. Mask to control which fields get updated. Must be non-empty.
  709. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  710. }
  711. // A request to delete a `ServicePerimeter`.
  712. message DeleteServicePerimeterRequest {
  713. // Required. Resource name for the [Service Perimeter]
  714. // [google.identity.accesscontextmanager.v1.ServicePerimeter].
  715. //
  716. // Format:
  717. // `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}`
  718. string name = 1 [
  719. (google.api.field_behavior) = REQUIRED,
  720. (google.api.resource_reference) = {
  721. type: "accesscontextmanager.googleapis.com/ServicePerimeter"
  722. }
  723. ];
  724. }
  725. // A request to replace all existing Service Perimeters in an Access Policy
  726. // with the Service Perimeters provided. This is done atomically.
  727. message ReplaceServicePerimetersRequest {
  728. // Required. Resource name for the access policy which owns these
  729. // [Service Perimeters]
  730. // [google.identity.accesscontextmanager.v1.ServicePerimeter].
  731. //
  732. // Format: `accessPolicies/{policy_id}`
  733. string parent = 1 [
  734. (google.api.field_behavior) = REQUIRED,
  735. (google.api.resource_reference) = {
  736. child_type: "accesscontextmanager.googleapis.com/ServicePerimeter"
  737. }
  738. ];
  739. // Required. The desired [Service Perimeters]
  740. // [google.identity.accesscontextmanager.v1.ServicePerimeter] that should
  741. // replace all existing [Service Perimeters]
  742. // [google.identity.accesscontextmanager.v1.ServicePerimeter] in the
  743. // [Access Policy]
  744. // [google.identity.accesscontextmanager.v1.AccessPolicy].
  745. repeated ServicePerimeter service_perimeters = 2 [(google.api.field_behavior) = REQUIRED];
  746. // Optional. The etag for the version of the [Access Policy]
  747. // [google.identity.accesscontextmanager.v1.AccessPolicy] that this
  748. // replace operation is to be performed on. If, at the time of replace, the
  749. // etag for the Access Policy stored in Access Context Manager is different
  750. // from the specified etag, then the replace operation will not be performed
  751. // and the call will fail. This field is not required. If etag is not
  752. // provided, the operation will be performed as if a valid etag is provided.
  753. string etag = 3;
  754. }
  755. // A response to ReplaceServicePerimetersRequest. This will be put inside of
  756. // Operation.response field.
  757. message ReplaceServicePerimetersResponse {
  758. // List of the [Service Perimeter]
  759. // [google.identity.accesscontextmanager.v1.ServicePerimeter] instances.
  760. repeated ServicePerimeter service_perimeters = 1;
  761. }
  762. // A request to commit dry-run specs in all [Service Perimeters]
  763. // [google.identity.accesscontextmanager.v1.ServicePerimeter] belonging to
  764. // an [Access Policy][google.identity.accesscontextmanager.v1.AccessPolicy].
  765. message CommitServicePerimetersRequest {
  766. // Required. Resource name for the parent [Access Policy]
  767. // [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all
  768. // [Service Perimeters]
  769. // [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for
  770. // the commit operation.
  771. //
  772. // Format: `accessPolicies/{policy_id}`
  773. string parent = 1 [
  774. (google.api.field_behavior) = REQUIRED,
  775. (google.api.resource_reference) = {
  776. child_type: "accesscontextmanager.googleapis.com/ServicePerimeter"
  777. }
  778. ];
  779. // Optional. The etag for the version of the [Access Policy]
  780. // [google.identity.accesscontextmanager.v1.AccessPolicy] that this
  781. // commit operation is to be performed on. If, at the time of commit, the
  782. // etag for the Access Policy stored in Access Context Manager is different
  783. // from the specified etag, then the commit operation will not be performed
  784. // and the call will fail. This field is not required. If etag is not
  785. // provided, the operation will be performed as if a valid etag is provided.
  786. string etag = 2;
  787. }
  788. // A response to CommitServicePerimetersRequest. This will be put inside of
  789. // Operation.response field.
  790. message CommitServicePerimetersResponse {
  791. // List of all the [Service Perimeter]
  792. // [google.identity.accesscontextmanager.v1.ServicePerimeter] instances in
  793. // the [Access Policy]
  794. // [google.identity.accesscontextmanager.v1.AccessPolicy].
  795. repeated ServicePerimeter service_perimeters = 1;
  796. }
  797. // The format used in an `AccessLevel`.
  798. enum LevelFormat {
  799. // The format was not specified.
  800. LEVEL_FORMAT_UNSPECIFIED = 0;
  801. // Uses the format the resource was defined in. BasicLevels are returned as
  802. // BasicLevels, CustomLevels are returned as CustomLevels.
  803. AS_DEFINED = 1;
  804. // Use Cloud Common Expression Language when returning the resource. Both
  805. // BasicLevels and CustomLevels are returned as CustomLevels.
  806. CEL = 2;
  807. }
  808. // Request of [ListGcpUserAccessBindings]
  809. // [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings].
  810. message ListGcpUserAccessBindingsRequest {
  811. // Required. Example: "organizations/256"
  812. string parent = 1 [
  813. (google.api.field_behavior) = REQUIRED,
  814. (google.api.resource_reference) = {
  815. type: "cloudresourcemanager.googleapis.com/Organization"
  816. }
  817. ];
  818. // Optional. Maximum number of items to return. The server may return fewer items.
  819. // If left blank, the server may return any number of items.
  820. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  821. // Optional. If left blank, returns the first page. To enumerate all items, use the
  822. // [next_page_token]
  823. // [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token]
  824. // from your previous list operation.
  825. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  826. }
  827. // Response of [ListGcpUserAccessBindings]
  828. // [google.identity.accesscontextmanager.v1.AccessContextManager.ListGcpUserAccessBindings].
  829. message ListGcpUserAccessBindingsResponse {
  830. // [GcpUserAccessBinding]
  831. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
  832. repeated GcpUserAccessBinding gcp_user_access_bindings = 1;
  833. // Token to get the next page of items. If blank, there are no more items.
  834. string next_page_token = 2;
  835. }
  836. // Request of [GetGcpUserAccessBinding]
  837. // [google.identity.accesscontextmanager.v1.AccessContextManager.GetGcpUserAccessBinding].
  838. message GetGcpUserAccessBindingRequest {
  839. // Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
  840. string name = 1 [
  841. (google.api.field_behavior) = REQUIRED,
  842. (google.api.resource_reference) = {
  843. type: "accesscontextmanager.googleapis.com/GcpUserAccessBinding"
  844. }
  845. ];
  846. }
  847. // Request of [CreateGcpUserAccessBinding]
  848. // [google.identity.accesscontextmanager.v1.AccessContextManager.CreateGcpUserAccessBinding].
  849. message CreateGcpUserAccessBindingRequest {
  850. // Required. Example: "organizations/256"
  851. string parent = 1 [
  852. (google.api.field_behavior) = REQUIRED,
  853. (google.api.resource_reference) = {
  854. type: "cloudresourcemanager.googleapis.com/Organization"
  855. }
  856. ];
  857. // Required. [GcpUserAccessBinding]
  858. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
  859. GcpUserAccessBinding gcp_user_access_binding = 2 [(google.api.field_behavior) = REQUIRED];
  860. }
  861. // Request of [UpdateGcpUserAccessBinding]
  862. // [google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding].
  863. message UpdateGcpUserAccessBindingRequest {
  864. // Required. [GcpUserAccessBinding]
  865. // [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
  866. GcpUserAccessBinding gcp_user_access_binding = 1 [(google.api.field_behavior) = REQUIRED];
  867. // Required. Only the fields specified in this mask are updated. Because name and
  868. // group_key cannot be changed, update_mask is required and must always be:
  869. //
  870. // update_mask {
  871. // paths: "access_levels"
  872. // }
  873. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  874. }
  875. // Request of [DeleteGcpUserAccessBinding]
  876. // [google.identity.accesscontextmanager.v1.AccessContextManager.DeleteGcpUserAccessBinding].
  877. message DeleteGcpUserAccessBindingRequest {
  878. // Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
  879. string name = 1 [
  880. (google.api.field_behavior) = REQUIRED,
  881. (google.api.resource_reference) = {
  882. type: "accesscontextmanager.googleapis.com/GcpUserAccessBinding"
  883. }
  884. ];
  885. }
  886. // Currently, a completed operation means nothing. In the future, this metadata
  887. // and a completed operation may indicate that the binding has taken effect and
  888. // is affecting access decisions for all users.
  889. message GcpUserAccessBindingOperationMetadata {
  890. }
  891. // Metadata of Access Context Manager's Long Running Operations.
  892. message AccessContextManagerOperationMetadata {
  893. }