accessapproval.proto 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  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.cloud.accessapproval.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/protobuf/empty.proto";
  21. import "google/protobuf/field_mask.proto";
  22. import "google/protobuf/timestamp.proto";
  23. option csharp_namespace = "Google.Cloud.AccessApproval.V1";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/accessapproval/v1;accessapproval";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "AccessApprovalProto";
  27. option java_package = "com.google.cloud.accessapproval.v1";
  28. option php_namespace = "Google\\Cloud\\AccessApproval\\V1";
  29. option ruby_package = "Google::Cloud::AccessApproval::V1";
  30. // This API allows a customer to manage accesses to cloud resources by
  31. // Google personnel. It defines the following resource model:
  32. //
  33. // - The API has a collection of
  34. // [ApprovalRequest][google.cloud.accessapproval.v1.ApprovalRequest]
  35. // resources, named `approvalRequests/{approval_request}`
  36. // - The API has top-level settings per Project/Folder/Organization, named
  37. // `accessApprovalSettings`
  38. //
  39. // The service also periodically emails a list of recipients, defined at the
  40. // Project/Folder/Organization level in the accessApprovalSettings, when there
  41. // is a pending ApprovalRequest for them to act on. The ApprovalRequests can
  42. // also optionally be published to a Pub/Sub topic owned by the customer
  43. // (contact support if you would like to enable Pub/Sub notifications).
  44. //
  45. // ApprovalRequests can be approved or dismissed. Google personnel can only
  46. // access the indicated resource or resources if the request is approved
  47. // (subject to some exclusions:
  48. // https://cloud.google.com/access-approval/docs/overview#exclusions).
  49. //
  50. // Note: Using Access Approval functionality will mean that Google may not be
  51. // able to meet the SLAs for your chosen products, as any support response times
  52. // may be dramatically increased. As such the SLAs do not apply to any service
  53. // disruption to the extent impacted by Customer's use of Access Approval. Do
  54. // not enable Access Approval for projects where you may require high service
  55. // availability and rapid response by Google Cloud Support.
  56. //
  57. // After a request is approved or dismissed, no further action may be taken on
  58. // it. Requests with the requested_expiration in the past or with no activity
  59. // for 14 days are considered dismissed. When an approval expires, the request
  60. // is considered dismissed.
  61. //
  62. // If a request is not approved or dismissed, we call it pending.
  63. service AccessApproval {
  64. option (google.api.default_host) = "accessapproval.googleapis.com";
  65. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  66. // Lists approval requests associated with a project, folder, or organization.
  67. // Approval requests can be filtered by state (pending, active, dismissed).
  68. // The order is reverse chronological.
  69. rpc ListApprovalRequests(ListApprovalRequestsMessage) returns (ListApprovalRequestsResponse) {
  70. option (google.api.http) = {
  71. get: "/v1/{parent=projects/*}/approvalRequests"
  72. additional_bindings {
  73. get: "/v1/{parent=folders/*}/approvalRequests"
  74. }
  75. additional_bindings {
  76. get: "/v1/{parent=organizations/*}/approvalRequests"
  77. }
  78. };
  79. option (google.api.method_signature) = "parent";
  80. }
  81. // Gets an approval request. Returns NOT_FOUND if the request does not exist.
  82. rpc GetApprovalRequest(GetApprovalRequestMessage) returns (ApprovalRequest) {
  83. option (google.api.http) = {
  84. get: "/v1/{name=projects/*/approvalRequests/*}"
  85. additional_bindings {
  86. get: "/v1/{name=folders/*/approvalRequests/*}"
  87. }
  88. additional_bindings {
  89. get: "/v1/{name=organizations/*/approvalRequests/*}"
  90. }
  91. };
  92. option (google.api.method_signature) = "name";
  93. }
  94. // Approves a request and returns the updated ApprovalRequest.
  95. //
  96. // Returns NOT_FOUND if the request does not exist. Returns
  97. // FAILED_PRECONDITION if the request exists but is not in a pending state.
  98. rpc ApproveApprovalRequest(ApproveApprovalRequestMessage) returns (ApprovalRequest) {
  99. option (google.api.http) = {
  100. post: "/v1/{name=projects/*/approvalRequests/*}:approve"
  101. body: "*"
  102. additional_bindings {
  103. post: "/v1/{name=folders/*/approvalRequests/*}:approve"
  104. body: "*"
  105. }
  106. additional_bindings {
  107. post: "/v1/{name=organizations/*/approvalRequests/*}:approve"
  108. body: "*"
  109. }
  110. };
  111. }
  112. // Dismisses a request. Returns the updated ApprovalRequest.
  113. //
  114. // NOTE: This does not deny access to the resource if another request has been
  115. // made and approved. It is equivalent in effect to ignoring the request
  116. // altogether.
  117. //
  118. // Returns NOT_FOUND if the request does not exist.
  119. //
  120. // Returns FAILED_PRECONDITION if the request exists but is not in a pending
  121. // state.
  122. rpc DismissApprovalRequest(DismissApprovalRequestMessage) returns (ApprovalRequest) {
  123. option (google.api.http) = {
  124. post: "/v1/{name=projects/*/approvalRequests/*}:dismiss"
  125. body: "*"
  126. additional_bindings {
  127. post: "/v1/{name=folders/*/approvalRequests/*}:dismiss"
  128. body: "*"
  129. }
  130. additional_bindings {
  131. post: "/v1/{name=organizations/*/approvalRequests/*}:dismiss"
  132. body: "*"
  133. }
  134. };
  135. }
  136. // Invalidates an existing ApprovalRequest. Returns the updated
  137. // ApprovalRequest.
  138. //
  139. // NOTE: This does not deny access to the resource if another request has been
  140. // made and approved. It only invalidates a single approval.
  141. //
  142. // Returns FAILED_PRECONDITION if the request exists but is not in an approved
  143. // state.
  144. rpc InvalidateApprovalRequest(InvalidateApprovalRequestMessage) returns (ApprovalRequest) {
  145. option (google.api.http) = {
  146. post: "/v1/{name=projects/*/approvalRequests/*}:invalidate"
  147. body: "*"
  148. additional_bindings {
  149. post: "/v1/{name=folders/*/approvalRequests/*}:invalidate"
  150. body: "*"
  151. }
  152. additional_bindings {
  153. post: "/v1/{name=organizations/*/approvalRequests/*}:invalidate"
  154. body: "*"
  155. }
  156. };
  157. }
  158. // Gets the settings associated with a project, folder, or organization.
  159. rpc GetAccessApprovalSettings(GetAccessApprovalSettingsMessage) returns (AccessApprovalSettings) {
  160. option (google.api.http) = {
  161. get: "/v1/{name=projects/*/accessApprovalSettings}"
  162. additional_bindings {
  163. get: "/v1/{name=folders/*/accessApprovalSettings}"
  164. }
  165. additional_bindings {
  166. get: "/v1/{name=organizations/*/accessApprovalSettings}"
  167. }
  168. };
  169. option (google.api.method_signature) = "name";
  170. }
  171. // Updates the settings associated with a project, folder, or organization.
  172. // Settings to update are determined by the value of field_mask.
  173. rpc UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage) returns (AccessApprovalSettings) {
  174. option (google.api.http) = {
  175. patch: "/v1/{settings.name=projects/*/accessApprovalSettings}"
  176. body: "settings"
  177. additional_bindings {
  178. patch: "/v1/{settings.name=folders/*/accessApprovalSettings}"
  179. body: "settings"
  180. }
  181. additional_bindings {
  182. patch: "/v1/{settings.name=organizations/*/accessApprovalSettings}"
  183. body: "settings"
  184. }
  185. };
  186. option (google.api.method_signature) = "settings,update_mask";
  187. }
  188. // Deletes the settings associated with a project, folder, or organization.
  189. // This will have the effect of disabling Access Approval for the project,
  190. // folder, or organization, but only if all ancestors also have Access
  191. // Approval disabled. If Access Approval is enabled at a higher level of the
  192. // hierarchy, then Access Approval will still be enabled at this level as
  193. // the settings are inherited.
  194. rpc DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage) returns (google.protobuf.Empty) {
  195. option (google.api.http) = {
  196. delete: "/v1/{name=projects/*/accessApprovalSettings}"
  197. additional_bindings {
  198. delete: "/v1/{name=folders/*/accessApprovalSettings}"
  199. }
  200. additional_bindings {
  201. delete: "/v1/{name=organizations/*/accessApprovalSettings}"
  202. }
  203. };
  204. option (google.api.method_signature) = "name";
  205. }
  206. // Retrieves the service account that is used by Access Approval to access KMS
  207. // keys for signing approved approval requests.
  208. rpc GetAccessApprovalServiceAccount(GetAccessApprovalServiceAccountMessage) returns (AccessApprovalServiceAccount) {
  209. option (google.api.http) = {
  210. get: "/v1/{name=projects/*/serviceAccount}"
  211. additional_bindings {
  212. get: "/v1/{name=folders/*/serviceAccount}"
  213. }
  214. additional_bindings {
  215. get: "/v1/{name=organizations/*/serviceAccount}"
  216. }
  217. };
  218. option (google.api.method_signature) = "name";
  219. }
  220. }
  221. // Home office and physical location of the principal.
  222. message AccessLocations {
  223. // The "home office" location of the principal. A two-letter country code
  224. // (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some
  225. // limited situations Google systems may refer refer to a region code instead
  226. // of a country code.
  227. // Possible Region Codes:
  228. //
  229. // * ASI: Asia
  230. // * EUR: Europe
  231. // * OCE: Oceania
  232. // * AFR: Africa
  233. // * NAM: North America
  234. // * SAM: South America
  235. // * ANT: Antarctica
  236. // * ANY: Any location
  237. string principal_office_country = 1;
  238. // Physical location of the principal at the time of the access. A
  239. // two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or
  240. // a region code. In some limited situations Google systems may refer refer to
  241. // a region code instead of a country code.
  242. // Possible Region Codes:
  243. //
  244. // * ASI: Asia
  245. // * EUR: Europe
  246. // * OCE: Oceania
  247. // * AFR: Africa
  248. // * NAM: North America
  249. // * SAM: South America
  250. // * ANT: Antarctica
  251. // * ANY: Any location
  252. string principal_physical_location_country = 2;
  253. }
  254. message AccessReason {
  255. // Type of access justification.
  256. enum Type {
  257. // Default value for proto, shouldn't be used.
  258. TYPE_UNSPECIFIED = 0;
  259. // Customer made a request or raised an issue that required the principal to
  260. // access customer data. `detail` is of the form ("#####" is the issue ID):
  261. //
  262. // * "Feedback Report: #####"
  263. // * "Case Number: #####"
  264. // * "Case ID: #####"
  265. // * "E-PIN Reference: #####"
  266. // * "Google-#####"
  267. // * "T-#####"
  268. CUSTOMER_INITIATED_SUPPORT = 1;
  269. // The principal accessed customer data in order to diagnose or resolve a
  270. // suspected issue in services. Often this access is used to confirm that
  271. // customers are not affected by a suspected service issue or to remediate a
  272. // reversible system issue.
  273. GOOGLE_INITIATED_SERVICE = 2;
  274. // Google initiated service for security, fraud, abuse, or compliance
  275. // purposes.
  276. GOOGLE_INITIATED_REVIEW = 3;
  277. // The principal was compelled to access customer data in order to respond
  278. // to a legal third party data request or process, including legal processes
  279. // from customers themselves.
  280. THIRD_PARTY_DATA_REQUEST = 4;
  281. // The principal accessed customer data in order to diagnose or resolve a
  282. // suspected issue in services or a known outage.
  283. GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 5;
  284. }
  285. // Type of access justification.
  286. Type type = 1;
  287. // More detail about certain reason types. See comments for each type above.
  288. string detail = 2;
  289. }
  290. // Information about the digital signature of the resource.
  291. message SignatureInfo {
  292. // The digital signature.
  293. bytes signature = 1;
  294. // How this signature may be verified.
  295. oneof verification_info {
  296. // The public key for the Google default signing, encoded in PEM format. The
  297. // signature was created using a private key which may be verified using
  298. // this public key.
  299. string google_public_key_pem = 2;
  300. // The resource name of the customer CryptoKeyVersion used for signing.
  301. string customer_kms_key_version = 3;
  302. }
  303. }
  304. // A decision that has been made to approve access to a resource.
  305. message ApproveDecision {
  306. // The time at which approval was granted.
  307. google.protobuf.Timestamp approve_time = 1;
  308. // The time at which the approval expires.
  309. google.protobuf.Timestamp expire_time = 2;
  310. // If set, denotes the timestamp at which the approval is invalidated.
  311. google.protobuf.Timestamp invalidate_time = 3;
  312. // The signature for the ApprovalRequest and details on how it was signed.
  313. SignatureInfo signature_info = 4;
  314. // True when the request has been auto-approved.
  315. bool auto_approved = 5;
  316. }
  317. // A decision that has been made to dismiss an approval request.
  318. message DismissDecision {
  319. // The time at which the approval request was dismissed.
  320. google.protobuf.Timestamp dismiss_time = 1;
  321. // This field will be true if the ApprovalRequest was implicitly dismissed due
  322. // to inaction by the access approval approvers (the request is not acted
  323. // on by the approvers before the exiration time).
  324. bool implicit = 2;
  325. }
  326. // The properties associated with the resource of the request.
  327. message ResourceProperties {
  328. // Whether an approval will exclude the descendants of the resource being
  329. // requested.
  330. bool excludes_descendants = 1;
  331. }
  332. // A request for the customer to approve access to a resource.
  333. message ApprovalRequest {
  334. option (google.api.resource) = {
  335. type: "accessapproval.googleapis.com/ApprovalRequest"
  336. pattern: "projects/{project}/approvalRequests/{approval_request}"
  337. pattern: "folders/{folder}/approvalRequests/{approval_request}"
  338. pattern: "organizations/{organization}/approvalRequests/{approval_request}"
  339. };
  340. // The resource name of the request. Format is
  341. // "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}".
  342. string name = 1;
  343. // The resource for which approval is being requested. The format of the
  344. // resource name is defined at
  345. // https://cloud.google.com/apis/design/resource_names. The resource name here
  346. // may either be a "full" resource name (e.g.
  347. // "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative"
  348. // resource name (e.g. "shelves/shelf1/books/book2") as described in the
  349. // resource name specification.
  350. string requested_resource_name = 2;
  351. // Properties related to the resource represented by requested_resource_name.
  352. ResourceProperties requested_resource_properties = 9;
  353. // The justification for which approval is being requested.
  354. AccessReason requested_reason = 3;
  355. // The locations for which approval is being requested.
  356. AccessLocations requested_locations = 4;
  357. // The time at which approval was requested.
  358. google.protobuf.Timestamp request_time = 5;
  359. // The requested expiration for the approval. If the request is approved,
  360. // access will be granted from the time of approval until the expiration time.
  361. google.protobuf.Timestamp requested_expiration = 6;
  362. // The current decision on the approval request.
  363. oneof decision {
  364. // Access was approved.
  365. ApproveDecision approve = 7;
  366. // The request was dismissed.
  367. DismissDecision dismiss = 8;
  368. }
  369. }
  370. // Represents the type of enrollment for a given service to Access Approval.
  371. enum EnrollmentLevel {
  372. // Default value for proto, shouldn't be used.
  373. ENROLLMENT_LEVEL_UNSPECIFIED = 0;
  374. // Service is enrolled in Access Approval for all requests
  375. BLOCK_ALL = 1;
  376. }
  377. // Represents the enrollment of a cloud resource into a specific service.
  378. message EnrolledService {
  379. // The product for which Access Approval will be enrolled. Allowed values are
  380. // listed below (case-sensitive):
  381. //
  382. // * all
  383. // * GA
  384. // * App Engine
  385. // * BigQuery
  386. // * Cloud Bigtable
  387. // * Cloud Key Management Service
  388. // * Compute Engine
  389. // * Cloud Dataflow
  390. // * Cloud Dataproc
  391. // * Cloud DLP
  392. // * Cloud EKM
  393. // * Cloud HSM
  394. // * Cloud Identity and Access Management
  395. // * Cloud Logging
  396. // * Cloud Pub/Sub
  397. // * Cloud Spanner
  398. // * Cloud SQL
  399. // * Cloud Storage
  400. // * Google Kubernetes Engine
  401. // * Organization Policy Serivice
  402. // * Persistent Disk
  403. // * Resource Manager
  404. // * Secret Manager
  405. // * Speaker ID
  406. //
  407. // Note: These values are supported as input for legacy purposes, but will not
  408. // be returned from the API.
  409. //
  410. // * all
  411. // * ga-only
  412. // * appengine.googleapis.com
  413. // * bigquery.googleapis.com
  414. // * bigtable.googleapis.com
  415. // * container.googleapis.com
  416. // * cloudkms.googleapis.com
  417. // * cloudresourcemanager.googleapis.com
  418. // * cloudsql.googleapis.com
  419. // * compute.googleapis.com
  420. // * dataflow.googleapis.com
  421. // * dataproc.googleapis.com
  422. // * dlp.googleapis.com
  423. // * iam.googleapis.com
  424. // * logging.googleapis.com
  425. // * orgpolicy.googleapis.com
  426. // * pubsub.googleapis.com
  427. // * spanner.googleapis.com
  428. // * secretmanager.googleapis.com
  429. // * speakerid.googleapis.com
  430. // * storage.googleapis.com
  431. //
  432. // Calls to UpdateAccessApprovalSettings using 'all' or any of the
  433. // XXX.googleapis.com will be translated to the associated product name
  434. // ('all', 'App Engine', etc.).
  435. //
  436. // Note: 'all' will enroll the resource in all products supported at both 'GA'
  437. // and 'Preview' levels.
  438. //
  439. // More information about levels of support is available at
  440. // https://cloud.google.com/access-approval/docs/supported-services
  441. string cloud_product = 1;
  442. // The enrollment level of the service.
  443. EnrollmentLevel enrollment_level = 2;
  444. }
  445. // Settings on a Project/Folder/Organization related to Access Approval.
  446. message AccessApprovalSettings {
  447. option (google.api.resource) = {
  448. type: "accessapproval.googleapis.com/AccessApprovalSettings"
  449. pattern: "projects/{project}/accessApprovalSettings"
  450. pattern: "folders/{folder}/accessApprovalSettings"
  451. pattern: "organizations/{organization}/accessApprovalSettings"
  452. };
  453. // The resource name of the settings. Format is one of:
  454. //
  455. // * "projects/{project}/accessApprovalSettings"
  456. // * "folders/{folder}/accessApprovalSettings"
  457. // * "organizations/{organization}/accessApprovalSettings"
  458. string name = 1 [(google.api.resource_reference) = {
  459. type: "accessapproval.googleapis.com/AccessApprovalSettings"
  460. }];
  461. // A list of email addresses to which notifications relating to approval
  462. // requests should be sent. Notifications relating to a resource will be sent
  463. // to all emails in the settings of ancestor resources of that resource. A
  464. // maximum of 50 email addresses are allowed.
  465. repeated string notification_emails = 2;
  466. // A list of Google Cloud Services for which the given resource has Access
  467. // Approval enrolled. Access requests for the resource given by name against
  468. // any of these services contained here will be required to have explicit
  469. // approval. If name refers to an organization, enrollment can be done for
  470. // individual services. If name refers to a folder or project, enrollment can
  471. // only be done on an all or nothing basis.
  472. //
  473. // If a cloud_product is repeated in this list, the first entry will be
  474. // honored and all following entries will be discarded. A maximum of 10
  475. // enrolled services will be enforced, to be expanded as the set of supported
  476. // services is expanded.
  477. repeated EnrolledService enrolled_services = 3;
  478. // Output only. This field is read only (not settable via
  479. // UpdateAccessApprovalSettings method). If the field is true, that
  480. // indicates that at least one service is enrolled for Access Approval in one
  481. // or more ancestors of the Project or Folder (this field will always be
  482. // unset for the organization since organizations do not have ancestors).
  483. bool enrolled_ancestor = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  484. // The asymmetric crypto key version to use for signing approval requests.
  485. // Empty active_key_version indicates that a Google-managed key should be used
  486. // for signing. This property will be ignored if set by an ancestor of this
  487. // resource, and new non-empty values may not be set.
  488. string active_key_version = 6;
  489. // Output only. This field is read only (not settable via UpdateAccessApprovalSettings
  490. // method). If the field is true, that indicates that an ancestor of this
  491. // Project or Folder has set active_key_version (this field will always be
  492. // unset for the organization since organizations do not have ancestors).
  493. bool ancestor_has_active_key_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  494. // Output only. This field is read only (not settable via UpdateAccessApprovalSettings
  495. // method). If the field is true, that indicates that there is some
  496. // configuration issue with the active_key_version configured at this level in
  497. // the resource hierarchy (e.g. it doesn't exist or the Access Approval
  498. // service account doesn't have the correct permissions on it, etc.) This key
  499. // version is not necessarily the effective key version at this level, as key
  500. // versions are inherited top-down.
  501. bool invalid_key_version = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  502. }
  503. // Access Approval service account related to a project/folder/organization.
  504. message AccessApprovalServiceAccount {
  505. option (google.api.resource) = {
  506. type: "accessapproval.googleapis.com/AccessApprovalServiceAccount"
  507. pattern: "projects/{project}/serviceAccount"
  508. pattern: "folders/{folder}/serviceAccount"
  509. pattern: "organizations/{organization}/serviceAccount"
  510. };
  511. // The resource name of the Access Approval service account. Format is one of:
  512. //
  513. // * "projects/{project}/serviceAccount"
  514. // * "folders/{folder}/serviceAccount"
  515. // * "organizations/{organization}/serviceAccount"
  516. string name = 1 [(google.api.resource_reference) = {
  517. type: "accessapproval.googleapis.com/AccessApprovalServiceAccount"
  518. }];
  519. // Email address of the service account.
  520. string account_email = 2;
  521. }
  522. // Request to list approval requests.
  523. message ListApprovalRequestsMessage {
  524. // The parent resource. This may be "projects/{project}",
  525. // "folders/{folder}", or "organizations/{organization}".
  526. string parent = 1 [(google.api.resource_reference) = {
  527. child_type: "accessapproval.googleapis.com/ApprovalRequest"
  528. }];
  529. // A filter on the type of approval requests to retrieve. Must be one of the
  530. // following values:
  531. //
  532. // * [not set]: Requests that are pending or have active approvals.
  533. // * ALL: All requests.
  534. // * PENDING: Only pending requests.
  535. // * ACTIVE: Only active (i.e. currently approved) requests.
  536. // * DISMISSED: Only requests that have been dismissed, or requests that
  537. // are not approved and past expiration.
  538. // * EXPIRED: Only requests that have been approved, and the approval has
  539. // expired.
  540. // * HISTORY: Active, dismissed and expired requests.
  541. string filter = 2;
  542. // Requested page size.
  543. int32 page_size = 3;
  544. // A token identifying the page of results to return.
  545. string page_token = 4;
  546. }
  547. // Response to listing of ApprovalRequest objects.
  548. message ListApprovalRequestsResponse {
  549. // Approval request details.
  550. repeated ApprovalRequest approval_requests = 1;
  551. // Token to retrieve the next page of results, or empty if there are no more.
  552. string next_page_token = 2;
  553. }
  554. // Request to get an approval request.
  555. message GetApprovalRequestMessage {
  556. // The name of the approval request to retrieve.
  557. // Format:
  558. // "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}"
  559. string name = 1 [(google.api.resource_reference) = {
  560. type: "accessapproval.googleapis.com/ApprovalRequest"
  561. }];
  562. }
  563. // Request to approve an ApprovalRequest.
  564. message ApproveApprovalRequestMessage {
  565. // Name of the approval request to approve.
  566. string name = 1 [(google.api.resource_reference) = {
  567. type: "accessapproval.googleapis.com/ApprovalRequest"
  568. }];
  569. // The expiration time of this approval.
  570. google.protobuf.Timestamp expire_time = 2;
  571. }
  572. // Request to dismiss an approval request.
  573. message DismissApprovalRequestMessage {
  574. // Name of the ApprovalRequest to dismiss.
  575. string name = 1 [(google.api.resource_reference) = {
  576. type: "accessapproval.googleapis.com/ApprovalRequest"
  577. }];
  578. }
  579. // Request to invalidate an existing approval.
  580. message InvalidateApprovalRequestMessage {
  581. // Name of the ApprovalRequest to invalidate.
  582. string name = 1 [(google.api.resource_reference) = {
  583. type: "accessapproval.googleapis.com/ApprovalRequest"
  584. }];
  585. }
  586. // Request to get access approval settings.
  587. message GetAccessApprovalSettingsMessage {
  588. // The name of the AccessApprovalSettings to retrieve.
  589. // Format: "{projects|folders|organizations}/{id}/accessApprovalSettings"
  590. string name = 1 [(google.api.resource_reference) = {
  591. type: "accessapproval.googleapis.com/AccessApprovalSettings"
  592. }];
  593. }
  594. // Request to update access approval settings.
  595. message UpdateAccessApprovalSettingsMessage {
  596. // The new AccessApprovalSettings.
  597. AccessApprovalSettings settings = 1;
  598. // The update mask applies to the settings. Only the top level fields of
  599. // AccessApprovalSettings (notification_emails & enrolled_services) are
  600. // supported. For each field, if it is included, the currently stored value
  601. // will be entirely overwritten with the value of the field passed in this
  602. // request.
  603. //
  604. // For the `FieldMask` definition, see
  605. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  606. // If this field is left unset, only the notification_emails field will be
  607. // updated.
  608. google.protobuf.FieldMask update_mask = 2;
  609. }
  610. // Request to delete access approval settings.
  611. message DeleteAccessApprovalSettingsMessage {
  612. // Name of the AccessApprovalSettings to delete.
  613. string name = 1 [(google.api.resource_reference) = {
  614. type: "accessapproval.googleapis.com/AccessApprovalSettings"
  615. }];
  616. }
  617. // Request to get an Access Approval service account.
  618. message GetAccessApprovalServiceAccountMessage {
  619. // Name of the AccessApprovalServiceAccount to retrieve.
  620. string name = 1;
  621. }