pull_request_approval_states
Creates, updates, deletes, gets or lists a pull_request_approval_states resource.
Overview
| Name | pull_request_approval_states |
| Type | Resource |
| Id | aws.codecommit.pull_request_approval_states |
Fields
The following fields are returned by SELECT queries:
- get_pull_request_approval_states
| Name | Datatype | Description |
|---|---|---|
approvals | array | Information about users who have approved the pull request. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_pull_request_approval_states | select | region | 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. | |
update_pull_request_approval_state | update | region, pullRequestId, revisionId, approvalState | 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. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_pull_request_approval_states
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
- update_pull_request_approval_state
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;