Skip to main content

approval_requests

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

Overview

Nameapproval_requests
TypeResource
Idgoogle.accessapproval.approval_requests

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}".
approveobjectAccess was approved. (id: ApproveDecision)
dismissobjectThe request was dismissed. (id: DismissDecision)
requestTimestring (google-datetime)The time at which approval was requested.
requestedAugmentedInfoobjectThis field contains the augmented information of the request. (id: AugmentedInfo)
requestedDurationstring (google-duration)The requested access duration.
requestedExpirationstring (google-datetime)The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time.
requestedLocationsobjectThe locations for which approval is being requested. (id: AccessLocations)
requestedReasonobjectThe access reason for which approval is being requested. (id: AccessReason)
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.
requestedResourcePropertiesobjectProperties related to the resource represented by requested_resource_name. (id: ResourceProperties)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_approval_requests_getselectorganizationsId, approvalRequestsIdGets an approval request. Returns NOT_FOUND if the request does not exist.
projects_approval_requests_getselectprojectsId, approvalRequestsIdGets an approval request. Returns NOT_FOUND if the request does not exist.
folders_approval_requests_getselectfoldersId, approvalRequestsIdGets an approval request. Returns NOT_FOUND if the request does not exist.
organizations_approval_requests_listselectorganizationsIdpageSize, filter, pageTokenLists 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_listselectprojectsIdpageToken, filter, pageSizeLists 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_listselectfoldersIdpageSize, filter, pageTokenLists 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_dismissexecorganizationsId, approvalRequestsIdDismisses a request. Returns the updated ApprovalRequest. NOTE: When a request is dismissed, it is considered ignored. Dismissing a request does not prevent access granted by other Access Approval requests. 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_invalidateexecorganizationsId, approvalRequestsIdInvalidates an existing ApprovalRequest. Returns the updated ApprovalRequest. NOTE: This action revokes Google access based on this approval request. If the resource has other active approvals, access will remain granted. Returns FAILED_PRECONDITION if the request exists but is not in an approved state.
organizations_approval_requests_approveexecorganizationsId, approvalRequestsIdApproves 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_approveexecprojectsId, approvalRequestsIdApproves 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_dismissexecprojectsId, approvalRequestsIdDismisses a request. Returns the updated ApprovalRequest. NOTE: When a request is dismissed, it is considered ignored. Dismissing a request does not prevent access granted by other Access Approval requests. 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_invalidateexecprojectsId, approvalRequestsIdInvalidates an existing ApprovalRequest. Returns the updated ApprovalRequest. NOTE: This action revokes Google access based on this approval request. If the resource has other active approvals, access will remain granted. Returns FAILED_PRECONDITION if the request exists but is not in an approved state.
folders_approval_requests_dismissexecfoldersId, approvalRequestsIdDismisses a request. Returns the updated ApprovalRequest. NOTE: When a request is dismissed, it is considered ignored. Dismissing a request does not prevent access granted by other Access Approval requests. 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_approveexecfoldersId, approvalRequestsIdApproves 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_invalidateexecfoldersId, approvalRequestsIdInvalidates an existing ApprovalRequest. Returns the updated ApprovalRequest. NOTE: This action revokes Google access based on this approval request. If the resource has other active approvals, access will remain granted. Returns FAILED_PRECONDITION if the request exists but is not in an approved state.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
approvalRequestsIdstring
foldersIdstring
organizationsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets an approval request. Returns NOT_FOUND if the request does not exist.

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

Lifecycle Methods

Dismisses a request. Returns the updated ApprovalRequest. NOTE: When a request is dismissed, it is considered ignored. Dismissing a request does not prevent access granted by other Access Approval requests. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

EXEC google.accessapproval.approval_requests.organizations_approval_requests_dismiss 
@organizationsId='{{ organizationsId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required
;