Skip to main content

approval_requests

Creates, updates, deletes, gets or lists a approval_requests resource.

Overview

Nameapproval_requests
TypeResource
Idgoogle.accessapproval.approval_requests

Fields

NameDatatypeDescription
namestringThe resource name of the request. Format is "{projects
approveobjectA decision that has been made to approve access to a resource.
dismissobjectA decision that has been made to dismiss an approval request.
requestTimestringThe time at which approval was requested.
requestedAugmentedInfoobjectThis field contains the augmented information of the request.
requestedDurationstringThe requested access duration.
requestedExpirationstringThe original requested expiration for the approval. Calculated by adding the requested_duration to the request_time.
requestedLocationsobjectHome office and physical location of the principal.
requestedReasonobject
requestedResourceNamestringThe resource for which approval is being requested. The format of the resource name is defined at https://cloud.google.com/apis/design/resource_names. The resource name here may either be a "full" resource name (e.g. "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative" resource name (e.g. "shelves/shelf1/books/book2") as described in the resource name specification.
requestedResourcePropertiesobjectThe properties associated with the resource of the request.

Methods

NameAccessible byRequired ParamsDescription
folders_approval_requests_getSELECTapprovalRequestsId, foldersIdGets an approval request. Returns NOT_FOUND if the request does not exist.
folders_approval_requests_listSELECTfoldersIdLists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
organizations_approval_requests_getSELECTapprovalRequestsId, organizationsIdGets an approval request. Returns NOT_FOUND if the request does not exist.
organizations_approval_requests_listSELECTorganizationsIdLists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
projects_approval_requests_getSELECTapprovalRequestsId, projectsIdGets an approval request. Returns NOT_FOUND if the request does not exist.
projects_approval_requests_listSELECTprojectsIdLists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
folders_approval_requests_approveEXECapprovalRequestsId, foldersIdApproves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
folders_approval_requests_dismissEXECapprovalRequestsId, foldersIdDismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
folders_approval_requests_invalidateEXECapprovalRequestsId, foldersIdInvalidates an existing ApprovalRequest. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It only invalidates a single approval. Returns FAILED_PRECONDITION if the request exists but is not in an approved state.
organizations_approval_requests_approveEXECapprovalRequestsId, organizationsIdApproves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
organizations_approval_requests_dismissEXECapprovalRequestsId, organizationsIdDismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
organizations_approval_requests_invalidateEXECapprovalRequestsId, organizationsIdInvalidates an existing ApprovalRequest. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It only invalidates a single approval. Returns FAILED_PRECONDITION if the request exists but is not in an approved state.
projects_approval_requests_approveEXECapprovalRequestsId, projectsIdApproves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
projects_approval_requests_dismissEXECapprovalRequestsId, projectsIdDismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
projects_approval_requests_invalidateEXECapprovalRequestsId, projectsIdInvalidates an existing ApprovalRequest. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It only invalidates a single approval. Returns FAILED_PRECONDITION if the request exists but is not in an approved state.

SELECT examples

Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.

SELECT
name,
approve,
dismiss,
requestTime,
requestedAugmentedInfo,
requestedDuration,
requestedExpiration,
requestedLocations,
requestedReason,
requestedResourceName,
requestedResourceProperties
FROM google.accessapproval.approval_requests
WHERE foldersId = '{{ foldersId }}';