AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Creates a pull request in the specified repository.
This is an asynchronous operation using the standard naming convention for .NET 4.7.2 or higher.
Namespace: Amazon.CodeCommit
Assembly: AWSSDK.CodeCommit.dll
Version: 3.x.y.z
public virtual Task<CreatePullRequestResponse> CreatePullRequestAsync( CreatePullRequestRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the CreatePullRequest service method.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
| Exception | Condition |
|---|---|
| ClientRequestTokenRequiredException | A client request token is required. A client request token is an unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token. |
| EncryptionIntegrityChecksFailedException | An encryption integrity check failed. |
| EncryptionKeyAccessDeniedException | An encryption key could not be accessed. |
| EncryptionKeyDisabledException | The encryption key is disabled. |
| EncryptionKeyNotFoundException | No encryption key was found. |
| EncryptionKeyUnavailableException | The encryption key is not available. |
| IdempotencyParameterMismatchException | The client request token is not valid. Either the token is not in a valid format, or the token has been used in a previous request and cannot be reused. |
| InvalidClientRequestTokenException | The client request token is not valid. |
| InvalidDescriptionException | The pull request description is not valid. Descriptions cannot be more than 1,000 characters. |
| InvalidReferenceNameException | The specified reference name format is not valid. Reference names must conform to the Git references format (for example, refs/heads/main). For more information, see Git Internals - Git References or consult your Git documentation. |
| InvalidRepositoryNameException | A specified repository name is not valid. This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist. |
| InvalidTargetException | The target for the pull request is not valid. A target must contain the full values for the repository name, source branch, and destination branch for the pull request. |
| InvalidTargetsException | The targets for the pull request is not valid or not in a valid format. Targets are a list of target objects. Each target object must contain the full values for the repository name, source branch, and destination branch for a pull request. |
| InvalidTitleException | The title of the pull request is not valid. Pull request titles cannot exceed 100 characters in length. |
| MaximumOpenPullRequestsExceededException | You cannot create the pull request because the repository has too many open pull requests. The maximum number of open pull requests for a repository is 1,000. Close one or more open pull requests, and then try again. |
| MultipleRepositoriesInPullRequestException | You cannot include more than one repository in a pull request. Make sure you have specified only one repository name in your request, and then try again. |
| ReferenceDoesNotExistException | The specified reference does not exist. You must provide a full commit ID. |
| ReferenceNameRequiredException | A reference name is required, but none was provided. |
| ReferenceTypeNotSupportedException | The specified reference is not a supported type. |
| RepositoryDoesNotExistException | The specified repository does not exist. |
| RepositoryNameRequiredException | A repository name is required, but was not specified. |
| SourceAndDestinationAreSameException | The source branch and destination branch for the pull request are the same. You must specify different branches for the source and destination. |
| TargetRequiredException | A pull request target is required. It cannot be empty or null. A pull request target must contain the full values for the repository name, source branch, and destination branch for the pull request. |
| TargetsRequiredException | An array of target objects is required. It cannot be empty or null. |
| TitleRequiredException | A pull request title is required. It cannot be empty or null. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer