Skip to main content

pull_request_approval_states

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

Overview

Namepull_request_approval_states
TypeResource
Idaws.codecommit.pull_request_approval_states

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
approvalsarrayInformation about users who have approved the pull request.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_pull_request_approval_statesselectregionGets information about the approval states for a specified pull request. Approval states only apply to pull requests that have one or more approval rules applied to them.
update_pull_request_approval_stateupdateregion, pullRequestId, revisionId, approvalStateUpdates the state of a user's approval on a pull request. The user is derived from the signed-in account when the request is made.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Gets information about the approval states for a specified pull request. Approval states only apply to pull requests that have one or more approval rules applied to them.

SELECT
approvals
FROM aws.codecommit.pull_request_approval_states
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Updates the state of a user's approval on a pull request. The user is derived from the signed-in account when the request is made.

UPDATE aws.codecommit.pull_request_approval_states
SET
pullRequestId = '{{ pullRequestId }}',
revisionId = '{{ revisionId }}',
approvalState = '{{ approvalState }}'
WHERE
region = '{{ region }}' --required
AND pullRequestId = '{{ pullRequestId }}' --required
AND revisionId = '{{ revisionId }}' --required
AND approvalState = '{{ approvalState }}' --required;