GetPullRequestOverrideStateCommand

Returns information about whether approval rules have been set aside (overridden) for a pull request, and if so, the Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { CodeCommitClient, GetPullRequestOverrideStateCommand } from "@aws-sdk/client-codecommit"; // ES Modules import
// const { CodeCommitClient, GetPullRequestOverrideStateCommand } = require("@aws-sdk/client-codecommit"); // CommonJS import
const client = new CodeCommitClient(config);
const input = { // GetPullRequestOverrideStateInput
  pullRequestId: "STRING_VALUE", // required
  revisionId: "STRING_VALUE", // required
};
const command = new GetPullRequestOverrideStateCommand(input);
const response = await client.send(command);
// { // GetPullRequestOverrideStateOutput
//   overridden: true || false,
//   overrider: "STRING_VALUE",
// };

GetPullRequestOverrideStateCommand Input

Parameter
Type
Description
pullRequestId
Required
string | undefined

The ID of the pull request for which you want to get information about whether approval rules have been set aside (overridden).

revisionId
Required
string | undefined

The system-generated ID of the revision for the pull request. To retrieve the most recent revision ID, use GetPullRequest.

GetPullRequestOverrideStateCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
overridden
boolean | undefined

A Boolean value that indicates whether a pull request has had its rules set aside (TRUE) or whether all approval rules still apply (FALSE).

overrider
string | undefined

The Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.

Throws

Name
Fault
Details
EncryptionIntegrityChecksFailedException
server

An encryption integrity check failed.

EncryptionKeyAccessDeniedException
client

An encryption key could not be accessed.

EncryptionKeyDisabledException
client

The encryption key is disabled.

EncryptionKeyNotFoundException
client

No encryption key was found.

EncryptionKeyUnavailableException
client

The encryption key is not available.

InvalidPullRequestIdException
client

The pull request ID is not valid. Make sure that you have provided the full ID and that the pull request is in the specified repository, and then try again.

InvalidRevisionIdException
client

The revision ID is not valid. Use GetPullRequest to determine the value.

PullRequestDoesNotExistException
client

The pull request ID could not be found. Make sure that you have specified the correct repository name and pull request ID, and then try again.

PullRequestIdRequiredException
client

A pull request ID is required, but none was provided.

RevisionIdRequiredException
client

A revision ID is required, but was not provided.

CodeCommitServiceException
Base exception class for all service exceptions from CodeCommit service.