class ProjectsApprovalRequests extends Resource (View source)

The "approvalRequests" collection of methods.

Typical usage is:

 $accessapprovalService = new Google\Service\AccessApproval(...);
 $approvalRequests = $accessapprovalService->projects_approvalRequests;

Methods

approve(string $name, ApproveApprovalRequestMessage $postBody, array $optParams = [])

Approves 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. (approvalRequests.approve)

dismiss(string $name, DismissApprovalRequestMessage $postBody, array $optParams = [])

Dismisses 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. (approvalRequests.dismiss)

get(string $name, array $optParams = [])

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

invalidate(string $name, InvalidateApprovalRequestMessage $postBody, array $optParams = [])

Invalidates an existing ApprovalRequest. Returns the updated ApprovalRequest.

listProjectsApprovalRequests(string $parent, array $optParams = [])

Lists approval requests associated with a project, folder, or organization.

Details

ApprovalRequest approve(string $name, ApproveApprovalRequestMessage $postBody, array $optParams = [])

Approves 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. (approvalRequests.approve)

Parameters

string $name

Name of the approval request to approve.

ApproveApprovalRequestMessage $postBody
array $optParams

Optional parameters.

Return Value

ApprovalRequest

Exceptions

Exception

ApprovalRequest dismiss(string $name, DismissApprovalRequestMessage $postBody, array $optParams = [])

Dismisses 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. (approvalRequests.dismiss)

Parameters

string $name

Name of the ApprovalRequest to dismiss.

DismissApprovalRequestMessage $postBody
array $optParams

Optional parameters.

Return Value

ApprovalRequest

Exceptions

Exception

ApprovalRequest get(string $name, array $optParams = [])

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

(approvalRequests.get)

Parameters

string $name

The name of the approval request to retrieve. Format: "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}"

array $optParams

Optional parameters.

Return Value

ApprovalRequest

Exceptions

Exception

ApprovalRequest invalidate(string $name, InvalidateApprovalRequestMessage $postBody, array $optParams = [])

Invalidates 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. (approvalRequests.invalidate)

Parameters

string $name

Name of the ApprovalRequest to invalidate.

InvalidateApprovalRequestMessage $postBody
array $optParams

Optional parameters.

Return Value

ApprovalRequest

Exceptions

Exception

ListApprovalRequestsResponse listProjectsApprovalRequests(string $parent, array $optParams = [])

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. (approvalRequests.listProjectsApprovalRequests)

Parameters

string $parent

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

array $optParams

Optional parameters.

Return Value

ListApprovalRequestsResponse

Exceptions

Exception