approval_requests
Creates, updates, deletes, gets or lists an approval_requests
resource.
Overview
Name | approval_requests |
Type | Resource |
Id | google.accessapproval.approval_requests |
Fields
The following fields are returned by SELECT
queries:
- projects_approval_requests_get
- folders_approval_requests_get
- organizations_approval_requests_get
- projects_approval_requests_list
- folders_approval_requests_list
- organizations_approval_requests_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". |
approve | object | Access was approved. (id: ApproveDecision) |
dismiss | object | The request was dismissed. (id: DismissDecision) |
requestTime | string (google-datetime) | The time at which approval was requested. |
requestedAugmentedInfo | object | This field contains the augmented information of the request. (id: AugmentedInfo) |
requestedDuration | string (google-duration) | The requested access duration. |
requestedExpiration | string (google-datetime) | The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. |
requestedLocations | object | The locations for which approval is being requested. (id: AccessLocations) |
requestedReason | object | The justification for which approval is being requested. (id: AccessReason) |
requestedResourceName | string | The 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. |
requestedResourceProperties | object | Properties related to the resource represented by requested_resource_name. (id: ResourceProperties) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". |
approve | object | Access was approved. (id: ApproveDecision) |
dismiss | object | The request was dismissed. (id: DismissDecision) |
requestTime | string (google-datetime) | The time at which approval was requested. |
requestedAugmentedInfo | object | This field contains the augmented information of the request. (id: AugmentedInfo) |
requestedDuration | string (google-duration) | The requested access duration. |
requestedExpiration | string (google-datetime) | The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. |
requestedLocations | object | The locations for which approval is being requested. (id: AccessLocations) |
requestedReason | object | The justification for which approval is being requested. (id: AccessReason) |
requestedResourceName | string | The 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. |
requestedResourceProperties | object | Properties related to the resource represented by requested_resource_name. (id: ResourceProperties) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". |
approve | object | Access was approved. (id: ApproveDecision) |
dismiss | object | The request was dismissed. (id: DismissDecision) |
requestTime | string (google-datetime) | The time at which approval was requested. |
requestedAugmentedInfo | object | This field contains the augmented information of the request. (id: AugmentedInfo) |
requestedDuration | string (google-duration) | The requested access duration. |
requestedExpiration | string (google-datetime) | The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. |
requestedLocations | object | The locations for which approval is being requested. (id: AccessLocations) |
requestedReason | object | The justification for which approval is being requested. (id: AccessReason) |
requestedResourceName | string | The 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. |
requestedResourceProperties | object | Properties related to the resource represented by requested_resource_name. (id: ResourceProperties) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". |
approve | object | Access was approved. (id: ApproveDecision) |
dismiss | object | The request was dismissed. (id: DismissDecision) |
requestTime | string (google-datetime) | The time at which approval was requested. |
requestedAugmentedInfo | object | This field contains the augmented information of the request. (id: AugmentedInfo) |
requestedDuration | string (google-duration) | The requested access duration. |
requestedExpiration | string (google-datetime) | The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. |
requestedLocations | object | The locations for which approval is being requested. (id: AccessLocations) |
requestedReason | object | The justification for which approval is being requested. (id: AccessReason) |
requestedResourceName | string | The 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. |
requestedResourceProperties | object | Properties related to the resource represented by requested_resource_name. (id: ResourceProperties) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". |
approve | object | Access was approved. (id: ApproveDecision) |
dismiss | object | The request was dismissed. (id: DismissDecision) |
requestTime | string (google-datetime) | The time at which approval was requested. |
requestedAugmentedInfo | object | This field contains the augmented information of the request. (id: AugmentedInfo) |
requestedDuration | string (google-duration) | The requested access duration. |
requestedExpiration | string (google-datetime) | The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. |
requestedLocations | object | The locations for which approval is being requested. (id: AccessLocations) |
requestedReason | object | The justification for which approval is being requested. (id: AccessReason) |
requestedResourceName | string | The 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. |
requestedResourceProperties | object | Properties related to the resource represented by requested_resource_name. (id: ResourceProperties) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". |
approve | object | Access was approved. (id: ApproveDecision) |
dismiss | object | The request was dismissed. (id: DismissDecision) |
requestTime | string (google-datetime) | The time at which approval was requested. |
requestedAugmentedInfo | object | This field contains the augmented information of the request. (id: AugmentedInfo) |
requestedDuration | string (google-duration) | The requested access duration. |
requestedExpiration | string (google-datetime) | The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. |
requestedLocations | object | The locations for which approval is being requested. (id: AccessLocations) |
requestedReason | object | The justification for which approval is being requested. (id: AccessReason) |
requestedResourceName | string | The 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. |
requestedResourceProperties | object | Properties related to the resource represented by requested_resource_name. (id: ResourceProperties) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_approval_requests_get | select | projectsId , approvalRequestsId | Gets an approval request. Returns NOT_FOUND if the request does not exist. | |
folders_approval_requests_get | select | foldersId , approvalRequestsId | Gets an approval request. Returns NOT_FOUND if the request does not exist. | |
organizations_approval_requests_get | select | organizationsId , approvalRequestsId | Gets an approval request. Returns NOT_FOUND if the request does not exist. | |
projects_approval_requests_list | select | projectsId | filter , pageSize , pageToken | 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. |
folders_approval_requests_list | select | foldersId | filter , pageSize , pageToken | 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. |
organizations_approval_requests_list | select | organizationsId | filter , pageSize , pageToken | 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. |
projects_approval_requests_approve | exec | projectsId , approvalRequestsId | 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. | |
projects_approval_requests_dismiss | exec | projectsId , approvalRequestsId | 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. | |
projects_approval_requests_invalidate | exec | projectsId , approvalRequestsId | 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. | |
folders_approval_requests_approve | exec | foldersId , approvalRequestsId | 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. | |
folders_approval_requests_dismiss | exec | foldersId , approvalRequestsId | 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. | |
folders_approval_requests_invalidate | exec | foldersId , approvalRequestsId | 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. | |
organizations_approval_requests_approve | exec | organizationsId , approvalRequestsId | 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. | |
organizations_approval_requests_dismiss | exec | organizationsId , approvalRequestsId | 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. | |
organizations_approval_requests_invalidate | exec | organizationsId , approvalRequestsId | 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. |
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.
Name | Datatype | Description |
---|---|---|
approvalRequestsId | string | |
foldersId | string | |
organizationsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- projects_approval_requests_get
- folders_approval_requests_get
- organizations_approval_requests_get
- projects_approval_requests_list
- folders_approval_requests_list
- organizations_approval_requests_list
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 projectsId = '{{ projectsId }}' -- required
AND approvalRequestsId = '{{ approvalRequestsId }}' -- required;
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 foldersId = '{{ foldersId }}' -- required
AND approvalRequestsId = '{{ approvalRequestsId }}' -- required;
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;
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 projectsId = '{{ projectsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
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 }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
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 organizationsId = '{{ organizationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Lifecycle Methods
- projects_approval_requests_approve
- projects_approval_requests_dismiss
- projects_approval_requests_invalidate
- folders_approval_requests_approve
- folders_approval_requests_dismiss
- folders_approval_requests_invalidate
- organizations_approval_requests_approve
- organizations_approval_requests_dismiss
- organizations_approval_requests_invalidate
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.
EXEC google.accessapproval.approval_requests.projects_approval_requests_approve
@projectsId='{{ projectsId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required
@@json=
'{
"expireTime": "{{ expireTime }}"
}';
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.
EXEC google.accessapproval.approval_requests.projects_approval_requests_dismiss
@projectsId='{{ projectsId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required;
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.
EXEC google.accessapproval.approval_requests.projects_approval_requests_invalidate
@projectsId='{{ projectsId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required;
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.
EXEC google.accessapproval.approval_requests.folders_approval_requests_approve
@foldersId='{{ foldersId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required
@@json=
'{
"expireTime": "{{ expireTime }}"
}';
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.
EXEC google.accessapproval.approval_requests.folders_approval_requests_dismiss
@foldersId='{{ foldersId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required;
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.
EXEC google.accessapproval.approval_requests.folders_approval_requests_invalidate
@foldersId='{{ foldersId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required;
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.
EXEC google.accessapproval.approval_requests.organizations_approval_requests_approve
@organizationsId='{{ organizationsId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required
@@json=
'{
"expireTime": "{{ expireTime }}"
}';
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.
EXEC google.accessapproval.approval_requests.organizations_approval_requests_dismiss
@organizationsId='{{ organizationsId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required;
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.
EXEC google.accessapproval.approval_requests.organizations_approval_requests_invalidate
@organizationsId='{{ organizationsId }}' --required,
@approvalRequestsId='{{ approvalRequestsId }}' --required;