AWS CodeCommit 2015-04-13
- Client: Aws\CodeCommit\CodeCommitClient
- Service ID: codecommit
- Version: 2015-04-13
This page describes the parameters and results for the operations of the AWS CodeCommit (2015-04-13), and shows how to use the Aws\CodeCommit\CodeCommitClient object to call the described operations. This documentation is specific to the 2015-04-13 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- AssociateApprovalRuleTemplateWithRepository ( array $params = [] )
- Creates an association between an approval rule template and a specified repository.
- BatchAssociateApprovalRuleTemplateWithRepositories ( array $params = [] )
- Creates an association between an approval rule template and one or more specified repositories.
- BatchDescribeMergeConflicts ( array $params = [] )
- Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
- BatchDisassociateApprovalRuleTemplateFromRepositories ( array $params = [] )
- Removes the association between an approval rule template and one or more specified repositories.
- BatchGetCommits ( array $params = [] )
- Returns information about the contents of one or more commits in a repository.
- BatchGetRepositories ( array $params = [] )
- Returns information about one or more repositories.
- CreateApprovalRuleTemplate ( array $params = [] )
- Creates a template for approval rules that can then be associated with one or more repositories in your Amazon Web Services account.
- CreateBranch ( array $params = [] )
- Creates a branch in a repository and points the branch to a commit.
- CreateCommit ( array $params = [] )
- Creates a commit for a repository on the tip of a specified branch.
- CreatePullRequest ( array $params = [] )
- Creates a pull request in the specified repository.
- CreatePullRequestApprovalRule ( array $params = [] )
- Creates an approval rule for a pull request.
- CreateRepository ( array $params = [] )
- Creates a new, empty repository.
- CreateUnreferencedMergeCommit ( array $params = [] )
- Creates an unreferenced commit that represents the result of merging two branches using a specified merge strategy.
- DeleteApprovalRuleTemplate ( array $params = [] )
- Deletes a specified approval rule template.
- DeleteBranch ( array $params = [] )
- Deletes a branch from a repository, unless that branch is the default branch for the repository.
- DeleteCommentContent ( array $params = [] )
- Deletes the content of a comment made on a change, file, or commit in a repository.
- DeleteFile ( array $params = [] )
- Deletes a specified file from a specified branch.
- DeletePullRequestApprovalRule ( array $params = [] )
- Deletes an approval rule from a specified pull request.
- DeleteRepository ( array $params = [] )
- Deletes a repository.
- DescribeMergeConflicts ( array $params = [] )
- Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
- DescribePullRequestEvents ( array $params = [] )
- Returns information about one or more pull request events.
- DisassociateApprovalRuleTemplateFromRepository ( array $params = [] )
- Removes the association between a template and a repository so that approval rules based on the template are not automatically created when pull requests are created in the specified repository.
- EvaluatePullRequestApprovalRules ( array $params = [] )
- Evaluates whether a pull request has met all the conditions specified in its associated approval rules.
- GetApprovalRuleTemplate ( array $params = [] )
- Returns information about a specified approval rule template.
- GetBlob ( array $params = [] )
- Returns the base-64 encoded content of an individual blob in a repository.
- GetBranch ( array $params = [] )
- Returns information about a repository branch, including its name and the last commit ID.
- GetComment ( array $params = [] )
- Returns the content of a comment made on a change, file, or commit in a repository.
- GetCommentReactions ( array $params = [] )
- Returns information about reactions to a specified comment ID.
- GetCommentsForComparedCommit ( array $params = [] )
- Returns information about comments made on the comparison between two commits.
- GetCommentsForPullRequest ( array $params = [] )
- Returns comments made on a pull request.
- GetCommit ( array $params = [] )
- Returns information about a commit, including commit message and committer information.
- GetDifferences ( array $params = [] )
- Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference).
- GetFile ( array $params = [] )
- Returns the base-64 encoded contents of a specified file and its metadata.
- GetFolder ( array $params = [] )
- Returns the contents of a specified folder in a repository.
- GetMergeCommit ( array $params = [] )
- Returns information about a specified merge commit.
- GetMergeConflicts ( array $params = [] )
- Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
- GetMergeOptions ( array $params = [] )
- Returns information about the merge options available for merging two specified branches.
- GetPullRequest ( array $params = [] )
- Gets information about a pull request in a specified repository.
- GetPullRequestApprovalStates ( array $params = [] )
- Gets information about the approval states for a specified pull request.
- GetPullRequestOverrideState ( array $params = [] )
- 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.
- GetRepository ( array $params = [] )
- Returns information about a repository.
- GetRepositoryTriggers ( array $params = [] )
- Gets information about triggers configured for a repository.
- ListApprovalRuleTemplates ( array $params = [] )
- Lists all approval rule templates in the specified Amazon Web Services Region in your Amazon Web Services account.
- ListAssociatedApprovalRuleTemplatesForRepository ( array $params = [] )
- Lists all approval rule templates that are associated with a specified repository.
- ListBranches ( array $params = [] )
- Gets information about one or more branches in a repository.
- ListFileCommitHistory ( array $params = [] )
- Retrieves a list of commits and changes to a specified file.
- ListPullRequests ( array $params = [] )
- Returns a list of pull requests for a specified repository.
- ListRepositories ( array $params = [] )
- Gets information about one or more repositories.
- ListRepositoriesForApprovalRuleTemplate ( array $params = [] )
- Lists all repositories associated with the specified approval rule template.
- ListTagsForResource ( array $params = [] )
- Gets information about Amazon Web Servicestags for a specified Amazon Resource Name (ARN) in CodeCommit.
- MergeBranchesByFastForward ( array $params = [] )
- Merges two branches using the fast-forward merge strategy.
- MergeBranchesBySquash ( array $params = [] )
- Merges two branches using the squash merge strategy.
- MergeBranchesByThreeWay ( array $params = [] )
- Merges two specified branches using the three-way merge strategy.
- MergePullRequestByFastForward ( array $params = [] )
- Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge strategy.
- MergePullRequestBySquash ( array $params = [] )
- Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the squash merge strategy.
- MergePullRequestByThreeWay ( array $params = [] )
- Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the three-way merge strategy.
- OverridePullRequestApprovalRules ( array $params = [] )
- Sets aside (overrides) all approval rule requirements for a specified pull request.
- PostCommentForComparedCommit ( array $params = [] )
- Posts a comment on the comparison between two commits.
- PostCommentForPullRequest ( array $params = [] )
- Posts a comment on a pull request.
- PostCommentReply ( array $params = [] )
- Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
- PutCommentReaction ( array $params = [] )
- Adds or updates a reaction to a specified comment for the user whose identity is used to make the request.
- PutFile ( array $params = [] )
- Adds or updates a file in a branch in an CodeCommit repository, and generates a commit for the addition in the specified branch.
- PutRepositoryTriggers ( array $params = [] )
- Replaces all triggers for a repository.
- TagResource ( array $params = [] )
- Adds or updates tags for a resource in CodeCommit.
- TestRepositoryTriggers ( array $params = [] )
- Tests the functionality of repository triggers by sending information to the trigger target.
- UntagResource ( array $params = [] )
- Removes tags for a resource in CodeCommit.
- UpdateApprovalRuleTemplateContent ( array $params = [] )
- Updates the content of an approval rule template.
- UpdateApprovalRuleTemplateDescription ( array $params = [] )
- Updates the description for a specified approval rule template.
- UpdateApprovalRuleTemplateName ( array $params = [] )
- Updates the name of a specified approval rule template.
- UpdateComment ( array $params = [] )
- Replaces the contents of a comment.
- UpdateDefaultBranch ( array $params = [] )
- Sets or changes the default branch name for the specified repository.
- UpdatePullRequestApprovalRuleContent ( array $params = [] )
- Updates the structure of an approval rule created specifically for a pull request.
- UpdatePullRequestApprovalState ( array $params = [] )
- Updates the state of a user's approval on a pull request.
- UpdatePullRequestDescription ( array $params = [] )
- Replaces the contents of the description of a pull request.
- UpdatePullRequestStatus ( array $params = [] )
- Updates the status of a pull request.
- UpdatePullRequestTitle ( array $params = [] )
- Replaces the title of a pull request.
- UpdateRepositoryDescription ( array $params = [] )
- Sets or changes the comment or description for a repository.
- UpdateRepositoryEncryptionKey ( array $params = [] )
- Updates the Key Management Service encryption key used to encrypt and decrypt a CodeCommit repository.
- UpdateRepositoryName ( array $params = [] )
- Renames a repository.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
- DescribeMergeConflicts
- DescribePullRequestEvents
- GetCommentReactions
- GetCommentsForComparedCommit
- GetCommentsForPullRequest
- GetDifferences
- GetMergeConflicts
- ListApprovalRuleTemplates
- ListAssociatedApprovalRuleTemplatesForRepository
- ListBranches
- ListFileCommitHistory
- ListPullRequests
- ListRepositories
- ListRepositoriesForApprovalRuleTemplate
Operations
AssociateApprovalRuleTemplateWithRepository
$result = $client->associateApprovalRuleTemplateWithRepository
([/* ... */]); $promise = $client->associateApprovalRuleTemplateWithRepositoryAsync
([/* ... */]);
Creates an association between an approval rule template and a specified repository. Then, the next time a pull request is created in the repository where the destination reference (if specified) matches the destination reference (branch) for the pull request, an approval rule that matches the template conditions is automatically created for that pull request. If no destination references are specified in the template, an approval rule that matches the template contents is created for all pull requests in that repository.
Parameter Syntax
$result = $client->associateApprovalRuleTemplateWithRepository([ 'approvalRuleTemplateName' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name for the approval rule template.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that you want to associate with the template.
Result Syntax
[]
Result Details
Errors
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
- MaximumRuleTemplatesAssociatedWithRepositoryException:
The maximum number of approval rule templates for a repository has been exceeded. You cannot associate more than 25 approval rule templates with a repository.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
BatchAssociateApprovalRuleTemplateWithRepositories
$result = $client->batchAssociateApprovalRuleTemplateWithRepositories
([/* ... */]); $promise = $client->batchAssociateApprovalRuleTemplateWithRepositoriesAsync
([/* ... */]);
Creates an association between an approval rule template and one or more specified repositories.
Parameter Syntax
$result = $client->batchAssociateApprovalRuleTemplateWithRepositories([ 'approvalRuleTemplateName' => '<string>', // REQUIRED 'repositoryNames' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the template you want to associate with one or more repositories.
- repositoryNames
-
- Required: Yes
- Type: Array of strings
The names of the repositories you want to associate with the template.
The length constraint limit is for each string in the array. The array itself can be empty.
Result Syntax
[ 'associatedRepositoryNames' => ['<string>', ...], 'errors' => [ [ 'errorCode' => '<string>', 'errorMessage' => '<string>', 'repositoryName' => '<string>', ], // ... ], ]
Result Details
Members
- associatedRepositoryNames
-
- Required: Yes
- Type: Array of strings
A list of names of the repositories that have been associated with the template.
- errors
-
- Required: Yes
- Type: Array of BatchAssociateApprovalRuleTemplateWithRepositoriesError structures
A list of any errors that might have occurred while attempting to create the association between the template and the repositories.
Errors
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
- RepositoryNamesRequiredException:
At least one repository name object is required, but was not specified.
- MaximumRepositoryNamesExceededException:
The maximum number of allowed repository names was exceeded. Currently, this number is 100.
- 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.
BatchDescribeMergeConflicts
$result = $client->batchDescribeMergeConflicts
([/* ... */]); $promise = $client->batchDescribeMergeConflictsAsync
([/* ... */]);
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
Parameter Syntax
$result = $client->batchDescribeMergeConflicts([ 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'destinationCommitSpecifier' => '<string>', // REQUIRED 'filePaths' => ['<string>', ...], 'maxConflictFiles' => <integer>, 'maxMergeHunks' => <integer>, 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', // REQUIRED 'nextToken' => '<string>', 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED ]);
Parameter Details
Members
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- filePaths
-
- Type: Array of strings
The path of the target files used to describe the conflicts. If not specified, the default is all conflict files.
- maxConflictFiles
-
- Type: int
The maximum number of files to include in the output.
- maxMergeHunks
-
- Type: int
The maximum number of merge hunks to include in the output.
- mergeOption
-
- Required: Yes
- Type: string
The merge option or strategy you want to use to merge the code.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the merge conflicts you want to review.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
Result Syntax
[ 'baseCommitId' => '<string>', 'conflicts' => [ [ 'conflictMetadata' => [ 'contentConflict' => true || false, 'fileModeConflict' => true || false, 'fileModes' => [ 'base' => 'EXECUTABLE|NORMAL|SYMLINK', 'destination' => 'EXECUTABLE|NORMAL|SYMLINK', 'source' => 'EXECUTABLE|NORMAL|SYMLINK', ], 'filePath' => '<string>', 'fileSizes' => [ 'base' => <integer>, 'destination' => <integer>, 'source' => <integer>, ], 'isBinaryFile' => [ 'base' => true || false, 'destination' => true || false, 'source' => true || false, ], 'mergeOperations' => [ 'destination' => 'A|M|D', 'source' => 'A|M|D', ], 'numberOfConflicts' => <integer>, 'objectTypeConflict' => true || false, 'objectTypes' => [ 'base' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', 'destination' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', 'source' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', ], ], 'mergeHunks' => [ [ 'base' => [ 'endLine' => <integer>, 'hunkContent' => '<string>', 'startLine' => <integer>, ], 'destination' => [ 'endLine' => <integer>, 'hunkContent' => '<string>', 'startLine' => <integer>, ], 'isConflict' => true || false, 'source' => [ 'endLine' => <integer>, 'hunkContent' => '<string>', 'startLine' => <integer>, ], ], // ... ], ], // ... ], 'destinationCommitId' => '<string>', 'errors' => [ [ 'exceptionName' => '<string>', 'filePath' => '<string>', 'message' => '<string>', ], // ... ], 'nextToken' => '<string>', 'sourceCommitId' => '<string>', ]
Result Details
Members
- baseCommitId
-
- Type: string
The commit ID of the merge base.
- conflicts
-
- Required: Yes
- Type: Array of Conflict structures
A list of conflicts for each file, including the conflict metadata and the hunks of the differences between the files.
- destinationCommitId
-
- Required: Yes
- Type: string
The commit ID of the destination commit specifier that was used in the merge evaluation.
- errors
-
- Type: Array of BatchDescribeMergeConflictsError structures
A list of any errors returned while describing the merge conflicts for each file.
- nextToken
-
- Type: string
An enumeration token that can be used in a request to return the next batch of the results.
- sourceCommitId
-
- Required: Yes
- Type: string
The commit ID of the source commit specifier that was used in the merge evaluation.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- MergeOptionRequiredException:
A merge option or stategy is required, and none was provided.
- InvalidMergeOptionException:
The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- CommitRequiredException:
A commit was not specified.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidCommitException:
The specified commit is not valid.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- InvalidMaxConflictFilesException:
The specified value for the number of conflict files to return is not valid.
- InvalidMaxMergeHunksException:
The specified value for the number of merge hunks to return is not valid.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- 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.
BatchDisassociateApprovalRuleTemplateFromRepositories
$result = $client->batchDisassociateApprovalRuleTemplateFromRepositories
([/* ... */]); $promise = $client->batchDisassociateApprovalRuleTemplateFromRepositoriesAsync
([/* ... */]);
Removes the association between an approval rule template and one or more specified repositories.
Parameter Syntax
$result = $client->batchDisassociateApprovalRuleTemplateFromRepositories([ 'approvalRuleTemplateName' => '<string>', // REQUIRED 'repositoryNames' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the template that you want to disassociate from one or more repositories.
- repositoryNames
-
- Required: Yes
- Type: Array of strings
The repository names that you want to disassociate from the approval rule template.
The length constraint limit is for each string in the array. The array itself can be empty.
Result Syntax
[ 'disassociatedRepositoryNames' => ['<string>', ...], 'errors' => [ [ 'errorCode' => '<string>', 'errorMessage' => '<string>', 'repositoryName' => '<string>', ], // ... ], ]
Result Details
Members
- disassociatedRepositoryNames
-
- Required: Yes
- Type: Array of strings
A list of repository names that have had their association with the template removed.
- errors
-
- Required: Yes
- Type: Array of BatchDisassociateApprovalRuleTemplateFromRepositoriesError structures
A list of any errors that might have occurred while attempting to remove the association between the template and the repositories.
Errors
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
- RepositoryNamesRequiredException:
At least one repository name object is required, but was not specified.
- MaximumRepositoryNamesExceededException:
The maximum number of allowed repository names was exceeded. Currently, this number is 100.
- 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.
BatchGetCommits
$result = $client->batchGetCommits
([/* ... */]); $promise = $client->batchGetCommitsAsync
([/* ... */]);
Returns information about the contents of one or more commits in a repository.
Parameter Syntax
$result = $client->batchGetCommits([ 'commitIds' => ['<string>', ...], // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commitIds
-
- Required: Yes
- Type: Array of strings
The full commit IDs of the commits to get information about.
You must supply the full SHA IDs of each commit. You cannot use shortened SHA IDs.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the commits.
Result Syntax
[ 'commits' => [ [ 'additionalData' => '<string>', 'author' => [ 'date' => '<string>', 'email' => '<string>', 'name' => '<string>', ], 'commitId' => '<string>', 'committer' => [ 'date' => '<string>', 'email' => '<string>', 'name' => '<string>', ], 'message' => '<string>', 'parents' => ['<string>', ...], 'treeId' => '<string>', ], // ... ], 'errors' => [ [ 'commitId' => '<string>', 'errorCode' => '<string>', 'errorMessage' => '<string>', ], // ... ], ]
Result Details
Members
- commits
-
- Type: Array of Commit structures
An array of commit data type objects, each of which contains information about a specified commit.
- errors
-
- Type: Array of BatchGetCommitsError structures
Returns any commit IDs for which information could not be found. For example, if one of the commit IDs was a shortened SHA ID or that commit was not found in the specified repository, the ID returns an error object with more information.
Errors
- CommitIdsListRequiredException:
A list of commit IDs is required, but was either not specified or the list was empty.
- CommitIdsLimitExceededException:
The maximum number of allowed commit IDs in a batch request is 100. Verify that your batch requests contains no more than 100 commit IDs, and then try again.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
BatchGetRepositories
$result = $client->batchGetRepositories
([/* ... */]); $promise = $client->batchGetRepositoriesAsync
([/* ... */]);
Returns information about one or more repositories.
The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
Parameter Syntax
$result = $client->batchGetRepositories([ 'repositoryNames' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- repositoryNames
-
- Required: Yes
- Type: Array of strings
The names of the repositories to get information about.
The length constraint limit is for each string in the array. The array itself can be empty.
Result Syntax
[ 'errors' => [ [ 'errorCode' => 'EncryptionIntegrityChecksFailedException|EncryptionKeyAccessDeniedException|EncryptionKeyDisabledException|EncryptionKeyNotFoundException|EncryptionKeyUnavailableException|RepositoryDoesNotExistException', 'errorMessage' => '<string>', 'repositoryId' => '<string>', 'repositoryName' => '<string>', ], // ... ], 'repositories' => [ [ 'Arn' => '<string>', 'accountId' => '<string>', 'cloneUrlHttp' => '<string>', 'cloneUrlSsh' => '<string>', 'creationDate' => <DateTime>, 'defaultBranch' => '<string>', 'kmsKeyId' => '<string>', 'lastModifiedDate' => <DateTime>, 'repositoryDescription' => '<string>', 'repositoryId' => '<string>', 'repositoryName' => '<string>', ], // ... ], 'repositoriesNotFound' => ['<string>', ...], ]
Result Details
Members
- errors
-
- Type: Array of BatchGetRepositoriesError structures
Returns information about any errors returned when attempting to retrieve information about the repositories.
- repositories
-
- Type: Array of RepositoryMetadata structures
A list of repositories returned by the batch get repositories operation.
- repositoriesNotFound
-
- Type: Array of strings
Returns a list of repository names for which information could not be found.
Errors
- RepositoryNamesRequiredException:
At least one repository name object is required, but was not specified.
- MaximumRepositoryNamesExceededException:
The maximum number of allowed repository names was exceeded. Currently, this number is 100.
- 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.
- 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.
CreateApprovalRuleTemplate
$result = $client->createApprovalRuleTemplate
([/* ... */]); $promise = $client->createApprovalRuleTemplateAsync
([/* ... */]);
Creates a template for approval rules that can then be associated with one or more repositories in your Amazon Web Services account. When you associate a template with a repository, CodeCommit creates an approval rule that matches the conditions of the template for all pull requests that meet the conditions of the template. For more information, see AssociateApprovalRuleTemplateWithRepository.
Parameter Syntax
$result = $client->createApprovalRuleTemplate([ 'approvalRuleTemplateContent' => '<string>', // REQUIRED 'approvalRuleTemplateDescription' => '<string>', 'approvalRuleTemplateName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateContent
-
- Required: Yes
- Type: string
The content of the approval rule that is created on pull requests in associated repositories. If you specify one or more destination references (branches), approval rules are created in an associated repository only if their destination references (branches) match those specified in the template.
When you create the content of the approval rule template, you can specify approvers in an approval pool in one of two ways:
-
CodeCommitApprovers: This option only requires an Amazon Web Services account and a resource. It can be used for both IAM users and federated access users whose name matches the provided resource name. This is a very powerful option that offers a great deal of flexibility. For example, if you specify the Amazon Web Services account 123456789012 and Mary_Major, all of the following are counted as approvals coming from that user:
-
An IAM user in the account (arn:aws:iam::123456789012:user/Mary_Major)
-
A federated user identified in IAM as Mary_Major (arn:aws:sts::123456789012:federated-user/Mary_Major)
This option does not recognize an active session of someone assuming the role of CodeCommitReview with a role session name of Mary_Major (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) unless you include a wildcard (*Mary_Major).
-
-
Fully qualified ARN: This option allows you to specify the fully qualified Amazon Resource Name (ARN) of the IAM user or role.
For more information about IAM ARNs, wildcards, and formats, see IAM Identifiers in the IAM User Guide.
- approvalRuleTemplateDescription
-
- Type: string
The description of the approval rule template. Consider providing a description that explains what this template does and when it might be appropriate to associate it with repositories.
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the approval rule template. Provide descriptive names, because this name is applied to the approval rules created automatically in associated repositories.
Result Syntax
[ 'approvalRuleTemplate' => [ 'approvalRuleTemplateContent' => '<string>', 'approvalRuleTemplateDescription' => '<string>', 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'ruleContentSha256' => '<string>', ], ]
Result Details
Members
- approvalRuleTemplate
-
- Required: Yes
- Type: ApprovalRuleTemplate structure
The content and structure of the created approval rule template.
Errors
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateNameAlreadyExistsException:
You cannot create an approval rule template with that name because a template with that name already exists in this Amazon Web Services Region for your Amazon Web Services account. Approval rule template names must be unique.
- ApprovalRuleTemplateContentRequiredException:
The content for the approval rule template is empty. You must provide some content for an approval rule template. The content cannot be null.
- InvalidApprovalRuleTemplateContentException:
The content of the approval rule template is not valid.
- InvalidApprovalRuleTemplateDescriptionException:
The description for the approval rule template is not valid because it exceeds the maximum characters allowed for a description. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- NumberOfRuleTemplatesExceededException:
The maximum number of approval rule templates has been exceeded for this Amazon Web Services Region.
CreateBranch
$result = $client->createBranch
([/* ... */]); $promise = $client->createBranchAsync
([/* ... */]);
Creates a branch in a repository and points the branch to a commit.
Calling the create branch operation does not set a repository's default branch. To do this, call the update default branch operation.
Parameter Syntax
$result = $client->createBranch([ 'branchName' => '<string>', // REQUIRED 'commitId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- branchName
-
- Required: Yes
- Type: string
The name of the new branch to create.
- commitId
-
- Required: Yes
- Type: string
The ID of the commit to point the new branch to.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository in which you want to create the new branch.
Result Syntax
[]
Result Details
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- BranchNameExistsException:
Cannot create the branch with the specified name because the commit conflicts with an existing branch with the same name. Branch names must be unique.
- InvalidBranchNameException:
The specified reference name is not valid.
- CommitIdRequiredException:
A commit ID was not specified.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidCommitIdException:
The specified commit ID is not valid.
- 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.
CreateCommit
$result = $client->createCommit
([/* ... */]); $promise = $client->createCommitAsync
([/* ... */]);
Creates a commit for a repository on the tip of a specified branch.
Parameter Syntax
$result = $client->createCommit([ 'authorName' => '<string>', 'branchName' => '<string>', // REQUIRED 'commitMessage' => '<string>', 'deleteFiles' => [ [ 'filePath' => '<string>', // REQUIRED ], // ... ], 'email' => '<string>', 'keepEmptyFolders' => true || false, 'parentCommitId' => '<string>', 'putFiles' => [ [ 'fileContent' => <string || resource || Psr\Http\Message\StreamInterface>, 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'filePath' => '<string>', // REQUIRED 'sourceFile' => [ 'filePath' => '<string>', // REQUIRED 'isMove' => true || false, ], ], // ... ], 'repositoryName' => '<string>', // REQUIRED 'setFileModes' => [ [ 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', // REQUIRED 'filePath' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- authorName
-
- Type: string
The name of the author who created the commit. This information is used as both the author and committer for the commit.
- branchName
-
- Required: Yes
- Type: string
The name of the branch where you create the commit.
- commitMessage
-
- Type: string
The commit message you want to include in the commit. Commit messages are limited to 256 KB. If no message is specified, a default message is used.
- deleteFiles
-
- Type: Array of DeleteFileEntry structures
The files to delete in this commit. These files still exist in earlier commits.
-
- Type: string
The email address of the person who created the commit.
- keepEmptyFolders
-
- Type: boolean
If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a ..gitkeep file is created for empty folders. The default is false.
- parentCommitId
-
- Type: string
The ID of the commit that is the parent of the commit you create. Not required if this is an empty repository.
- putFiles
-
- Type: Array of PutFileEntry structures
The files to add or update in this commit.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you create the commit.
- setFileModes
-
- Type: Array of SetFileModeEntry structures
The file modes to update for files in this commit.
Result Syntax
[ 'commitId' => '<string>', 'filesAdded' => [ [ 'absolutePath' => '<string>', 'blobId' => '<string>', 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', ], // ... ], 'filesDeleted' => [ [ 'absolutePath' => '<string>', 'blobId' => '<string>', 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', ], // ... ], 'filesUpdated' => [ [ 'absolutePath' => '<string>', 'blobId' => '<string>', 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', ], // ... ], 'treeId' => '<string>', ]
Result Details
Members
- commitId
-
- Type: string
The full commit ID of the commit that contains your committed file changes.
- filesAdded
-
- Type: Array of FileMetadata structures
The files added as part of the committed file changes.
- filesDeleted
-
- Type: Array of FileMetadata structures
The files deleted as part of the committed file changes.
- filesUpdated
-
- Type: Array of FileMetadata structures
The files updated as part of the commited file changes.
- treeId
-
- Type: string
The full SHA-1 pointer of the tree information for the commit that contains the commited file changes.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- ParentCommitIdRequiredException:
A parent commit ID is required. To view the full commit ID of a branch in a repository, use GetBranch or a Git command (for example, git pull or git log).
- InvalidParentCommitIdException:
The parent commit ID is not valid. The commit ID cannot be empty, and must match the head commit ID for the branch of the repository where you want to add or update a file.
- ParentCommitDoesNotExistException:
The parent commit ID is not valid because it does not exist. The specified parent commit ID does not exist in the specified branch of the repository.
- ParentCommitIdOutdatedException:
The file could not be added because the provided parent commit ID is not the current tip of the specified branch. To view the full commit ID of the current head of the branch, use GetBranch.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- InvalidBranchNameException:
The specified reference name is not valid.
- BranchDoesNotExistException:
The specified branch does not exist.
- BranchNameIsTagNameException:
The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use ListBranches.
- FileEntryRequiredException:
The commit cannot be created because no files have been specified as added, updated, or changed (PutFile or DeleteFile) for the commit.
- MaximumFileEntriesExceededException:
The number of specified files to change as part of this commit exceeds the maximum number of files that can be changed in a single commit. Consider using a Git client for these changes.
- PutFileEntryConflictException:
The commit cannot be created because one or more files specified in the commit reference both a file and a folder.
- SourceFileOrContentRequiredException:
The commit cannot be created because no source files or file content have been specified for the commit.
- FileContentAndSourceFileSpecifiedException:
The commit cannot be created because both a source file and file content have been specified for the same file. You cannot provide both. Either specify a source file or provide the file content directly.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- SamePathRequestException:
The commit cannot be created because one or more changes in this commit duplicate actions in the same file path. For example, you cannot make the same delete request to the same file in the same file path twice, or make a delete request and a move request to the same file as part of the same commit.
- FileDoesNotExistException:
The specified file does not exist. Verify that you have used the correct file name, full path, and extension.
- FileContentSizeLimitExceededException:
The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
- FolderContentSizeLimitExceededException:
The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
- InvalidDeletionParameterException:
The specified deletion parameter is not valid.
- RestrictedSourceFileException:
The commit cannot be created because one of the changes specifies copying or moving a .gitkeep file.
- FileModeRequiredException:
The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.
- InvalidFileModeException:
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
- NameLengthExceededException:
The user name is not valid because it has exceeded the character limit for author names.
- InvalidEmailException:
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
- CommitMessageLengthExceededException:
The commit message is too long. Provide a shorter string.
- 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.
- NoChangeException:
The commit cannot be created because no changes will be made to the repository as a result of this commit. A commit must contain at least one change.
- FileNameConflictsWithDirectoryNameException:
A file cannot be added to the repository because the specified file name has the same name as a directory in this repository. Either provide another name for the file, or add the file in a directory that does not match the file name.
- DirectoryNameConflictsWithFileNameException:
A file cannot be added to the repository because the specified path name has the same name as a file that already exists in this repository. Either provide a different name for the file, or specify a different path for the file.
- FilePathConflictsWithSubmodulePathException:
The commit cannot be created because a specified file path points to a submodule. Verify that the destination files have valid file paths that do not point to a submodule.
CreatePullRequest
$result = $client->createPullRequest
([/* ... */]); $promise = $client->createPullRequestAsync
([/* ... */]);
Creates a pull request in the specified repository.
Parameter Syntax
$result = $client->createPullRequest([ 'clientRequestToken' => '<string>', 'description' => '<string>', 'targets' => [ // REQUIRED [ 'destinationReference' => '<string>', 'repositoryName' => '<string>', // REQUIRED 'sourceReference' => '<string>', // REQUIRED ], // ... ], 'title' => '<string>', // REQUIRED ]);
Parameter Details
Members
- clientRequestToken
-
- Type: string
A 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.
The Amazon Web ServicesSDKs prepopulate client request tokens. If you are using an Amazon Web ServicesSDK, an idempotency token is created for you.
- description
-
- Type: string
A description of the pull request.
- targets
-
- Required: Yes
- Type: Array of Target structures
The targets for the pull request, including the source of the code to be reviewed (the source branch) and the destination where the creator of the pull request intends the code to be merged after the pull request is closed (the destination branch).
- title
-
- Required: Yes
- Type: string
The title of the pull request. This title is used to identify the pull request to other users in the repository.
Result Syntax
[ 'pullRequest' => [ 'approvalRules' => [ [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], // ... ], 'authorArn' => '<string>', 'clientRequestToken' => '<string>', 'creationDate' => <DateTime>, 'description' => '<string>', 'lastActivityDate' => <DateTime>, 'pullRequestId' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'pullRequestTargets' => [ [ 'destinationCommit' => '<string>', 'destinationReference' => '<string>', 'mergeBase' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', 'sourceCommit' => '<string>', 'sourceReference' => '<string>', ], // ... ], 'revisionId' => '<string>', 'title' => '<string>', ], ]
Result Details
Members
- pullRequest
-
- Required: Yes
- Type: PullRequest structure
Information about the newly created pull request.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- 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.
- InvalidClientRequestTokenException:
The client request token is not valid.
- 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.
- ReferenceNameRequiredException:
A reference name is required, but none was provided.
- 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.
- ReferenceDoesNotExistException:
The specified reference does not exist. You must provide a full commit ID.
- ReferenceTypeNotSupportedException:
The specified reference is not a supported type.
- TitleRequiredException:
A pull request title is required. It cannot be empty or null.
- InvalidTitleException:
The title of the pull request is not valid. Pull request titles cannot exceed 100 characters in length.
- InvalidDescriptionException:
The pull request description is not valid. Descriptions cannot be more than 1,000 characters.
- TargetsRequiredException:
An array of target objects is required. It cannot be empty or null.
- 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.
- 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.
- 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.
- 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.
- 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.
- SourceAndDestinationAreSameException:
The source branch and destination branch for the pull request are the same. You must specify different branches for the source and destination.
CreatePullRequestApprovalRule
$result = $client->createPullRequestApprovalRule
([/* ... */]); $promise = $client->createPullRequestApprovalRuleAsync
([/* ... */]);
Creates an approval rule for a pull request.
Parameter Syntax
$result = $client->createPullRequestApprovalRule([ 'approvalRuleContent' => '<string>', // REQUIRED 'approvalRuleName' => '<string>', // REQUIRED 'pullRequestId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleContent
-
- Required: Yes
- Type: string
The content of the approval rule, including the number of approvals needed and the structure of an approval pool defined for approvals, if any. For more information about approval pools, see the CodeCommit User Guide.
When you create the content of the approval rule, you can specify approvers in an approval pool in one of two ways:
-
CodeCommitApprovers: This option only requires an Amazon Web Services account and a resource. It can be used for both IAM users and federated access users whose name matches the provided resource name. This is a very powerful option that offers a great deal of flexibility. For example, if you specify the Amazon Web Services account 123456789012 and Mary_Major, all of the following would be counted as approvals coming from that user:
-
An IAM user in the account (arn:aws:iam::123456789012:user/Mary_Major)
-
A federated user identified in IAM as Mary_Major (arn:aws:sts::123456789012:federated-user/Mary_Major)
This option does not recognize an active session of someone assuming the role of CodeCommitReview with a role session name of Mary_Major (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) unless you include a wildcard (*Mary_Major).
-
-
Fully qualified ARN: This option allows you to specify the fully qualified Amazon Resource Name (ARN) of the IAM user or role.
For more information about IAM ARNs, wildcards, and formats, see IAM Identifiers in the IAM User Guide.
- approvalRuleName
-
- Required: Yes
- Type: string
The name for the approval rule.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request for which you want to create the approval rule.
Result Syntax
[ 'approvalRule' => [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], ]
Result Details
Members
- approvalRule
-
- Required: Yes
- Type: ApprovalRule structure
Information about the created approval rule.
Errors
- ApprovalRuleNameRequiredException:
An approval rule name is required, but was not specified.
- InvalidApprovalRuleNameException:
The name for the approval rule is not valid.
- ApprovalRuleNameAlreadyExistsException:
An approval rule with that name already exists. Approval rule names must be unique within the scope of a pull request.
- ApprovalRuleContentRequiredException:
The content for the approval rule is empty. You must provide some content for an approval rule. The content cannot be null.
- InvalidApprovalRuleContentException:
The content for the approval rule is not valid.
- NumberOfRulesExceededException:
The approval rule cannot be added. The pull request has the maximum number of approval rules associated with it.
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
- 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.
CreateRepository
$result = $client->createRepository
([/* ... */]); $promise = $client->createRepositoryAsync
([/* ... */]);
Creates a new, empty repository.
Parameter Syntax
$result = $client->createRepository([ 'kmsKeyId' => '<string>', 'repositoryDescription' => '<string>', 'repositoryName' => '<string>', // REQUIRED 'tags' => ['<string>', ...], ]);
Parameter Details
Members
- kmsKeyId
-
- Type: string
The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see KeyId in the Decrypt API description in the Key Management Service API Reference.
If no key is specified, the default
aws/codecommit
Amazon Web Services managed key is used. - repositoryDescription
-
- Type: string
A comment or description about the new repository.
The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
- repositoryName
-
- Required: Yes
- Type: string
The name of the new repository to be created.
The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see Quotas in the CodeCommit User Guide. The suffix .git is prohibited.
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
One or more tag key-value pairs to use when tagging this repository.
Result Syntax
[ 'repositoryMetadata' => [ 'Arn' => '<string>', 'accountId' => '<string>', 'cloneUrlHttp' => '<string>', 'cloneUrlSsh' => '<string>', 'creationDate' => <DateTime>, 'defaultBranch' => '<string>', 'kmsKeyId' => '<string>', 'lastModifiedDate' => <DateTime>, 'repositoryDescription' => '<string>', 'repositoryId' => '<string>', 'repositoryName' => '<string>', ], ]
Result Details
Members
- repositoryMetadata
-
- Type: RepositoryMetadata structure
Information about the newly created repository.
Errors
- RepositoryNameExistsException:
The specified repository name already exists.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- InvalidRepositoryDescriptionException:
The specified repository description is not valid.
- RepositoryLimitExceededException:
A repository resource limit was exceeded.
- OperationNotAllowedException:
The requested action is not allowed.
- 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.
- EncryptionKeyInvalidIdException:
The Key Management Service encryption key is not valid.
- EncryptionKeyInvalidUsageException:
A KMS encryption key was used to try and encrypt or decrypt a repository, but either the repository or the key was not in a valid state to support the operation.
- InvalidTagsMapException:
The map of tags is not valid.
- TooManyTagsException:
The maximum number of tags for an CodeCommit resource has been exceeded.
- InvalidSystemTagUsageException:
The specified tag is not valid. Key names cannot be prefixed with aws:.
- TagPolicyException:
The tag policy is not valid.
CreateUnreferencedMergeCommit
$result = $client->createUnreferencedMergeCommit
([/* ... */]); $promise = $client->createUnreferencedMergeCommitAsync
([/* ... */]);
Creates an unreferenced commit that represents the result of merging two branches using a specified merge strategy. This can help you determine the outcome of a potential merge. This API cannot be used with the fast-forward merge strategy because that strategy does not create a merge commit.
This unreferenced merge commit can only be accessed using the GetCommit API or through git commands such as git fetch. To retrieve this commit, you must specify its commit ID or otherwise reference it.
Parameter Syntax
$result = $client->createUnreferencedMergeCommit([ 'authorName' => '<string>', 'commitMessage' => '<string>', 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolution' => [ 'deleteFiles' => [ [ 'filePath' => '<string>', // REQUIRED ], // ... ], 'replaceContents' => [ [ 'content' => <string || resource || Psr\Http\Message\StreamInterface>, 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'filePath' => '<string>', // REQUIRED 'replacementType' => 'KEEP_BASE|KEEP_SOURCE|KEEP_DESTINATION|USE_NEW_CONTENT', // REQUIRED ], // ... ], 'setFileModes' => [ [ 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', // REQUIRED 'filePath' => '<string>', // REQUIRED ], // ... ], ], 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'destinationCommitSpecifier' => '<string>', // REQUIRED 'email' => '<string>', 'keepEmptyFolders' => true || false, 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', // REQUIRED 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED ]);
Parameter Details
Members
- authorName
-
- Type: string
The name of the author who created the unreferenced commit. This information is used as both the author and committer for the commit.
- commitMessage
-
- Type: string
The commit message for the unreferenced commit.
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolution
-
- Type: ConflictResolution structure
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
-
- Type: string
The email address for the person who created the unreferenced commit.
- keepEmptyFolders
-
- Type: boolean
If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file is created for empty folders. The default is false.
- mergeOption
-
- Required: Yes
- Type: string
The merge option or strategy you want to use to merge the code.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to create the unreferenced merge commit.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
Result Syntax
[ 'commitId' => '<string>', 'treeId' => '<string>', ]
Result Details
Members
- commitId
-
- Type: string
The full commit ID of the commit that contains your merge results.
- treeId
-
- Type: string
The full SHA-1 pointer of the tree information for the commit that contains the merge results.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- CommitRequiredException:
A commit was not specified.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- MergeOptionRequiredException:
A merge option or stategy is required, and none was provided.
- InvalidMergeOptionException:
The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- InvalidConflictResolutionException:
The specified conflict resolution list is not valid.
- ManualMergeRequiredException:
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
- MaximumConflictResolutionEntriesExceededException:
The number of allowed conflict resolution entries was exceeded.
- MultipleConflictResolutionEntriesException:
More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
- ReplacementTypeRequiredException:
A replacement type is required.
- InvalidReplacementTypeException:
Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
- ReplacementContentRequiredException:
USE_NEW_CONTENT was specified, but no replacement content has been provided.
- InvalidReplacementContentException:
Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- FileContentSizeLimitExceededException:
The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
- FolderContentSizeLimitExceededException:
The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- ConcurrentReferenceUpdateException:
The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
- FileModeRequiredException:
The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.
- InvalidFileModeException:
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
- NameLengthExceededException:
The user name is not valid because it has exceeded the character limit for author names.
- InvalidEmailException:
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
- CommitMessageLengthExceededException:
The commit message is too long. Provide a shorter string.
- 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.
DeleteApprovalRuleTemplate
$result = $client->deleteApprovalRuleTemplate
([/* ... */]); $promise = $client->deleteApprovalRuleTemplateAsync
([/* ... */]);
Deletes a specified approval rule template. Deleting a template does not remove approval rules on pull requests already created with the template.
Parameter Syntax
$result = $client->deleteApprovalRuleTemplate([ 'approvalRuleTemplateName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the approval rule template to delete.
Result Syntax
[ 'approvalRuleTemplateId' => '<string>', ]
Result Details
Members
- approvalRuleTemplateId
-
- Required: Yes
- Type: string
The system-generated ID of the deleted approval rule template. If the template has been previously deleted, the only response is a 200 OK.
Errors
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateInUseException:
The approval rule template is associated with one or more repositories. You cannot delete a template that is associated with a repository. Remove all associations, and then try again.
DeleteBranch
$result = $client->deleteBranch
([/* ... */]); $promise = $client->deleteBranchAsync
([/* ... */]);
Deletes a branch from a repository, unless that branch is the default branch for the repository.
Parameter Syntax
$result = $client->deleteBranch([ 'branchName' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- branchName
-
- Required: Yes
- Type: string
The name of the branch to delete.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the branch to be deleted.
Result Syntax
[ 'deletedBranch' => [ 'branchName' => '<string>', 'commitId' => '<string>', ], ]
Result Details
Members
- deletedBranch
-
- Type: BranchInfo structure
Information about the branch deleted by the operation, including the branch name and the commit ID that was the tip of the branch.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- InvalidBranchNameException:
The specified reference name is not valid.
- DefaultBranchCannotBeDeletedException:
The specified branch is the default branch for the repository, and cannot be deleted. To delete this branch, you must first set another branch as the default branch.
- 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.
DeleteCommentContent
$result = $client->deleteCommentContent
([/* ... */]); $promise = $client->deleteCommentContentAsync
([/* ... */]);
Deletes the content of a comment made on a change, file, or commit in a repository.
Parameter Syntax
$result = $client->deleteCommentContent([ 'commentId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commentId
-
- Required: Yes
- Type: string
The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
Result Syntax
[ 'comment' => [ 'authorArn' => '<string>', 'callerReactions' => ['<string>', ...], 'clientRequestToken' => '<string>', 'commentId' => '<string>', 'content' => '<string>', 'creationDate' => <DateTime>, 'deleted' => true || false, 'inReplyTo' => '<string>', 'lastModifiedDate' => <DateTime>, 'reactionCounts' => [<integer>, ...], ], ]
Result Details
Members
- comment
-
- Type: Comment structure
Information about the comment you just deleted.
Errors
- CommentDoesNotExistException:
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
- CommentIdRequiredException:
The comment ID is missing or null. A comment ID is required.
- InvalidCommentIdException:
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
- CommentDeletedException:
This comment has already been deleted. You cannot edit or delete a deleted comment.
DeleteFile
$result = $client->deleteFile
([/* ... */]); $promise = $client->deleteFileAsync
([/* ... */]);
Deletes a specified file from a specified branch. A commit is created on the branch that contains the revision. The file still exists in the commits earlier to the commit that contains the deletion.
Parameter Syntax
$result = $client->deleteFile([ 'branchName' => '<string>', // REQUIRED 'commitMessage' => '<string>', 'email' => '<string>', 'filePath' => '<string>', // REQUIRED 'keepEmptyFolders' => true || false, 'name' => '<string>', 'parentCommitId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- branchName
-
- Required: Yes
- Type: string
The name of the branch where the commit that deletes the file is made.
- commitMessage
-
- Type: string
The commit message you want to include as part of deleting the file. Commit messages are limited to 256 KB. If no message is specified, a default message is used.
-
- Type: string
The email address for the commit that deletes the file. If no email address is specified, the email address is left blank.
- filePath
-
- Required: Yes
- Type: string
The fully qualified path to the file that to be deleted, including the full name and extension of that file. For example, /examples/file.md is a fully qualified path to a file named file.md in a folder named examples.
- keepEmptyFolders
-
- Type: boolean
If a file is the only object in the folder or directory, specifies whether to delete the folder or directory that contains the file. By default, empty folders are deleted. This includes empty folders that are part of the directory structure. For example, if the path to a file is dir1/dir2/dir3/dir4, and dir2 and dir3 are empty, deleting the last file in dir4 also deletes the empty folders dir4, dir3, and dir2.
- name
-
- Type: string
The name of the author of the commit that deletes the file. If no name is specified, the user's ARN is used as the author name and committer name.
- parentCommitId
-
- Required: Yes
- Type: string
The ID of the commit that is the tip of the branch where you want to create the commit that deletes the file. This must be the HEAD commit for the branch. The commit that deletes the file is created from this commit ID.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the file to delete.
Result Syntax
[ 'blobId' => '<string>', 'commitId' => '<string>', 'filePath' => '<string>', 'treeId' => '<string>', ]
Result Details
Members
- blobId
-
- Required: Yes
- Type: string
The blob ID removed from the tree as part of deleting the file.
- commitId
-
- Required: Yes
- Type: string
The full commit ID of the commit that contains the change that deletes the file.
- filePath
-
- Required: Yes
- Type: string
The fully qualified path to the file to be deleted, including the full name and extension of that file.
- treeId
-
- Required: Yes
- Type: string
The full SHA-1 pointer of the tree information for the commit that contains the delete file change.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- ParentCommitIdRequiredException:
A parent commit ID is required. To view the full commit ID of a branch in a repository, use GetBranch or a Git command (for example, git pull or git log).
- InvalidParentCommitIdException:
The parent commit ID is not valid. The commit ID cannot be empty, and must match the head commit ID for the branch of the repository where you want to add or update a file.
- ParentCommitDoesNotExistException:
The parent commit ID is not valid because it does not exist. The specified parent commit ID does not exist in the specified branch of the repository.
- ParentCommitIdOutdatedException:
The file could not be added because the provided parent commit ID is not the current tip of the specified branch. To view the full commit ID of the current head of the branch, use GetBranch.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- FileDoesNotExistException:
The specified file does not exist. Verify that you have used the correct file name, full path, and extension.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- InvalidBranchNameException:
The specified reference name is not valid.
- BranchDoesNotExistException:
The specified branch does not exist.
- BranchNameIsTagNameException:
The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use ListBranches.
- NameLengthExceededException:
The user name is not valid because it has exceeded the character limit for author names.
- InvalidEmailException:
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
- CommitMessageLengthExceededException:
The commit message is too long. Provide a shorter string.
- 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.
DeletePullRequestApprovalRule
$result = $client->deletePullRequestApprovalRule
([/* ... */]); $promise = $client->deletePullRequestApprovalRuleAsync
([/* ... */]);
Deletes an approval rule from a specified pull request. Approval rules can be deleted from a pull request only if the pull request is open, and if the approval rule was created specifically for a pull request and not generated from an approval rule template associated with the repository where the pull request was created. You cannot delete an approval rule from a merged or closed pull request.
Parameter Syntax
$result = $client->deletePullRequestApprovalRule([ 'approvalRuleName' => '<string>', // REQUIRED 'pullRequestId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleName
-
- Required: Yes
- Type: string
The name of the approval rule you want to delete.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request that contains the approval rule you want to delete.
Result Syntax
[ 'approvalRuleId' => '<string>', ]
Result Details
Members
- approvalRuleId
-
- Required: Yes
- Type: string
The ID of the deleted approval rule.
If the approval rule was deleted in an earlier API call, the response is 200 OK without content.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
- ApprovalRuleNameRequiredException:
An approval rule name is required, but was not specified.
- InvalidApprovalRuleNameException:
The name for the approval rule is not valid.
- CannotDeleteApprovalRuleFromTemplateException:
The approval rule cannot be deleted from the pull request because it was created by an approval rule template and applied to the pull request automatically.
- 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.
DeleteRepository
$result = $client->deleteRepository
([/* ... */]); $promise = $client->deleteRepositoryAsync
([/* ... */]);
Deletes a repository. If a specified repository was already deleted, a null repository ID is returned.
Deleting a repository also deletes all associated objects and metadata. After a repository is deleted, all future push calls to the deleted repository fail.
Parameter Syntax
$result = $client->deleteRepository([ 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to delete.
Result Syntax
[ 'repositoryId' => '<string>', ]
Result Details
Members
- repositoryId
-
- Type: string
The ID of the repository that was deleted.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- 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.
DescribeMergeConflicts
$result = $client->describeMergeConflicts
([/* ... */]); $promise = $client->describeMergeConflictsAsync
([/* ... */]);
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy. If the merge option for the attempted merge is specified as FAST_FORWARD_MERGE, an exception is thrown.
Parameter Syntax
$result = $client->describeMergeConflicts([ 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'destinationCommitSpecifier' => '<string>', // REQUIRED 'filePath' => '<string>', // REQUIRED 'maxMergeHunks' => <integer>, 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', // REQUIRED 'nextToken' => '<string>', 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED ]);
Parameter Details
Members
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- filePath
-
- Required: Yes
- Type: string
The path of the target files used to describe the conflicts.
- maxMergeHunks
-
- Type: int
The maximum number of merge hunks to include in the output.
- mergeOption
-
- Required: Yes
- Type: string
The merge option or strategy you want to use to merge the code.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to get information about a merge conflict.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
Result Syntax
[ 'baseCommitId' => '<string>', 'conflictMetadata' => [ 'contentConflict' => true || false, 'fileModeConflict' => true || false, 'fileModes' => [ 'base' => 'EXECUTABLE|NORMAL|SYMLINK', 'destination' => 'EXECUTABLE|NORMAL|SYMLINK', 'source' => 'EXECUTABLE|NORMAL|SYMLINK', ], 'filePath' => '<string>', 'fileSizes' => [ 'base' => <integer>, 'destination' => <integer>, 'source' => <integer>, ], 'isBinaryFile' => [ 'base' => true || false, 'destination' => true || false, 'source' => true || false, ], 'mergeOperations' => [ 'destination' => 'A|M|D', 'source' => 'A|M|D', ], 'numberOfConflicts' => <integer>, 'objectTypeConflict' => true || false, 'objectTypes' => [ 'base' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', 'destination' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', 'source' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', ], ], 'destinationCommitId' => '<string>', 'mergeHunks' => [ [ 'base' => [ 'endLine' => <integer>, 'hunkContent' => '<string>', 'startLine' => <integer>, ], 'destination' => [ 'endLine' => <integer>, 'hunkContent' => '<string>', 'startLine' => <integer>, ], 'isConflict' => true || false, 'source' => [ 'endLine' => <integer>, 'hunkContent' => '<string>', 'startLine' => <integer>, ], ], // ... ], 'nextToken' => '<string>', 'sourceCommitId' => '<string>', ]
Result Details
Members
- baseCommitId
-
- Type: string
The commit ID of the merge base.
- conflictMetadata
-
- Required: Yes
- Type: ConflictMetadata structure
Contains metadata about the conflicts found in the merge.
- destinationCommitId
-
- Required: Yes
- Type: string
The commit ID of the destination commit specifier that was used in the merge evaluation.
- mergeHunks
-
- Required: Yes
- Type: Array of MergeHunk structures
A list of merge hunks of the differences between the files or lines.
- nextToken
-
- Type: string
An enumeration token that can be used in a request to return the next batch of the results.
- sourceCommitId
-
- Required: Yes
- Type: string
The commit ID of the source commit specifier that was used in the merge evaluation.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- MergeOptionRequiredException:
A merge option or stategy is required, and none was provided.
- InvalidMergeOptionException:
The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- CommitRequiredException:
A commit was not specified.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidCommitException:
The specified commit is not valid.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- FileDoesNotExistException:
The specified file does not exist. Verify that you have used the correct file name, full path, and extension.
- InvalidMaxMergeHunksException:
The specified value for the number of merge hunks to return is not valid.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- 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.
DescribePullRequestEvents
$result = $client->describePullRequestEvents
([/* ... */]); $promise = $client->describePullRequestEventsAsync
([/* ... */]);
Returns information about one or more pull request events.
Parameter Syntax
$result = $client->describePullRequestEvents([ 'actorArn' => '<string>', 'maxResults' => <integer>, 'nextToken' => '<string>', 'pullRequestEventType' => 'PULL_REQUEST_CREATED|PULL_REQUEST_STATUS_CHANGED|PULL_REQUEST_SOURCE_REFERENCE_UPDATED|PULL_REQUEST_MERGE_STATE_CHANGED|PULL_REQUEST_APPROVAL_RULE_CREATED|PULL_REQUEST_APPROVAL_RULE_UPDATED|PULL_REQUEST_APPROVAL_RULE_DELETED|PULL_REQUEST_APPROVAL_RULE_OVERRIDDEN|PULL_REQUEST_APPROVAL_STATE_CHANGED', 'pullRequestId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- actorArn
-
- Type: string
The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with more commits or changing the status of a pull request.
- maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results. The default is 100 events, which is also the maximum number of events that can be returned in a result.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- pullRequestEventType
-
- Type: string
Optional. The pull request event type about which you want to return information.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
Result Syntax
[ 'nextToken' => '<string>', 'pullRequestEvents' => [ [ 'actorArn' => '<string>', 'approvalRuleEventMetadata' => [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', ], 'approvalRuleOverriddenEventMetadata' => [ 'overrideStatus' => 'OVERRIDE|REVOKE', 'revisionId' => '<string>', ], 'approvalStateChangedEventMetadata' => [ 'approvalStatus' => 'APPROVE|REVOKE', 'revisionId' => '<string>', ], 'eventDate' => <DateTime>, 'pullRequestCreatedEventMetadata' => [ 'destinationCommitId' => '<string>', 'mergeBase' => '<string>', 'repositoryName' => '<string>', 'sourceCommitId' => '<string>', ], 'pullRequestEventType' => 'PULL_REQUEST_CREATED|PULL_REQUEST_STATUS_CHANGED|PULL_REQUEST_SOURCE_REFERENCE_UPDATED|PULL_REQUEST_MERGE_STATE_CHANGED|PULL_REQUEST_APPROVAL_RULE_CREATED|PULL_REQUEST_APPROVAL_RULE_UPDATED|PULL_REQUEST_APPROVAL_RULE_DELETED|PULL_REQUEST_APPROVAL_RULE_OVERRIDDEN|PULL_REQUEST_APPROVAL_STATE_CHANGED', 'pullRequestId' => '<string>', 'pullRequestMergedStateChangedEventMetadata' => [ 'destinationReference' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', ], 'pullRequestSourceReferenceUpdatedEventMetadata' => [ 'afterCommitId' => '<string>', 'beforeCommitId' => '<string>', 'mergeBase' => '<string>', 'repositoryName' => '<string>', ], 'pullRequestStatusChangedEventMetadata' => [ 'pullRequestStatus' => 'OPEN|CLOSED', ], ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
An enumeration token that can be used in a request to return the next batch of the results.
- pullRequestEvents
-
- Required: Yes
- Type: Array of PullRequestEvent structures
Information about the pull request events.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- InvalidPullRequestEventTypeException:
The pull request event type is not valid.
- InvalidActorArnException:
The Amazon Resource Name (ARN) is not valid. Make sure that you have provided the full ARN for the user who initiated the change for the pull request, and then try again.
- ActorDoesNotExistException:
The specified Amazon Resource Name (ARN) does not exist in the Amazon Web Services account.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- 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.
DisassociateApprovalRuleTemplateFromRepository
$result = $client->disassociateApprovalRuleTemplateFromRepository
([/* ... */]); $promise = $client->disassociateApprovalRuleTemplateFromRepositoryAsync
([/* ... */]);
Removes the association between a template and a repository so that approval rules based on the template are not automatically created when pull requests are created in the specified repository. This does not delete any approval rules previously created for pull requests through the template association.
Parameter Syntax
$result = $client->disassociateApprovalRuleTemplateFromRepository([ 'approvalRuleTemplateName' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the approval rule template to disassociate from a specified repository.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository you want to disassociate from the template.
Result Syntax
[]
Result Details
Errors
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
EvaluatePullRequestApprovalRules
$result = $client->evaluatePullRequestApprovalRules
([/* ... */]); $promise = $client->evaluatePullRequestApprovalRulesAsync
([/* ... */]);
Evaluates whether a pull request has met all the conditions specified in its associated approval rules.
Parameter Syntax
$result = $client->evaluatePullRequestApprovalRules([ 'pullRequestId' => '<string>', // REQUIRED 'revisionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request you want to evaluate.
- revisionId
-
- Required: Yes
- Type: string
The system-generated ID for the pull request revision. To retrieve the most recent revision ID for a pull request, use GetPullRequest.
Result Syntax
[ 'evaluation' => [ 'approvalRulesNotSatisfied' => ['<string>', ...], 'approvalRulesSatisfied' => ['<string>', ...], 'approved' => true || false, 'overridden' => true || false, ], ]
Result Details
Members
- evaluation
-
- Required: Yes
- Type: Evaluation structure
The result of the evaluation, including the names of the rules whose conditions have been met (if any), the names of the rules whose conditions have not been met (if any), whether the pull request is in the approved state, and whether the pull request approval rule has been set aside by an override.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- InvalidRevisionIdException:
The revision ID is not valid. Use GetPullRequest to determine the value.
- RevisionIdRequiredException:
A revision ID is required, but was not provided.
- RevisionNotCurrentException:
The revision ID provided in the request does not match the current revision ID. Use GetPullRequest to retrieve the current revision ID.
- 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.
GetApprovalRuleTemplate
$result = $client->getApprovalRuleTemplate
([/* ... */]); $promise = $client->getApprovalRuleTemplateAsync
([/* ... */]);
Returns information about a specified approval rule template.
Parameter Syntax
$result = $client->getApprovalRuleTemplate([ 'approvalRuleTemplateName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the approval rule template for which you want to get information.
Result Syntax
[ 'approvalRuleTemplate' => [ 'approvalRuleTemplateContent' => '<string>', 'approvalRuleTemplateDescription' => '<string>', 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'ruleContentSha256' => '<string>', ], ]
Result Details
Members
- approvalRuleTemplate
-
- Required: Yes
- Type: ApprovalRuleTemplate structure
The content and structure of the approval rule template.
Errors
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
GetBlob
$result = $client->getBlob
([/* ... */]); $promise = $client->getBlobAsync
([/* ... */]);
Returns the base-64 encoded content of an individual blob in a repository.
Parameter Syntax
$result = $client->getBlob([ 'blobId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- blobId
-
- Required: Yes
- Type: string
The ID of the blob, which is its SHA-1 pointer.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the blob.
Result Syntax
[ 'content' => <string || resource || Psr\Http\Message\StreamInterface>, ]
Result Details
Members
- content
-
- Required: Yes
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
The content of the blob, usually a file.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- BlobIdRequiredException:
A blob ID is required, but was not specified.
- InvalidBlobIdException:
The specified blob is not valid.
- BlobIdDoesNotExistException:
The specified blob does not exist.
- 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.
- FileTooLargeException:
The specified file exceeds the file size limit for CodeCommit. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
GetBranch
$result = $client->getBranch
([/* ... */]); $promise = $client->getBranchAsync
([/* ... */]);
Returns information about a repository branch, including its name and the last commit ID.
Parameter Syntax
$result = $client->getBranch([ 'branchName' => '<string>', 'repositoryName' => '<string>', ]);
Parameter Details
Members
- branchName
-
- Type: string
The name of the branch for which you want to retrieve information.
- repositoryName
-
- Type: string
The name of the repository that contains the branch for which you want to retrieve information.
Result Syntax
[ 'branch' => [ 'branchName' => '<string>', 'commitId' => '<string>', ], ]
Result Details
Members
- branch
-
- Type: BranchInfo structure
The name of the branch.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- InvalidBranchNameException:
The specified reference name is not valid.
- BranchDoesNotExistException:
The specified branch does not exist.
- 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.
GetComment
$result = $client->getComment
([/* ... */]); $promise = $client->getCommentAsync
([/* ... */]);
Returns the content of a comment made on a change, file, or commit in a repository.
Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.
Parameter Syntax
$result = $client->getComment([ 'commentId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commentId
-
- Required: Yes
- Type: string
The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
Result Syntax
[ 'comment' => [ 'authorArn' => '<string>', 'callerReactions' => ['<string>', ...], 'clientRequestToken' => '<string>', 'commentId' => '<string>', 'content' => '<string>', 'creationDate' => <DateTime>, 'deleted' => true || false, 'inReplyTo' => '<string>', 'lastModifiedDate' => <DateTime>, 'reactionCounts' => [<integer>, ...], ], ]
Result Details
Members
- comment
-
- Type: Comment structure
The contents of the comment.
Errors
- CommentDoesNotExistException:
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
- CommentDeletedException:
This comment has already been deleted. You cannot edit or delete a deleted comment.
- CommentIdRequiredException:
The comment ID is missing or null. A comment ID is required.
- InvalidCommentIdException:
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
- 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.
GetCommentReactions
$result = $client->getCommentReactions
([/* ... */]); $promise = $client->getCommentReactionsAsync
([/* ... */]);
Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.
Parameter Syntax
$result = $client->getCommentReactions([ 'commentId' => '<string>', // REQUIRED 'maxResults' => <integer>, 'nextToken' => '<string>', 'reactionUserArn' => '<string>', ]);
Parameter Details
Members
- commentId
-
- Required: Yes
- Type: string
The ID of the comment for which you want to get reactions information.
- maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results. The default is the same as the allowed maximum, 1,000.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- reactionUserArn
-
- Type: string
Optional. The Amazon Resource Name (ARN) of the user or identity for which you want to get reaction information.
Result Syntax
[ 'nextToken' => '<string>', 'reactionsForComment' => [ [ 'reaction' => [ 'emoji' => '<string>', 'shortCode' => '<string>', 'unicode' => '<string>', ], 'reactionUsers' => ['<string>', ...], 'reactionsFromDeletedUsersCount' => <integer>, ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
An enumeration token that can be used in a request to return the next batch of the results.
- reactionsForComment
-
- Required: Yes
- Type: Array of ReactionForComment structures
An array of reactions to the specified comment.
Errors
- CommentDoesNotExistException:
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
- CommentIdRequiredException:
The comment ID is missing or null. A comment ID is required.
- InvalidCommentIdException:
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
- InvalidReactionUserArnException:
The Amazon Resource Name (ARN) of the user or identity is not valid.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- CommentDeletedException:
This comment has already been deleted. You cannot edit or delete a deleted comment.
GetCommentsForComparedCommit
$result = $client->getCommentsForComparedCommit
([/* ... */]); $promise = $client->getCommentsForComparedCommitAsync
([/* ... */]);
Returns information about comments made on the comparison between two commits.
Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.
Parameter Syntax
$result = $client->getCommentsForComparedCommit([ 'afterCommitId' => '<string>', // REQUIRED 'beforeCommitId' => '<string>', 'maxResults' => <integer>, 'nextToken' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- afterCommitId
-
- Required: Yes
- Type: string
To establish the directionality of the comparison, the full commit ID of the after commit.
- beforeCommitId
-
- Type: string
To establish the directionality of the comparison, the full commit ID of the before commit.
- maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results. The default is 100 comments, but you can configure up to 500.
- nextToken
-
- Type: string
An enumeration token that when provided in a request, returns the next batch of the results.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to compare commits.
Result Syntax
[ 'commentsForComparedCommitData' => [ [ 'afterBlobId' => '<string>', 'afterCommitId' => '<string>', 'beforeBlobId' => '<string>', 'beforeCommitId' => '<string>', 'comments' => [ [ 'authorArn' => '<string>', 'callerReactions' => ['<string>', ...], 'clientRequestToken' => '<string>', 'commentId' => '<string>', 'content' => '<string>', 'creationDate' => <DateTime>, 'deleted' => true || false, 'inReplyTo' => '<string>', 'lastModifiedDate' => <DateTime>, 'reactionCounts' => [<integer>, ...], ], // ... ], 'location' => [ 'filePath' => '<string>', 'filePosition' => <integer>, 'relativeFileVersion' => 'BEFORE|AFTER', ], 'repositoryName' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- commentsForComparedCommitData
-
- Type: Array of CommentsForComparedCommit structures
A list of comment objects on the compared commit.
- nextToken
-
- Type: string
An enumeration token that can be used in a request to return the next batch of the results.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- CommitIdRequiredException:
A commit ID was not specified.
- InvalidCommitIdException:
The specified commit ID is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- 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.
GetCommentsForPullRequest
$result = $client->getCommentsForPullRequest
([/* ... */]); $promise = $client->getCommentsForPullRequestAsync
([/* ... */]);
Returns comments made on a pull request.
Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.
Parameter Syntax
$result = $client->getCommentsForPullRequest([ 'afterCommitId' => '<string>', 'beforeCommitId' => '<string>', 'maxResults' => <integer>, 'nextToken' => '<string>', 'pullRequestId' => '<string>', // REQUIRED 'repositoryName' => '<string>', ]);
Parameter Details
Members
- afterCommitId
-
- Type: string
The full commit ID of the commit in the source branch that was the tip of the branch at the time the comment was made. Requirement is conditional:
afterCommitId
must be specified whenrepositoryName
is included. - beforeCommitId
-
- Type: string
The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created. Requirement is conditional:
beforeCommitId
must be specified whenrepositoryName
is included. - maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results. The default is 100 comments. You can return up to 500 comments with a single request.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
- repositoryName
-
- Type: string
The name of the repository that contains the pull request. Requirement is conditional:
repositoryName
must be specified whenbeforeCommitId
andafterCommitId
are included.
Result Syntax
[ 'commentsForPullRequestData' => [ [ 'afterBlobId' => '<string>', 'afterCommitId' => '<string>', 'beforeBlobId' => '<string>', 'beforeCommitId' => '<string>', 'comments' => [ [ 'authorArn' => '<string>', 'callerReactions' => ['<string>', ...], 'clientRequestToken' => '<string>', 'commentId' => '<string>', 'content' => '<string>', 'creationDate' => <DateTime>, 'deleted' => true || false, 'inReplyTo' => '<string>', 'lastModifiedDate' => <DateTime>, 'reactionCounts' => [<integer>, ...], ], // ... ], 'location' => [ 'filePath' => '<string>', 'filePosition' => <integer>, 'relativeFileVersion' => 'BEFORE|AFTER', ], 'pullRequestId' => '<string>', 'repositoryName' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- commentsForPullRequestData
-
- Type: Array of CommentsForPullRequest structures
An array of comment objects on the pull request.
- nextToken
-
- Type: string
An enumeration token that can be used in a request to return the next batch of the results.
Errors
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- CommitIdRequiredException:
A commit ID was not specified.
- InvalidCommitIdException:
The specified commit ID is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- RepositoryNotAssociatedWithPullRequestException:
The repository does not contain any pull requests with that pull request ID. Use GetPullRequest to verify the correct repository name for the pull request ID.
- 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.
GetCommit
$result = $client->getCommit
([/* ... */]); $promise = $client->getCommitAsync
([/* ... */]);
Returns information about a commit, including commit message and committer information.
Parameter Syntax
$result = $client->getCommit([ 'commitId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commitId
-
- Required: Yes
- Type: string
The commit ID. Commit IDs are the full SHA ID of the commit.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to which the commit was made.
Result Syntax
[ 'commit' => [ 'additionalData' => '<string>', 'author' => [ 'date' => '<string>', 'email' => '<string>', 'name' => '<string>', ], 'commitId' => '<string>', 'committer' => [ 'date' => '<string>', 'email' => '<string>', 'name' => '<string>', ], 'message' => '<string>', 'parents' => ['<string>', ...], 'treeId' => '<string>', ], ]
Result Details
Members
- commit
-
- Required: Yes
- Type: Commit structure
A commit data type object that contains information about the specified commit.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- CommitIdRequiredException:
A commit ID was not specified.
- InvalidCommitIdException:
The specified commit ID is not valid.
- CommitIdDoesNotExistException:
The specified commit ID does not exist.
- 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.
GetDifferences
$result = $client->getDifferences
([/* ... */]); $promise = $client->getDifferencesAsync
([/* ... */]);
Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference). Results can be limited to a specified path.
Parameter Syntax
$result = $client->getDifferences([ 'MaxResults' => <integer>, 'NextToken' => '<string>', 'afterCommitSpecifier' => '<string>', // REQUIRED 'afterPath' => '<string>', 'beforeCommitSpecifier' => '<string>', 'beforePath' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- MaxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results.
- NextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- afterCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit.
- afterPath
-
- Type: string
The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences are shown for all paths.
- beforeCommitSpecifier
-
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, the full commit ID). Optional. If not specified, all changes before the
afterCommitSpecifier
value are shown. If you do not usebeforeCommitSpecifier
in your request, consider limiting the results withmaxResults
. - beforePath
-
- Type: string
The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If
beforePath
andafterPath
are not specified, differences are shown for all paths. - repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to get differences.
Result Syntax
[ 'NextToken' => '<string>', 'differences' => [ [ 'afterBlob' => [ 'blobId' => '<string>', 'mode' => '<string>', 'path' => '<string>', ], 'beforeBlob' => [ 'blobId' => '<string>', 'mode' => '<string>', 'path' => '<string>', ], 'changeType' => 'A|M|D', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
An enumeration token that can be used in a request to return the next batch of the results.
- differences
-
- Type: Array of Difference structures
A data type object that contains information about the differences, including whether the difference is added, modified, or deleted (A, D, M).
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidCommitIdException:
The specified commit ID is not valid.
- CommitRequiredException:
A commit was not specified.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidPathException:
The specified path is not valid.
- PathDoesNotExistException:
The specified path does not exist.
- 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.
GetFile
$result = $client->getFile
([/* ... */]); $promise = $client->getFileAsync
([/* ... */]);
Returns the base-64 encoded contents of a specified file and its metadata.
Parameter Syntax
$result = $client->getFile([ 'commitSpecifier' => '<string>', 'filePath' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commitSpecifier
-
- Type: string
The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.
- filePath
-
- Required: Yes
- Type: string
The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the file.
Result Syntax
[ 'blobId' => '<string>', 'commitId' => '<string>', 'fileContent' => <string || resource || Psr\Http\Message\StreamInterface>, 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'filePath' => '<string>', 'fileSize' => <integer>, ]
Result Details
Members
- blobId
-
- Required: Yes
- Type: string
The blob ID of the object that represents the file content.
- commitId
-
- Required: Yes
- Type: string
The full commit ID of the commit that contains the content returned by GetFile.
- fileContent
-
- Required: Yes
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
The base-64 encoded binary data object that represents the content of the file.
- fileMode
-
- Required: Yes
- Type: string
The extrapolated file mode permissions of the blob. Valid values include strings such as EXECUTABLE and not numeric values.
The file mode permissions returned by this API are not the standard file mode permission values, such as 100644, but rather extrapolated values. See the supported return values.
- filePath
-
- Required: Yes
- Type: string
The fully qualified path to the specified file. Returns the name and extension of the file.
- fileSize
-
- Required: Yes
- Type: long (int|float)
The size of the contents of the file, in bytes.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- FileDoesNotExistException:
The specified file does not exist. Verify that you have used the correct file name, full path, and extension.
- 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.
- FileTooLargeException:
The specified file exceeds the file size limit for CodeCommit. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
GetFolder
$result = $client->getFolder
([/* ... */]); $promise = $client->getFolderAsync
([/* ... */]);
Returns the contents of a specified folder in a repository.
Parameter Syntax
$result = $client->getFolder([ 'commitSpecifier' => '<string>', 'folderPath' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commitSpecifier
-
- Type: string
A fully qualified reference used to identify a commit that contains the version of the folder's content to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content is returned as it exists in the HEAD commit.
- folderPath
-
- Required: Yes
- Type: string
The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository.
Result Syntax
[ 'commitId' => '<string>', 'files' => [ [ 'absolutePath' => '<string>', 'blobId' => '<string>', 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'relativePath' => '<string>', ], // ... ], 'folderPath' => '<string>', 'subFolders' => [ [ 'absolutePath' => '<string>', 'relativePath' => '<string>', 'treeId' => '<string>', ], // ... ], 'subModules' => [ [ 'absolutePath' => '<string>', 'commitId' => '<string>', 'relativePath' => '<string>', ], // ... ], 'symbolicLinks' => [ [ 'absolutePath' => '<string>', 'blobId' => '<string>', 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'relativePath' => '<string>', ], // ... ], 'treeId' => '<string>', ]
Result Details
Members
- commitId
-
- Required: Yes
- Type: string
The full commit ID used as a reference for the returned version of the folder content.
- files
-
- Type: Array of File structures
The list of files in the specified folder, if any.
- folderPath
-
- Required: Yes
- Type: string
The fully qualified path of the folder whose contents are returned.
- subFolders
-
- Type: Array of Folder structures
The list of folders that exist under the specified folder, if any.
- subModules
-
- Type: Array of SubModule structures
The list of submodules in the specified folder, if any.
- symbolicLinks
-
- Type: Array of SymbolicLink structures
The list of symbolic links to other files and folders in the specified folder, if any.
- treeId
-
- Type: string
The full SHA-1 pointer of the tree information for the commit that contains the folder.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- FolderDoesNotExistException:
The specified folder does not exist. Either the folder name is not correct, or you did not enter the full path to the folder.
- 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.
GetMergeCommit
$result = $client->getMergeCommit
([/* ... */]); $promise = $client->getMergeCommitAsync
([/* ... */]);
Returns information about a specified merge commit.
Parameter Syntax
$result = $client->getMergeCommit([ 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'destinationCommitSpecifier' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED ]);
Parameter Details
Members
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the merge commit about which you want to get information.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
Result Syntax
[ 'baseCommitId' => '<string>', 'destinationCommitId' => '<string>', 'mergedCommitId' => '<string>', 'sourceCommitId' => '<string>', ]
Result Details
Members
- baseCommitId
-
- Type: string
The commit ID of the merge base.
- destinationCommitId
-
- Type: string
The commit ID of the destination commit specifier that was used in the merge evaluation.
- mergedCommitId
-
- Type: string
The commit ID for the merge commit created when the source branch was merged into the destination branch. If the fast-forward merge strategy was used, there is no merge commit.
- sourceCommitId
-
- Type: string
The commit ID of the source commit specifier that was used in the merge evaluation.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- CommitRequiredException:
A commit was not specified.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- 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.
GetMergeConflicts
$result = $client->getMergeConflicts
([/* ... */]); $promise = $client->getMergeConflictsAsync
([/* ... */]);
Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
Parameter Syntax
$result = $client->getMergeConflicts([ 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'destinationCommitSpecifier' => '<string>', // REQUIRED 'maxConflictFiles' => <integer>, 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', // REQUIRED 'nextToken' => '<string>', 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED ]);
Parameter Details
Members
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- maxConflictFiles
-
- Type: int
The maximum number of files to include in the output.
- mergeOption
-
- Required: Yes
- Type: string
The merge option or strategy you want to use to merge the code.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where the pull request was created.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
Result Syntax
[ 'baseCommitId' => '<string>', 'conflictMetadataList' => [ [ 'contentConflict' => true || false, 'fileModeConflict' => true || false, 'fileModes' => [ 'base' => 'EXECUTABLE|NORMAL|SYMLINK', 'destination' => 'EXECUTABLE|NORMAL|SYMLINK', 'source' => 'EXECUTABLE|NORMAL|SYMLINK', ], 'filePath' => '<string>', 'fileSizes' => [ 'base' => <integer>, 'destination' => <integer>, 'source' => <integer>, ], 'isBinaryFile' => [ 'base' => true || false, 'destination' => true || false, 'source' => true || false, ], 'mergeOperations' => [ 'destination' => 'A|M|D', 'source' => 'A|M|D', ], 'numberOfConflicts' => <integer>, 'objectTypeConflict' => true || false, 'objectTypes' => [ 'base' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', 'destination' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', 'source' => 'FILE|DIRECTORY|GIT_LINK|SYMBOLIC_LINK', ], ], // ... ], 'destinationCommitId' => '<string>', 'mergeable' => true || false, 'nextToken' => '<string>', 'sourceCommitId' => '<string>', ]
Result Details
Members
- baseCommitId
-
- Type: string
The commit ID of the merge base.
- conflictMetadataList
-
- Required: Yes
- Type: Array of ConflictMetadata structures
A list of metadata for any conflicting files. If the specified merge strategy is FAST_FORWARD_MERGE, this list is always empty.
- destinationCommitId
-
- Required: Yes
- Type: string
The commit ID of the destination commit specifier that was used in the merge evaluation.
- mergeable
-
- Required: Yes
- Type: boolean
A Boolean value that indicates whether the code is mergeable by the specified merge option.
- nextToken
-
- Type: string
An enumeration token that can be used in a request to return the next batch of the results.
- sourceCommitId
-
- Required: Yes
- Type: string
The commit ID of the source commit specifier that was used in the merge evaluation.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- MergeOptionRequiredException:
A merge option or stategy is required, and none was provided.
- InvalidMergeOptionException:
The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- CommitRequiredException:
A commit was not specified.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidCommitException:
The specified commit is not valid.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- InvalidMaxConflictFilesException:
The specified value for the number of conflict files to return is not valid.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidDestinationCommitSpecifierException:
The destination commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
- InvalidSourceCommitSpecifierException:
The source commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- 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.
GetMergeOptions
$result = $client->getMergeOptions
([/* ... */]); $promise = $client->getMergeOptionsAsync
([/* ... */]);
Returns information about the merge options available for merging two specified branches. For details about why a merge option is not available, use GetMergeConflicts or DescribeMergeConflicts.
Parameter Syntax
$result = $client->getMergeOptions([ 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'destinationCommitSpecifier' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED ]);
Parameter Details
Members
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the commits about which you want to get merge options.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
Result Syntax
[ 'baseCommitId' => '<string>', 'destinationCommitId' => '<string>', 'mergeOptions' => ['<string>', ...], 'sourceCommitId' => '<string>', ]
Result Details
Members
- baseCommitId
-
- Required: Yes
- Type: string
The commit ID of the merge base.
- destinationCommitId
-
- Required: Yes
- Type: string
The commit ID of the destination commit specifier that was used in the merge evaluation.
- mergeOptions
-
- Required: Yes
- Type: Array of strings
The merge option or strategy used to merge the code.
- sourceCommitId
-
- Required: Yes
- Type: string
The commit ID of the source commit specifier that was used in the merge evaluation.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- CommitRequiredException:
A commit was not specified.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidCommitException:
The specified commit is not valid.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- 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.
GetPullRequest
$result = $client->getPullRequest
([/* ... */]); $promise = $client->getPullRequestAsync
([/* ... */]);
Gets information about a pull request in a specified repository.
Parameter Syntax
$result = $client->getPullRequest([ 'pullRequestId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
Result Syntax
[ 'pullRequest' => [ 'approvalRules' => [ [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], // ... ], 'authorArn' => '<string>', 'clientRequestToken' => '<string>', 'creationDate' => <DateTime>, 'description' => '<string>', 'lastActivityDate' => <DateTime>, 'pullRequestId' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'pullRequestTargets' => [ [ 'destinationCommit' => '<string>', 'destinationReference' => '<string>', 'mergeBase' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', 'sourceCommit' => '<string>', 'sourceReference' => '<string>', ], // ... ], 'revisionId' => '<string>', 'title' => '<string>', ], ]
Result Details
Members
- pullRequest
-
- Required: Yes
- Type: PullRequest structure
Information about the specified pull request.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- 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.
GetPullRequestApprovalStates
$result = $client->getPullRequestApprovalStates
([/* ... */]); $promise = $client->getPullRequestApprovalStatesAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->getPullRequestApprovalStates([ 'pullRequestId' => '<string>', // REQUIRED 'revisionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID for the pull request.
- revisionId
-
- Required: Yes
- Type: string
The system-generated ID for the pull request revision.
Result Syntax
[ 'approvals' => [ [ 'approvalState' => 'APPROVE|REVOKE', 'userArn' => '<string>', ], // ... ], ]
Result Details
Members
- approvals
-
- Type: Array of Approval structures
Information about users who have approved the pull request.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- InvalidRevisionIdException:
The revision ID is not valid. Use GetPullRequest to determine the value.
- RevisionIdRequiredException:
A revision ID is required, but was not provided.
- 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.
GetPullRequestOverrideState
$result = $client->getPullRequestOverrideState
([/* ... */]); $promise = $client->getPullRequestOverrideStateAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->getPullRequestOverrideState([ 'pullRequestId' => '<string>', // REQUIRED 'revisionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- pullRequestId
-
- Required: Yes
- Type: string
The ID of the pull request for which you want to get information about whether approval rules have been set aside (overridden).
- revisionId
-
- Required: Yes
- Type: string
The system-generated ID of the revision for the pull request. To retrieve the most recent revision ID, use GetPullRequest.
Result Syntax
[ 'overridden' => true || false, 'overrider' => '<string>', ]
Result Details
Members
- overridden
-
- Type: boolean
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
-
- Type: string
The Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- InvalidRevisionIdException:
The revision ID is not valid. Use GetPullRequest to determine the value.
- RevisionIdRequiredException:
A revision ID is required, but was not provided.
- 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.
GetRepository
$result = $client->getRepository
([/* ... */]); $promise = $client->getRepositoryAsync
([/* ... */]);
Returns information about a repository.
The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
Parameter Syntax
$result = $client->getRepository([ 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to get information about.
Result Syntax
[ 'repositoryMetadata' => [ 'Arn' => '<string>', 'accountId' => '<string>', 'cloneUrlHttp' => '<string>', 'cloneUrlSsh' => '<string>', 'creationDate' => <DateTime>, 'defaultBranch' => '<string>', 'kmsKeyId' => '<string>', 'lastModifiedDate' => <DateTime>, 'repositoryDescription' => '<string>', 'repositoryId' => '<string>', 'repositoryName' => '<string>', ], ]
Result Details
Members
- repositoryMetadata
-
- Type: RepositoryMetadata structure
Information about the repository.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- 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.
GetRepositoryTriggers
$result = $client->getRepositoryTriggers
([/* ... */]); $promise = $client->getRepositoryTriggersAsync
([/* ... */]);
Gets information about triggers configured for a repository.
Parameter Syntax
$result = $client->getRepositoryTriggers([ 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository for which the trigger is configured.
Result Syntax
[ 'configurationId' => '<string>', 'triggers' => [ [ 'branches' => ['<string>', ...], 'customData' => '<string>', 'destinationArn' => '<string>', 'events' => ['<string>', ...], 'name' => '<string>', ], // ... ], ]
Result Details
Members
- configurationId
-
- Type: string
The system-generated unique ID for the trigger.
- triggers
-
- Type: Array of RepositoryTrigger structures
The JSON block of configuration information for each trigger.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
ListApprovalRuleTemplates
$result = $client->listApprovalRuleTemplates
([/* ... */]); $promise = $client->listApprovalRuleTemplatesAsync
([/* ... */]);
Lists all approval rule templates in the specified Amazon Web Services Region in your Amazon Web Services account. If an Amazon Web Services Region is not specified, the Amazon Web Services Region where you are signed in is used.
Parameter Syntax
$result = $client->listApprovalRuleTemplates([ 'maxResults' => <integer>, 'nextToken' => '<string>', ]);
Parameter Details
Members
- maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
Result Syntax
[ 'approvalRuleTemplateNames' => ['<string>', ...], 'nextToken' => '<string>', ]
Result Details
Members
- approvalRuleTemplateNames
-
- Type: Array of strings
The names of all the approval rule templates found in the Amazon Web Services Region for your Amazon Web Services account.
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the next results of the operation.
Errors
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
ListAssociatedApprovalRuleTemplatesForRepository
$result = $client->listAssociatedApprovalRuleTemplatesForRepository
([/* ... */]); $promise = $client->listAssociatedApprovalRuleTemplatesForRepositoryAsync
([/* ... */]);
Lists all approval rule templates that are associated with a specified repository.
Parameter Syntax
$result = $client->listAssociatedApprovalRuleTemplatesForRepository([ 'maxResults' => <integer>, 'nextToken' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository for which you want to list all associated approval rule templates.
Result Syntax
[ 'approvalRuleTemplateNames' => ['<string>', ...], 'nextToken' => '<string>', ]
Result Details
Members
- approvalRuleTemplateNames
-
- Type: Array of strings
The names of all approval rule templates associated with the repository.
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the next results of the operation.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- 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.
ListBranches
$result = $client->listBranches
([/* ... */]); $promise = $client->listBranchesAsync
([/* ... */]);
Gets information about one or more branches in a repository.
Parameter Syntax
$result = $client->listBranches([ 'nextToken' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the results.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the branches.
Result Syntax
[ 'branches' => ['<string>', ...], 'nextToken' => '<string>', ]
Result Details
Members
- branches
-
- Type: Array of strings
The list of branch names.
- nextToken
-
- Type: string
An enumeration token that returns the batch of the results.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- 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.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
ListFileCommitHistory
$result = $client->listFileCommitHistory
([/* ... */]); $promise = $client->listFileCommitHistoryAsync
([/* ... */]);
Retrieves a list of commits and changes to a specified file.
Parameter Syntax
$result = $client->listFileCommitHistory([ 'commitSpecifier' => '<string>', 'filePath' => '<string>', // REQUIRED 'maxResults' => <integer>, 'nextToken' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commitSpecifier
-
- Type: string
The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as
refs/heads/main
. If none is provided, the head commit is used. - filePath
-
- Required: Yes
- Type: string
The full path of the file whose history you want to retrieve, including the name of the file.
- maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results.
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the results.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the file.
Result Syntax
[ 'nextToken' => '<string>', 'revisionDag' => [ [ 'blobId' => '<string>', 'commit' => [ 'additionalData' => '<string>', 'author' => [ 'date' => '<string>', 'email' => '<string>', 'name' => '<string>', ], 'commitId' => '<string>', 'committer' => [ 'date' => '<string>', 'email' => '<string>', 'name' => '<string>', ], 'message' => '<string>', 'parents' => ['<string>', ...], 'treeId' => '<string>', ], 'path' => '<string>', 'revisionChildren' => ['<string>', ...], ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
An enumeration token that can be used to return the next batch of results.
- revisionDag
-
- Required: Yes
- Type: Array of FileVersion structures
An array of FileVersion objects that form a directed acyclic graph (DAG) of the changes to the file made by the commits that changed the file.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- CommitRequiredException:
A commit was not specified.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- 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.
ListPullRequests
$result = $client->listPullRequests
([/* ... */]); $promise = $client->listPullRequestsAsync
([/* ... */]);
Returns a list of pull requests for a specified repository. The return list can be refined by pull request status or pull request author ARN.
Parameter Syntax
$result = $client->listPullRequests([ 'authorArn' => '<string>', 'maxResults' => <integer>, 'nextToken' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- authorArn
-
- Type: string
Optional. The Amazon Resource Name (ARN) of the user who created the pull request. If used, this filters the results to pull requests created by that user.
- maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- pullRequestStatus
-
- Type: string
Optional. The status of the pull request. If used, this refines the results to the pull requests that match the specified status.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository for which you want to list pull requests.
Result Syntax
[ 'nextToken' => '<string>', 'pullRequestIds' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the next results of the operation.
- pullRequestIds
-
- Required: Yes
- Type: Array of strings
The system-generated IDs of the pull requests.
Errors
- InvalidPullRequestStatusException:
The pull request status is not valid. The only valid values are
OPEN
andCLOSED
.- InvalidAuthorArnException:
The Amazon Resource Name (ARN) is not valid. Make sure that you have provided the full ARN for the author of the pull request, and then try again.
- AuthorDoesNotExistException:
The specified Amazon Resource Name (ARN) does not exist in the Amazon Web Services account.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- 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.
ListRepositories
$result = $client->listRepositories
([/* ... */]); $promise = $client->listRepositoriesAsync
([/* ... */]);
Gets information about one or more repositories.
Parameter Syntax
$result = $client->listRepositories([ 'nextToken' => '<string>', 'order' => 'ascending|descending', 'sortBy' => 'repositoryName|lastModifiedDate', ]);
Parameter Details
Members
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to CodeCommit, another page of 1,000 records is retrieved.
- order
-
- Type: string
The order in which to sort the results of a list repositories operation.
- sortBy
-
- Type: string
The criteria used to sort the results of a list repositories operation.
Result Syntax
[ 'nextToken' => '<string>', 'repositories' => [ [ 'repositoryId' => '<string>', 'repositoryName' => '<string>', ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to CodeCommit, another page of 1,000 records is retrieved.
- repositories
-
- Type: Array of RepositoryNameIdPair structures
Lists the repositories called by the list repositories operation.
Errors
- InvalidSortByException:
The specified sort by value is not valid.
- InvalidOrderException:
The specified sort order is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
ListRepositoriesForApprovalRuleTemplate
$result = $client->listRepositoriesForApprovalRuleTemplate
([/* ... */]); $promise = $client->listRepositoriesForApprovalRuleTemplateAsync
([/* ... */]);
Lists all repositories associated with the specified approval rule template.
Parameter Syntax
$result = $client->listRepositoriesForApprovalRuleTemplate([ 'approvalRuleTemplateName' => '<string>', // REQUIRED 'maxResults' => <integer>, 'nextToken' => '<string>', ]);
Parameter Details
Members
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the approval rule template for which you want to list repositories that are associated with that template.
- maxResults
-
- Type: int
A non-zero, non-negative integer used to limit the number of returned results.
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
Result Syntax
[ 'nextToken' => '<string>', 'repositoryNames' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the next results of the operation.
- repositoryNames
-
- Type: Array of strings
A list of repository names that are associated with the specified approval rule template.
Errors
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
- InvalidMaxResultsException:
The specified number of maximum results is not valid.
- InvalidContinuationTokenException:
The specified continuation token is not valid.
- 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.
ListTagsForResource
$result = $client->listTagsForResource
([/* ... */]); $promise = $client->listTagsForResourceAsync
([/* ... */]);
Gets information about Amazon Web Servicestags for a specified Amazon Resource Name (ARN) in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
Parameter Syntax
$result = $client->listTagsForResource([ 'nextToken' => '<string>', 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- nextToken
-
- Type: string
An enumeration token that, when provided in a request, returns the next batch of the results.
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource for which you want to get information about tags, if any.
Result Syntax
[ 'nextToken' => '<string>', 'tags' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
An enumeration token that allows the operation to batch the next results of the operation.
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
A list of tag key and value pairs associated with the specified resource.
Errors
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- ResourceArnRequiredException:
A valid Amazon Resource Name (ARN) for an CodeCommit resource is required. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
- InvalidResourceArnException:
The value for the resource ARN is not valid. For more information about resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
MergeBranchesByFastForward
$result = $client->mergeBranchesByFastForward
([/* ... */]); $promise = $client->mergeBranchesByFastForwardAsync
([/* ... */]);
Merges two branches using the fast-forward merge strategy.
Parameter Syntax
$result = $client->mergeBranchesByFastForward([ 'destinationCommitSpecifier' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED 'targetBranch' => '<string>', ]);
Parameter Details
Members
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to merge two branches.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- targetBranch
-
- Type: string
The branch where the merge is applied.
Result Syntax
[ 'commitId' => '<string>', 'treeId' => '<string>', ]
Result Details
Members
- commitId
-
- Type: string
The commit ID of the merge in the destination or target branch.
- treeId
-
- Type: string
The tree ID of the merge in the destination or target branch.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- CommitRequiredException:
A commit was not specified.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidTargetBranchException:
The specified target branch is not valid.
- InvalidBranchNameException:
The specified reference name is not valid.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- BranchNameIsTagNameException:
The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use ListBranches.
- BranchDoesNotExistException:
The specified branch does not exist.
- ManualMergeRequiredException:
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
- ConcurrentReferenceUpdateException:
The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
- 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.
MergeBranchesBySquash
$result = $client->mergeBranchesBySquash
([/* ... */]); $promise = $client->mergeBranchesBySquashAsync
([/* ... */]);
Merges two branches using the squash merge strategy.
Parameter Syntax
$result = $client->mergeBranchesBySquash([ 'authorName' => '<string>', 'commitMessage' => '<string>', 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolution' => [ 'deleteFiles' => [ [ 'filePath' => '<string>', // REQUIRED ], // ... ], 'replaceContents' => [ [ 'content' => <string || resource || Psr\Http\Message\StreamInterface>, 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'filePath' => '<string>', // REQUIRED 'replacementType' => 'KEEP_BASE|KEEP_SOURCE|KEEP_DESTINATION|USE_NEW_CONTENT', // REQUIRED ], // ... ], 'setFileModes' => [ [ 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', // REQUIRED 'filePath' => '<string>', // REQUIRED ], // ... ], ], 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'destinationCommitSpecifier' => '<string>', // REQUIRED 'email' => '<string>', 'keepEmptyFolders' => true || false, 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED 'targetBranch' => '<string>', ]);
Parameter Details
Members
- authorName
-
- Type: string
The name of the author who created the commit. This information is used as both the author and committer for the commit.
- commitMessage
-
- Type: string
The commit message for the merge.
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolution
-
- Type: ConflictResolution structure
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
-
- Type: string
The email address of the person merging the branches. This information is used in the commit information for the merge.
- keepEmptyFolders
-
- Type: boolean
If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file is created for empty folders. The default is false.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to merge two branches.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- targetBranch
-
- Type: string
The branch where the merge is applied.
Result Syntax
[ 'commitId' => '<string>', 'treeId' => '<string>', ]
Result Details
Members
- commitId
-
- Type: string
The commit ID of the merge in the destination or target branch.
- treeId
-
- Type: string
The tree ID of the merge in the destination or target branch.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- CommitRequiredException:
A commit was not specified.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidTargetBranchException:
The specified target branch is not valid.
- InvalidBranchNameException:
The specified reference name is not valid.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- BranchNameIsTagNameException:
The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use ListBranches.
- BranchDoesNotExistException:
The specified branch does not exist.
- ManualMergeRequiredException:
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- InvalidConflictResolutionException:
The specified conflict resolution list is not valid.
- MaximumConflictResolutionEntriesExceededException:
The number of allowed conflict resolution entries was exceeded.
- MultipleConflictResolutionEntriesException:
More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
- ReplacementTypeRequiredException:
A replacement type is required.
- InvalidReplacementTypeException:
Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
- ReplacementContentRequiredException:
USE_NEW_CONTENT was specified, but no replacement content has been provided.
- InvalidReplacementContentException:
Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- FileContentSizeLimitExceededException:
The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
- FolderContentSizeLimitExceededException:
The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- FileModeRequiredException:
The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.
- InvalidFileModeException:
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
- NameLengthExceededException:
The user name is not valid because it has exceeded the character limit for author names.
- InvalidEmailException:
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
- CommitMessageLengthExceededException:
The commit message is too long. Provide a shorter string.
- ConcurrentReferenceUpdateException:
The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
- 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.
MergeBranchesByThreeWay
$result = $client->mergeBranchesByThreeWay
([/* ... */]); $promise = $client->mergeBranchesByThreeWayAsync
([/* ... */]);
Merges two specified branches using the three-way merge strategy.
Parameter Syntax
$result = $client->mergeBranchesByThreeWay([ 'authorName' => '<string>', 'commitMessage' => '<string>', 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolution' => [ 'deleteFiles' => [ [ 'filePath' => '<string>', // REQUIRED ], // ... ], 'replaceContents' => [ [ 'content' => <string || resource || Psr\Http\Message\StreamInterface>, 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'filePath' => '<string>', // REQUIRED 'replacementType' => 'KEEP_BASE|KEEP_SOURCE|KEEP_DESTINATION|USE_NEW_CONTENT', // REQUIRED ], // ... ], 'setFileModes' => [ [ 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', // REQUIRED 'filePath' => '<string>', // REQUIRED ], // ... ], ], 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'destinationCommitSpecifier' => '<string>', // REQUIRED 'email' => '<string>', 'keepEmptyFolders' => true || false, 'repositoryName' => '<string>', // REQUIRED 'sourceCommitSpecifier' => '<string>', // REQUIRED 'targetBranch' => '<string>', ]);
Parameter Details
Members
- authorName
-
- Type: string
The name of the author who created the commit. This information is used as both the author and committer for the commit.
- commitMessage
-
- Type: string
The commit message to include in the commit information for the merge.
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolution
-
- Type: ConflictResolution structure
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
- destinationCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
-
- Type: string
The email address of the person merging the branches. This information is used in the commit information for the merge.
- keepEmptyFolders
-
- Type: boolean
If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a .gitkeep file is created for empty folders. The default is false.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to merge two branches.
- sourceCommitSpecifier
-
- Required: Yes
- Type: string
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
- targetBranch
-
- Type: string
The branch where the merge is applied.
Result Syntax
[ 'commitId' => '<string>', 'treeId' => '<string>', ]
Result Details
Members
- commitId
-
- Type: string
The commit ID of the merge in the destination or target branch.
- treeId
-
- Type: string
The tree ID of the merge in the destination or target branch.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- CommitRequiredException:
A commit was not specified.
- InvalidCommitException:
The specified commit is not valid.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidTargetBranchException:
The specified target branch is not valid.
- InvalidBranchNameException:
The specified reference name is not valid.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- BranchNameIsTagNameException:
The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use ListBranches.
- BranchDoesNotExistException:
The specified branch does not exist.
- ManualMergeRequiredException:
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
- ConcurrentReferenceUpdateException:
The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- InvalidConflictResolutionException:
The specified conflict resolution list is not valid.
- MaximumConflictResolutionEntriesExceededException:
The number of allowed conflict resolution entries was exceeded.
- MultipleConflictResolutionEntriesException:
More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
- ReplacementTypeRequiredException:
A replacement type is required.
- InvalidReplacementTypeException:
Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
- ReplacementContentRequiredException:
USE_NEW_CONTENT was specified, but no replacement content has been provided.
- InvalidReplacementContentException:
Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- FileContentSizeLimitExceededException:
The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
- FolderContentSizeLimitExceededException:
The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- FileModeRequiredException:
The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.
- InvalidFileModeException:
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
- NameLengthExceededException:
The user name is not valid because it has exceeded the character limit for author names.
- InvalidEmailException:
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
- CommitMessageLengthExceededException:
The commit message is too long. Provide a shorter string.
- 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.
MergePullRequestByFastForward
$result = $client->mergePullRequestByFastForward
([/* ... */]); $promise = $client->mergePullRequestByFastForwardAsync
([/* ... */]);
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge strategy. If the merge is successful, it closes the pull request.
Parameter Syntax
$result = $client->mergePullRequestByFastForward([ 'pullRequestId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED 'sourceCommitId' => '<string>', ]);
Parameter Details
Members
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where the pull request was created.
- sourceCommitId
-
- Type: string
The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.
Result Syntax
[ 'pullRequest' => [ 'approvalRules' => [ [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], // ... ], 'authorArn' => '<string>', 'clientRequestToken' => '<string>', 'creationDate' => <DateTime>, 'description' => '<string>', 'lastActivityDate' => <DateTime>, 'pullRequestId' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'pullRequestTargets' => [ [ 'destinationCommit' => '<string>', 'destinationReference' => '<string>', 'mergeBase' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', 'sourceCommit' => '<string>', 'sourceReference' => '<string>', ], // ... ], 'revisionId' => '<string>', 'title' => '<string>', ], ]
Result Details
Members
- pullRequest
-
- Type: PullRequest structure
Information about the specified pull request, including the merge.
Errors
- ManualMergeRequiredException:
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- TipOfSourceReferenceIsDifferentException:
The tip of the source branch in the destination repository does not match the tip of the source branch specified in your request. The pull request might have been updated. Make sure that you have the latest changes.
- ReferenceDoesNotExistException:
The specified reference does not exist. You must provide a full commit ID.
- InvalidCommitIdException:
The specified commit ID is not valid.
- RepositoryNotAssociatedWithPullRequestException:
The repository does not contain any pull requests with that pull request ID. Use GetPullRequest to verify the correct repository name for the pull request ID.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- ConcurrentReferenceUpdateException:
The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
- PullRequestApprovalRulesNotSatisfiedException:
The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.
- 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.
MergePullRequestBySquash
$result = $client->mergePullRequestBySquash
([/* ... */]); $promise = $client->mergePullRequestBySquashAsync
([/* ... */]);
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the squash merge strategy. If the merge is successful, it closes the pull request.
Parameter Syntax
$result = $client->mergePullRequestBySquash([ 'authorName' => '<string>', 'commitMessage' => '<string>', 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolution' => [ 'deleteFiles' => [ [ 'filePath' => '<string>', // REQUIRED ], // ... ], 'replaceContents' => [ [ 'content' => <string || resource || Psr\Http\Message\StreamInterface>, 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'filePath' => '<string>', // REQUIRED 'replacementType' => 'KEEP_BASE|KEEP_SOURCE|KEEP_DESTINATION|USE_NEW_CONTENT', // REQUIRED ], // ... ], 'setFileModes' => [ [ 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', // REQUIRED 'filePath' => '<string>', // REQUIRED ], // ... ], ], 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'email' => '<string>', 'keepEmptyFolders' => true || false, 'pullRequestId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED 'sourceCommitId' => '<string>', ]);
Parameter Details
Members
- authorName
-
- Type: string
The name of the author who created the commit. This information is used as both the author and committer for the commit.
- commitMessage
-
- Type: string
The commit message to include in the commit information for the merge.
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolution
-
- Type: ConflictResolution structure
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
-
- Type: string
The email address of the person merging the branches. This information is used in the commit information for the merge.
- keepEmptyFolders
-
- Type: boolean
If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a .gitkeep file is created for empty folders. The default is false.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where the pull request was created.
- sourceCommitId
-
- Type: string
The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.
Result Syntax
[ 'pullRequest' => [ 'approvalRules' => [ [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], // ... ], 'authorArn' => '<string>', 'clientRequestToken' => '<string>', 'creationDate' => <DateTime>, 'description' => '<string>', 'lastActivityDate' => <DateTime>, 'pullRequestId' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'pullRequestTargets' => [ [ 'destinationCommit' => '<string>', 'destinationReference' => '<string>', 'mergeBase' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', 'sourceCommit' => '<string>', 'sourceReference' => '<string>', ], // ... ], 'revisionId' => '<string>', 'title' => '<string>', ], ]
Result Details
Members
- pullRequest
-
- Type: PullRequest structure
Returns information about a pull request.
Errors
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
- PullRequestDoesNotExistException:
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:
A pull request ID is required, but none was provided.
- InvalidPullRequestIdException:
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.
- InvalidCommitIdException:
The specified commit ID is not valid.
- ManualMergeRequiredException:
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
- TipOfSourceReferenceIsDifferentException:
The tip of the source branch in the destination repository does not match the tip of the source branch specified in your request. The pull request might have been updated. Make sure that you have the latest changes.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- NameLengthExceededException:
The user name is not valid because it has exceeded the character limit for author names.
- InvalidEmailException:
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
- CommitMessageLengthExceededException:
The commit message is too long. Provide a shorter string.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- InvalidConflictResolutionException:
The specified conflict resolution list is not valid.
- ReplacementTypeRequiredException:
A replacement type is required.
- InvalidReplacementTypeException:
Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
- MultipleConflictResolutionEntriesException:
More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
- ReplacementContentRequiredException:
USE_NEW_CONTENT was specified, but no replacement content has been provided.
- MaximumConflictResolutionEntriesExceededException:
The number of allowed conflict resolution entries was exceeded.
- ConcurrentReferenceUpdateException:
The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- InvalidFileModeException:
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
- InvalidReplacementContentException:
Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
- FileContentSizeLimitExceededException:
The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
- FolderContentSizeLimitExceededException:
The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- RepositoryNotAssociatedWithPullRequestException:
The repository does not contain any pull requests with that pull request ID. Use GetPullRequest to verify the correct repository name for the pull request ID.
- PullRequestApprovalRulesNotSatisfiedException:
The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.
- 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.
MergePullRequestByThreeWay
$result = $client->mergePullRequestByThreeWay
([/* ... */]); $promise = $client->mergePullRequestByThreeWayAsync
([/* ... */]);
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the three-way merge strategy. If the merge is successful, it closes the pull request.
Parameter Syntax
$result = $client->mergePullRequestByThreeWay([ 'authorName' => '<string>', 'commitMessage' => '<string>', 'conflictDetailLevel' => 'FILE_LEVEL|LINE_LEVEL', 'conflictResolution' => [ 'deleteFiles' => [ [ 'filePath' => '<string>', // REQUIRED ], // ... ], 'replaceContents' => [ [ 'content' => <string || resource || Psr\Http\Message\StreamInterface>, 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'filePath' => '<string>', // REQUIRED 'replacementType' => 'KEEP_BASE|KEEP_SOURCE|KEEP_DESTINATION|USE_NEW_CONTENT', // REQUIRED ], // ... ], 'setFileModes' => [ [ 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', // REQUIRED 'filePath' => '<string>', // REQUIRED ], // ... ], ], 'conflictResolutionStrategy' => 'NONE|ACCEPT_SOURCE|ACCEPT_DESTINATION|AUTOMERGE', 'email' => '<string>', 'keepEmptyFolders' => true || false, 'pullRequestId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED 'sourceCommitId' => '<string>', ]);
Parameter Details
Members
- authorName
-
- Type: string
The name of the author who created the commit. This information is used as both the author and committer for the commit.
- commitMessage
-
- Type: string
The commit message to include in the commit information for the merge.
- conflictDetailLevel
-
- Type: string
The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.
- conflictResolution
-
- Type: ConflictResolution structure
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
- conflictResolutionStrategy
-
- Type: string
Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.
-
- Type: string
The email address of the person merging the branches. This information is used in the commit information for the merge.
- keepEmptyFolders
-
- Type: boolean
If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a .gitkeep file is created for empty folders. The default is false.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where the pull request was created.
- sourceCommitId
-
- Type: string
The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.
Result Syntax
[ 'pullRequest' => [ 'approvalRules' => [ [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], // ... ], 'authorArn' => '<string>', 'clientRequestToken' => '<string>', 'creationDate' => <DateTime>, 'description' => '<string>', 'lastActivityDate' => <DateTime>, 'pullRequestId' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'pullRequestTargets' => [ [ 'destinationCommit' => '<string>', 'destinationReference' => '<string>', 'mergeBase' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', 'sourceCommit' => '<string>', 'sourceReference' => '<string>', ], // ... ], 'revisionId' => '<string>', 'title' => '<string>', ], ]
Result Details
Members
- pullRequest
-
- Type: PullRequest structure
Returns information about a pull request.
Errors
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
- PullRequestDoesNotExistException:
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:
A pull request ID is required, but none was provided.
- InvalidPullRequestIdException:
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.
- InvalidCommitIdException:
The specified commit ID is not valid.
- ManualMergeRequiredException:
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
- TipOfSourceReferenceIsDifferentException:
The tip of the source branch in the destination repository does not match the tip of the source branch specified in your request. The pull request might have been updated. Make sure that you have the latest changes.
- TipsDivergenceExceededException:
The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using
git diff
or a diff tool.- NameLengthExceededException:
The user name is not valid because it has exceeded the character limit for author names.
- InvalidEmailException:
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
- CommitMessageLengthExceededException:
The commit message is too long. Provide a shorter string.
- InvalidConflictDetailLevelException:
The specified conflict detail level is not valid.
- InvalidConflictResolutionStrategyException:
The specified conflict resolution strategy is not valid.
- InvalidConflictResolutionException:
The specified conflict resolution list is not valid.
- ReplacementTypeRequiredException:
A replacement type is required.
- InvalidReplacementTypeException:
Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
- MultipleConflictResolutionEntriesException:
More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
- ReplacementContentRequiredException:
USE_NEW_CONTENT was specified, but no replacement content has been provided.
- MaximumConflictResolutionEntriesExceededException:
The number of allowed conflict resolution entries was exceeded.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- InvalidFileModeException:
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
- InvalidReplacementContentException:
Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
- FileContentSizeLimitExceededException:
The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
- FolderContentSizeLimitExceededException:
The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
- MaximumFileContentToLoadExceededException:
The number of files to load exceeds the allowed limit.
- MaximumItemsToCompareExceededException:
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- RepositoryNotAssociatedWithPullRequestException:
The repository does not contain any pull requests with that pull request ID. Use GetPullRequest to verify the correct repository name for the pull request ID.
- ConcurrentReferenceUpdateException:
The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
- PullRequestApprovalRulesNotSatisfiedException:
The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.
- 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.
OverridePullRequestApprovalRules
$result = $client->overridePullRequestApprovalRules
([/* ... */]); $promise = $client->overridePullRequestApprovalRulesAsync
([/* ... */]);
Sets aside (overrides) all approval rule requirements for a specified pull request.
Parameter Syntax
$result = $client->overridePullRequestApprovalRules([ 'overrideStatus' => 'OVERRIDE|REVOKE', // REQUIRED 'pullRequestId' => '<string>', // REQUIRED 'revisionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- overrideStatus
-
- Required: Yes
- Type: string
Whether you want to set aside approval rule requirements for the pull request (OVERRIDE) or revoke a previous override and apply approval rule requirements (REVOKE). REVOKE status is not stored.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request for which you want to override all approval rule requirements. To get this information, use GetPullRequest.
- revisionId
-
- Required: Yes
- Type: string
The system-generated ID of the most recent revision of the pull request. You cannot override approval rules for anything but the most recent revision of a pull request. To get the revision ID, use GetPullRequest.
Result Syntax
[]
Result Details
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- InvalidRevisionIdException:
The revision ID is not valid. Use GetPullRequest to determine the value.
- RevisionIdRequiredException:
A revision ID is required, but was not provided.
- InvalidOverrideStatusException:
The override status is not valid. Valid statuses are OVERRIDE and REVOKE.
- OverrideStatusRequiredException:
An override status is required, but no value was provided. Valid values include OVERRIDE and REVOKE.
- OverrideAlreadySetException:
The pull request has already had its approval rules set to override.
- RevisionNotCurrentException:
The revision ID provided in the request does not match the current revision ID. Use GetPullRequest to retrieve the current revision ID.
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
- 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.
PostCommentForComparedCommit
$result = $client->postCommentForComparedCommit
([/* ... */]); $promise = $client->postCommentForComparedCommitAsync
([/* ... */]);
Posts a comment on the comparison between two commits.
Parameter Syntax
$result = $client->postCommentForComparedCommit([ 'afterCommitId' => '<string>', // REQUIRED 'beforeCommitId' => '<string>', 'clientRequestToken' => '<string>', 'content' => '<string>', // REQUIRED 'location' => [ 'filePath' => '<string>', 'filePosition' => <integer>, 'relativeFileVersion' => 'BEFORE|AFTER', ], 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- afterCommitId
-
- Required: Yes
- Type: string
To establish the directionality of the comparison, the full commit ID of the after commit.
- beforeCommitId
-
- Type: string
To establish the directionality of the comparison, the full commit ID of the before commit. Required for commenting on any commit unless that commit is the initial commit.
- clientRequestToken
-
- Type: string
A 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.
- content
-
- Required: Yes
- Type: string
The content of the comment you want to make.
- location
-
- Type: Location structure
The location of the comparison where you want to comment.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to post a comment on the comparison between commits.
Result Syntax
[ 'afterBlobId' => '<string>', 'afterCommitId' => '<string>', 'beforeBlobId' => '<string>', 'beforeCommitId' => '<string>', 'comment' => [ 'authorArn' => '<string>', 'callerReactions' => ['<string>', ...], 'clientRequestToken' => '<string>', 'commentId' => '<string>', 'content' => '<string>', 'creationDate' => <DateTime>, 'deleted' => true || false, 'inReplyTo' => '<string>', 'lastModifiedDate' => <DateTime>, 'reactionCounts' => [<integer>, ...], ], 'location' => [ 'filePath' => '<string>', 'filePosition' => <integer>, 'relativeFileVersion' => 'BEFORE|AFTER', ], 'repositoryName' => '<string>', ]
Result Details
Members
- afterBlobId
-
- Type: string
In the directionality you established, the blob ID of the after blob.
- afterCommitId
-
- Type: string
In the directionality you established, the full commit ID of the after commit.
- beforeBlobId
-
- Type: string
In the directionality you established, the blob ID of the before blob.
- beforeCommitId
-
- Type: string
In the directionality you established, the full commit ID of the before commit.
- comment
-
- Type: Comment structure
The content of the comment you posted.
- location
-
- Type: Location structure
The location of the comment in the comparison between the two commits.
- repositoryName
-
- Type: string
The name of the repository where you posted a comment on the comparison between commits.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- 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.
- InvalidClientRequestTokenException:
The client request token is not valid.
- 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.
- CommentContentRequiredException:
The comment is empty. You must provide some content for a comment. The content cannot be null.
- CommentContentSizeLimitExceededException:
The comment is too large. Comments are limited to 10,240 characters.
- InvalidFileLocationException:
The location of the file is not valid. Make sure that you include the file name and extension.
- InvalidRelativeFileVersionEnumException:
Either the enum is not in a valid format, or the specified file version enum is not valid in respect to the current file version.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidFilePositionException:
The position is not valid. Make sure that the line number exists in the version of the file you want to comment on.
- CommitIdRequiredException:
A commit ID was not specified.
- InvalidCommitIdException:
The specified commit ID is not valid.
- BeforeCommitIdAndAfterCommitIdAreSameException:
The before commit ID and the after commit ID are the same, which is not valid. The before commit ID and the after commit ID must be different commit IDs.
- 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.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidPathException:
The specified path is not valid.
- PathDoesNotExistException:
The specified path does not exist.
- PathRequiredException:
The folderPath for a location cannot be null.
PostCommentForPullRequest
$result = $client->postCommentForPullRequest
([/* ... */]); $promise = $client->postCommentForPullRequestAsync
([/* ... */]);
Posts a comment on a pull request.
Parameter Syntax
$result = $client->postCommentForPullRequest([ 'afterCommitId' => '<string>', // REQUIRED 'beforeCommitId' => '<string>', // REQUIRED 'clientRequestToken' => '<string>', 'content' => '<string>', // REQUIRED 'location' => [ 'filePath' => '<string>', 'filePosition' => <integer>, 'relativeFileVersion' => 'BEFORE|AFTER', ], 'pullRequestId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- afterCommitId
-
- Required: Yes
- Type: string
The full commit ID of the commit in the source branch that is the current tip of the branch for the pull request when you post the comment.
- beforeCommitId
-
- Required: Yes
- Type: string
The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created.
- clientRequestToken
-
- Type: string
A 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.
- content
-
- Required: Yes
- Type: string
The content of your comment on the change.
- location
-
- Type: Location structure
The location of the change where you want to post your comment. If no location is provided, the comment is posted as a general comment on the pull request difference between the before commit ID and the after commit ID.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to post a comment on a pull request.
Result Syntax
[ 'afterBlobId' => '<string>', 'afterCommitId' => '<string>', 'beforeBlobId' => '<string>', 'beforeCommitId' => '<string>', 'comment' => [ 'authorArn' => '<string>', 'callerReactions' => ['<string>', ...], 'clientRequestToken' => '<string>', 'commentId' => '<string>', 'content' => '<string>', 'creationDate' => <DateTime>, 'deleted' => true || false, 'inReplyTo' => '<string>', 'lastModifiedDate' => <DateTime>, 'reactionCounts' => [<integer>, ...], ], 'location' => [ 'filePath' => '<string>', 'filePosition' => <integer>, 'relativeFileVersion' => 'BEFORE|AFTER', ], 'pullRequestId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
- afterBlobId
-
- Type: string
In the directionality of the pull request, the blob ID of the after blob.
- afterCommitId
-
- Type: string
The full commit ID of the commit in the destination branch where the pull request is merged.
- beforeBlobId
-
- Type: string
In the directionality of the pull request, the blob ID of the before blob.
- beforeCommitId
-
- Type: string
The full commit ID of the commit in the source branch used to create the pull request, or in the case of an updated pull request, the full commit ID of the commit used to update the pull request.
- comment
-
- Type: Comment structure
The content of the comment you posted.
- location
-
- Type: Location structure
The location of the change where you posted your comment.
- pullRequestId
-
- Type: string
The system-generated ID of the pull request.
- repositoryName
-
- Type: string
The name of the repository where you posted a comment on a pull request.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- RepositoryNotAssociatedWithPullRequestException:
The repository does not contain any pull requests with that pull request ID. Use GetPullRequest to verify the correct repository name for the pull request ID.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- 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.
- InvalidClientRequestTokenException:
The client request token is not valid.
- 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.
- CommentContentRequiredException:
The comment is empty. You must provide some content for a comment. The content cannot be null.
- CommentContentSizeLimitExceededException:
The comment is too large. Comments are limited to 10,240 characters.
- InvalidFileLocationException:
The location of the file is not valid. Make sure that you include the file name and extension.
- InvalidRelativeFileVersionEnumException:
Either the enum is not in a valid format, or the specified file version enum is not valid in respect to the current file version.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidFilePositionException:
The position is not valid. Make sure that the line number exists in the version of the file you want to comment on.
- CommitIdRequiredException:
A commit ID was not specified.
- InvalidCommitIdException:
The specified commit ID is not valid.
- BeforeCommitIdAndAfterCommitIdAreSameException:
The before commit ID and the after commit ID are the same, which is not valid. The before commit ID and the after commit ID must be different commit IDs.
- 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.
- CommitDoesNotExistException:
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
- InvalidPathException:
The specified path is not valid.
- PathDoesNotExistException:
The specified path does not exist.
- PathRequiredException:
The folderPath for a location cannot be null.
PostCommentReply
$result = $client->postCommentReply
([/* ... */]); $promise = $client->postCommentReplyAsync
([/* ... */]);
Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
Parameter Syntax
$result = $client->postCommentReply([ 'clientRequestToken' => '<string>', 'content' => '<string>', // REQUIRED 'inReplyTo' => '<string>', // REQUIRED ]);
Parameter Details
Members
- clientRequestToken
-
- Type: string
A 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.
- content
-
- Required: Yes
- Type: string
The contents of your reply to a comment.
- inReplyTo
-
- Required: Yes
- Type: string
The system-generated ID of the comment to which you want to reply. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
Result Syntax
[ 'comment' => [ 'authorArn' => '<string>', 'callerReactions' => ['<string>', ...], 'clientRequestToken' => '<string>', 'commentId' => '<string>', 'content' => '<string>', 'creationDate' => <DateTime>, 'deleted' => true || false, 'inReplyTo' => '<string>', 'lastModifiedDate' => <DateTime>, 'reactionCounts' => [<integer>, ...], ], ]
Result Details
Members
- comment
-
- Type: Comment structure
Information about the reply to a comment.
Errors
- 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.
- InvalidClientRequestTokenException:
The client request token is not valid.
- 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.
- CommentContentRequiredException:
The comment is empty. You must provide some content for a comment. The content cannot be null.
- CommentContentSizeLimitExceededException:
The comment is too large. Comments are limited to 10,240 characters.
- CommentDoesNotExistException:
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
- CommentIdRequiredException:
The comment ID is missing or null. A comment ID is required.
- InvalidCommentIdException:
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
PutCommentReaction
$result = $client->putCommentReaction
([/* ... */]); $promise = $client->putCommentReactionAsync
([/* ... */]);
Adds or updates a reaction to a specified comment for the user whose identity is used to make the request. You can only add or update a reaction for yourself. You cannot add, modify, or delete a reaction for another user.
Parameter Syntax
$result = $client->putCommentReaction([ 'commentId' => '<string>', // REQUIRED 'reactionValue' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commentId
-
- Required: Yes
- Type: string
The ID of the comment to which you want to add or update a reaction.
- reactionValue
-
- Required: Yes
- Type: string
The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the CodeCommit User Guide.
Result Syntax
[]
Result Details
Errors
- CommentDoesNotExistException:
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
- CommentIdRequiredException:
The comment ID is missing or null. A comment ID is required.
- InvalidCommentIdException:
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
- InvalidReactionValueException:
The value of the reaction is not valid. For more information, see the CodeCommit User Guide.
- ReactionValueRequiredException:
A reaction value is required.
- ReactionLimitExceededException:
The number of reactions has been exceeded. Reactions are limited to one reaction per user for each individual comment ID.
- CommentDeletedException:
This comment has already been deleted. You cannot edit or delete a deleted comment.
PutFile
$result = $client->putFile
([/* ... */]); $promise = $client->putFileAsync
([/* ... */]);
Adds or updates a file in a branch in an CodeCommit repository, and generates a commit for the addition in the specified branch.
Parameter Syntax
$result = $client->putFile([ 'branchName' => '<string>', // REQUIRED 'commitMessage' => '<string>', 'email' => '<string>', 'fileContent' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED 'fileMode' => 'EXECUTABLE|NORMAL|SYMLINK', 'filePath' => '<string>', // REQUIRED 'name' => '<string>', 'parentCommitId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- branchName
-
- Required: Yes
- Type: string
The name of the branch where you want to add or update the file. If this is an empty repository, this branch is created.
- commitMessage
-
- Type: string
A message about why this file was added or updated. Although it is optional, a message makes the commit history for your repository more useful.
-
- Type: string
An email address for the person adding or updating the file.
- fileContent
-
- Required: Yes
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
The content of the file, in binary object format.
- fileMode
-
- Type: string
The file mode permissions of the blob. Valid file mode permissions are listed here.
- filePath
-
- Required: Yes
- Type: string
The name of the file you want to add or update, including the relative path to the file in the repository.
If the path does not currently exist in the repository, the path is created as part of adding the file.
- name
-
- Type: string
The name of the person adding or updating the file. Although it is optional, a name makes the commit history for your repository more useful.
- parentCommitId
-
- Type: string
The full commit ID of the head commit in the branch where you want to add or update the file. If this is an empty repository, no commit ID is required. If this is not an empty repository, a commit ID is required.
The commit ID must match the ID of the head commit at the time of the operation. Otherwise, an error occurs, and the file is not added or updated.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to add or update the file.
Result Syntax
[ 'blobId' => '<string>', 'commitId' => '<string>', 'treeId' => '<string>', ]
Result Details
Members
- blobId
-
- Required: Yes
- Type: string
The ID of the blob, which is its SHA-1 pointer.
- commitId
-
- Required: Yes
- Type: string
The full SHA ID of the commit that contains this file change.
- treeId
-
- Required: Yes
- Type: string
The full SHA-1 pointer of the tree information for the commit that contains this file change.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- ParentCommitIdRequiredException:
A parent commit ID is required. To view the full commit ID of a branch in a repository, use GetBranch or a Git command (for example, git pull or git log).
- InvalidParentCommitIdException:
The parent commit ID is not valid. The commit ID cannot be empty, and must match the head commit ID for the branch of the repository where you want to add or update a file.
- ParentCommitDoesNotExistException:
The parent commit ID is not valid because it does not exist. The specified parent commit ID does not exist in the specified branch of the repository.
- ParentCommitIdOutdatedException:
The file could not be added because the provided parent commit ID is not the current tip of the specified branch. To view the full commit ID of the current head of the branch, use GetBranch.
- FileContentRequiredException:
The file cannot be added because it is empty. Empty files cannot be added to the repository with this API.
- FileContentSizeLimitExceededException:
The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
- FolderContentSizeLimitExceededException:
The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
- PathRequiredException:
The folderPath for a location cannot be null.
- InvalidPathException:
The specified path is not valid.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- InvalidBranchNameException:
The specified reference name is not valid.
- BranchDoesNotExistException:
The specified branch does not exist.
- BranchNameIsTagNameException:
The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use ListBranches.
- InvalidFileModeException:
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
- NameLengthExceededException:
The user name is not valid because it has exceeded the character limit for author names.
- InvalidEmailException:
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
- CommitMessageLengthExceededException:
The commit message is too long. Provide a shorter string.
- InvalidDeletionParameterException:
The specified deletion parameter is not valid.
- 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.
- SameFileContentException:
The file was not added or updated because the content of the file is exactly the same as the content of that file in the repository and branch that you specified.
- FileNameConflictsWithDirectoryNameException:
A file cannot be added to the repository because the specified file name has the same name as a directory in this repository. Either provide another name for the file, or add the file in a directory that does not match the file name.
- DirectoryNameConflictsWithFileNameException:
A file cannot be added to the repository because the specified path name has the same name as a file that already exists in this repository. Either provide a different name for the file, or specify a different path for the file.
- FilePathConflictsWithSubmodulePathException:
The commit cannot be created because a specified file path points to a submodule. Verify that the destination files have valid file paths that do not point to a submodule.
PutRepositoryTriggers
$result = $client->putRepositoryTriggers
([/* ... */]); $promise = $client->putRepositoryTriggersAsync
([/* ... */]);
Replaces all triggers for a repository. Used to create or delete triggers.
Parameter Syntax
$result = $client->putRepositoryTriggers([ 'repositoryName' => '<string>', // REQUIRED 'triggers' => [ // REQUIRED [ 'branches' => ['<string>', ...], 'customData' => '<string>', 'destinationArn' => '<string>', // REQUIRED 'events' => ['<string>', ...], // REQUIRED 'name' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository where you want to create or update the trigger.
- triggers
-
- Required: Yes
- Type: Array of RepositoryTrigger structures
The JSON block of configuration information for each trigger.
Result Syntax
[ 'configurationId' => '<string>', ]
Result Details
Members
- configurationId
-
- Type: string
The system-generated unique ID for the create or update operation.
Errors
- RepositoryDoesNotExistException:
The specified repository does not exist.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryTriggersListRequiredException:
The list of triggers for the repository is required, but was not specified.
- MaximumRepositoryTriggersExceededException:
The number of triggers allowed for the repository was exceeded.
- InvalidRepositoryTriggerNameException:
The name of the trigger is not valid.
- InvalidRepositoryTriggerDestinationArnException:
The Amazon Resource Name (ARN) for the trigger is not valid for the specified destination. The most common reason for this error is that the ARN does not meet the requirements for the service type.
- InvalidRepositoryTriggerRegionException:
The Amazon Web Services Region for the trigger target does not match the Amazon Web Services Region for the repository. Triggers must be created in the same Amazon Web Services Region as the target for the trigger.
- InvalidRepositoryTriggerCustomDataException:
The custom data provided for the trigger is not valid.
- MaximumBranchesExceededException:
The number of branches for the trigger was exceeded.
- InvalidRepositoryTriggerBranchNameException:
One or more branch names specified for the trigger is not valid.
- InvalidRepositoryTriggerEventsException:
One or more events specified for the trigger is not valid. Check to make sure that all events specified match the requirements for allowed events.
- RepositoryTriggerNameRequiredException:
A name for the trigger is required, but was not specified.
- RepositoryTriggerDestinationArnRequiredException:
A destination ARN for the target service for the trigger is required, but was not specified.
- RepositoryTriggerBranchNameListRequiredException:
At least one branch name is required, but was not specified in the trigger configuration.
- RepositoryTriggerEventsListRequiredException:
At least one event for the trigger is required, but was not specified.
- 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.
TagResource
$result = $client->tagResource
([/* ... */]); $promise = $client->tagResourceAsync
([/* ... */]);
Adds or updates tags for a resource in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
Parameter Syntax
$result = $client->tagResource([ 'resourceArn' => '<string>', // REQUIRED 'tags' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource to which you want to add or update tags.
- tags
-
- Required: Yes
- Type: Associative array of custom strings keys (TagKey) to strings
The key-value pair to use when tagging this repository.
Result Syntax
[]
Result Details
Errors
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- ResourceArnRequiredException:
A valid Amazon Resource Name (ARN) for an CodeCommit resource is required. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
- InvalidResourceArnException:
The value for the resource ARN is not valid. For more information about resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
- TagsMapRequiredException:
A map of tags is required.
- InvalidTagsMapException:
The map of tags is not valid.
- TooManyTagsException:
The maximum number of tags for an CodeCommit resource has been exceeded.
- InvalidSystemTagUsageException:
The specified tag is not valid. Key names cannot be prefixed with aws:.
- TagPolicyException:
The tag policy is not valid.
TestRepositoryTriggers
$result = $client->testRepositoryTriggers
([/* ... */]); $promise = $client->testRepositoryTriggersAsync
([/* ... */]);
Tests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test sends data from the last commit. If no data is available, sample data is generated.
Parameter Syntax
$result = $client->testRepositoryTriggers([ 'repositoryName' => '<string>', // REQUIRED 'triggers' => [ // REQUIRED [ 'branches' => ['<string>', ...], 'customData' => '<string>', 'destinationArn' => '<string>', // REQUIRED 'events' => ['<string>', ...], // REQUIRED 'name' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository in which to test the triggers.
- triggers
-
- Required: Yes
- Type: Array of RepositoryTrigger structures
The list of triggers to test.
Result Syntax
[ 'failedExecutions' => [ [ 'failureMessage' => '<string>', 'trigger' => '<string>', ], // ... ], 'successfulExecutions' => ['<string>', ...], ]
Result Details
Members
- failedExecutions
-
- Type: Array of RepositoryTriggerExecutionFailure structures
The list of triggers that were not tested. This list provides the names of the triggers that could not be tested, separated by commas.
- successfulExecutions
-
- Type: Array of strings
The list of triggers that were successfully tested. This list provides the names of the triggers that were successfully tested, separated by commas.
Errors
- RepositoryDoesNotExistException:
The specified repository does not exist.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
- RepositoryTriggersListRequiredException:
The list of triggers for the repository is required, but was not specified.
- MaximumRepositoryTriggersExceededException:
The number of triggers allowed for the repository was exceeded.
- InvalidRepositoryTriggerNameException:
The name of the trigger is not valid.
- InvalidRepositoryTriggerDestinationArnException:
The Amazon Resource Name (ARN) for the trigger is not valid for the specified destination. The most common reason for this error is that the ARN does not meet the requirements for the service type.
- InvalidRepositoryTriggerRegionException:
The Amazon Web Services Region for the trigger target does not match the Amazon Web Services Region for the repository. Triggers must be created in the same Amazon Web Services Region as the target for the trigger.
- InvalidRepositoryTriggerCustomDataException:
The custom data provided for the trigger is not valid.
- MaximumBranchesExceededException:
The number of branches for the trigger was exceeded.
- InvalidRepositoryTriggerBranchNameException:
One or more branch names specified for the trigger is not valid.
- InvalidRepositoryTriggerEventsException:
One or more events specified for the trigger is not valid. Check to make sure that all events specified match the requirements for allowed events.
- RepositoryTriggerNameRequiredException:
A name for the trigger is required, but was not specified.
- RepositoryTriggerDestinationArnRequiredException:
A destination ARN for the target service for the trigger is required, but was not specified.
- RepositoryTriggerBranchNameListRequiredException:
At least one branch name is required, but was not specified in the trigger configuration.
- RepositoryTriggerEventsListRequiredException:
At least one event for the trigger is required, but was not specified.
- 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.
UntagResource
$result = $client->untagResource
([/* ... */]); $promise = $client->untagResourceAsync
([/* ... */]);
Removes tags for a resource in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
Parameter Syntax
$result = $client->untagResource([ 'resourceArn' => '<string>', // REQUIRED 'tagKeys' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource to which you want to remove tags.
- tagKeys
-
- Required: Yes
- Type: Array of strings
The tag key for each tag that you want to remove from the resource.
Result Syntax
[]
Result Details
Errors
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- ResourceArnRequiredException:
A valid Amazon Resource Name (ARN) for an CodeCommit resource is required. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
- InvalidResourceArnException:
The value for the resource ARN is not valid. For more information about resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
- TagKeysListRequiredException:
A list of tag keys is required. The list cannot be empty or null.
- InvalidTagKeysListException:
The list of tags is not valid.
- TooManyTagsException:
The maximum number of tags for an CodeCommit resource has been exceeded.
- InvalidSystemTagUsageException:
The specified tag is not valid. Key names cannot be prefixed with aws:.
- TagPolicyException:
The tag policy is not valid.
UpdateApprovalRuleTemplateContent
$result = $client->updateApprovalRuleTemplateContent
([/* ... */]); $promise = $client->updateApprovalRuleTemplateContentAsync
([/* ... */]);
Updates the content of an approval rule template. You can change the number of required approvals, the membership of the approval rule, and whether an approval pool is defined.
Parameter Syntax
$result = $client->updateApprovalRuleTemplateContent([ 'approvalRuleTemplateName' => '<string>', // REQUIRED 'existingRuleContentSha256' => '<string>', 'newRuleContent' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the approval rule template where you want to update the content of the rule.
- existingRuleContentSha256
-
- Type: string
The SHA-256 hash signature for the content of the approval rule. You can retrieve this information by using GetPullRequest.
- newRuleContent
-
- Required: Yes
- Type: string
The content that replaces the existing content of the rule. Content statements must be complete. You cannot provide only the changes.
Result Syntax
[ 'approvalRuleTemplate' => [ 'approvalRuleTemplateContent' => '<string>', 'approvalRuleTemplateDescription' => '<string>', 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'ruleContentSha256' => '<string>', ], ]
Result Details
Members
- approvalRuleTemplate
-
- Required: Yes
- Type: ApprovalRuleTemplate structure
Returns information about an approval rule template.
Errors
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
- InvalidApprovalRuleTemplateContentException:
The content of the approval rule template is not valid.
- InvalidRuleContentSha256Exception:
The SHA-256 hash signature for the rule content is not valid.
- ApprovalRuleTemplateContentRequiredException:
The content for the approval rule template is empty. You must provide some content for an approval rule template. The content cannot be null.
UpdateApprovalRuleTemplateDescription
$result = $client->updateApprovalRuleTemplateDescription
([/* ... */]); $promise = $client->updateApprovalRuleTemplateDescriptionAsync
([/* ... */]);
Updates the description for a specified approval rule template.
Parameter Syntax
$result = $client->updateApprovalRuleTemplateDescription([ 'approvalRuleTemplateDescription' => '<string>', // REQUIRED 'approvalRuleTemplateName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleTemplateDescription
-
- Required: Yes
- Type: string
The updated description of the approval rule template.
- approvalRuleTemplateName
-
- Required: Yes
- Type: string
The name of the template for which you want to update the description.
Result Syntax
[ 'approvalRuleTemplate' => [ 'approvalRuleTemplateContent' => '<string>', 'approvalRuleTemplateDescription' => '<string>', 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'ruleContentSha256' => '<string>', ], ]
Result Details
Members
- approvalRuleTemplate
-
- Required: Yes
- Type: ApprovalRuleTemplate structure
The structure and content of the updated approval rule template.
Errors
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
- InvalidApprovalRuleTemplateDescriptionException:
The description for the approval rule template is not valid because it exceeds the maximum characters allowed for a description. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
UpdateApprovalRuleTemplateName
$result = $client->updateApprovalRuleTemplateName
([/* ... */]); $promise = $client->updateApprovalRuleTemplateNameAsync
([/* ... */]);
Updates the name of a specified approval rule template.
Parameter Syntax
$result = $client->updateApprovalRuleTemplateName([ 'newApprovalRuleTemplateName' => '<string>', // REQUIRED 'oldApprovalRuleTemplateName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- newApprovalRuleTemplateName
-
- Required: Yes
- Type: string
The new name you want to apply to the approval rule template.
- oldApprovalRuleTemplateName
-
- Required: Yes
- Type: string
The current name of the approval rule template.
Result Syntax
[ 'approvalRuleTemplate' => [ 'approvalRuleTemplateContent' => '<string>', 'approvalRuleTemplateDescription' => '<string>', 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'ruleContentSha256' => '<string>', ], ]
Result Details
Members
- approvalRuleTemplate
-
- Required: Yes
- Type: ApprovalRuleTemplate structure
The structure and content of the updated approval rule template.
Errors
- InvalidApprovalRuleTemplateNameException:
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
- ApprovalRuleTemplateNameRequiredException:
An approval rule template name is required, but was not specified.
- ApprovalRuleTemplateDoesNotExistException:
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
- ApprovalRuleTemplateNameAlreadyExistsException:
You cannot create an approval rule template with that name because a template with that name already exists in this Amazon Web Services Region for your Amazon Web Services account. Approval rule template names must be unique.
UpdateComment
$result = $client->updateComment
([/* ... */]); $promise = $client->updateCommentAsync
([/* ... */]);
Replaces the contents of a comment.
Parameter Syntax
$result = $client->updateComment([ 'commentId' => '<string>', // REQUIRED 'content' => '<string>', // REQUIRED ]);
Parameter Details
Members
- commentId
-
- Required: Yes
- Type: string
The system-generated ID of the comment you want to update. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
- content
-
- Required: Yes
- Type: string
The updated content to replace the existing content of the comment.
Result Syntax
[ 'comment' => [ 'authorArn' => '<string>', 'callerReactions' => ['<string>', ...], 'clientRequestToken' => '<string>', 'commentId' => '<string>', 'content' => '<string>', 'creationDate' => <DateTime>, 'deleted' => true || false, 'inReplyTo' => '<string>', 'lastModifiedDate' => <DateTime>, 'reactionCounts' => [<integer>, ...], ], ]
Result Details
Members
- comment
-
- Type: Comment structure
Information about the updated comment.
Errors
- CommentContentRequiredException:
The comment is empty. You must provide some content for a comment. The content cannot be null.
- CommentContentSizeLimitExceededException:
The comment is too large. Comments are limited to 10,240 characters.
- CommentDoesNotExistException:
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
- CommentIdRequiredException:
The comment ID is missing or null. A comment ID is required.
- InvalidCommentIdException:
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
- CommentNotCreatedByCallerException:
You cannot modify or delete this comment. Only comment authors can modify or delete their comments.
- CommentDeletedException:
This comment has already been deleted. You cannot edit or delete a deleted comment.
UpdateDefaultBranch
$result = $client->updateDefaultBranch
([/* ... */]); $promise = $client->updateDefaultBranchAsync
([/* ... */]);
Sets or changes the default branch name for the specified repository.
If you use this operation to change the default branch name to the current default branch name, a success message is returned even though the default branch did not change.
Parameter Syntax
$result = $client->updateDefaultBranch([ 'defaultBranchName' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- defaultBranchName
-
- Required: Yes
- Type: string
The name of the branch to set as the default branch.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository for which you want to set or change the default branch.
Result Syntax
[]
Result Details
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- BranchNameRequiredException:
A branch name is required, but was not specified.
- InvalidBranchNameException:
The specified reference name is not valid.
- BranchDoesNotExistException:
The specified branch does not exist.
- 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.
UpdatePullRequestApprovalRuleContent
$result = $client->updatePullRequestApprovalRuleContent
([/* ... */]); $promise = $client->updatePullRequestApprovalRuleContentAsync
([/* ... */]);
Updates the structure of an approval rule created specifically for a pull request. For example, you can change the number of required approvers and the approval pool for approvers.
Parameter Syntax
$result = $client->updatePullRequestApprovalRuleContent([ 'approvalRuleName' => '<string>', // REQUIRED 'existingRuleContentSha256' => '<string>', 'newRuleContent' => '<string>', // REQUIRED 'pullRequestId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalRuleName
-
- Required: Yes
- Type: string
The name of the approval rule you want to update.
- existingRuleContentSha256
-
- Type: string
The SHA-256 hash signature for the content of the approval rule. You can retrieve this information by using GetPullRequest.
- newRuleContent
-
- Required: Yes
- Type: string
The updated content for the approval rule.
When you update the content of the approval rule, you can specify approvers in an approval pool in one of two ways:
-
CodeCommitApprovers: This option only requires an Amazon Web Services account and a resource. It can be used for both IAM users and federated access users whose name matches the provided resource name. This is a very powerful option that offers a great deal of flexibility. For example, if you specify the Amazon Web Services account 123456789012 and Mary_Major, all of the following are counted as approvals coming from that user:
-
An IAM user in the account (arn:aws:iam::123456789012:user/Mary_Major)
-
A federated user identified in IAM as Mary_Major (arn:aws:sts::123456789012:federated-user/Mary_Major)
This option does not recognize an active session of someone assuming the role of CodeCommitReview with a role session name of Mary_Major (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) unless you include a wildcard (*Mary_Major).
-
-
Fully qualified ARN: This option allows you to specify the fully qualified Amazon Resource Name (ARN) of the IAM user or role.
For more information about IAM ARNs, wildcards, and formats, see IAM Identifiers in the IAM User Guide.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request.
Result Syntax
[ 'approvalRule' => [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], ]
Result Details
Members
- approvalRule
-
- Required: Yes
- Type: ApprovalRule structure
Information about the updated approval rule.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
- ApprovalRuleNameRequiredException:
An approval rule name is required, but was not specified.
- InvalidApprovalRuleNameException:
The name for the approval rule is not valid.
- ApprovalRuleDoesNotExistException:
The specified approval rule does not exist.
- InvalidRuleContentSha256Exception:
The SHA-256 hash signature for the rule content is not valid.
- ApprovalRuleContentRequiredException:
The content for the approval rule is empty. You must provide some content for an approval rule. The content cannot be null.
- InvalidApprovalRuleContentException:
The content for the approval rule is not valid.
- CannotModifyApprovalRuleFromTemplateException:
The approval rule cannot be modified for the pull request because it was created by an approval rule template and applied to the pull request automatically.
- 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.
UpdatePullRequestApprovalState
$result = $client->updatePullRequestApprovalState
([/* ... */]); $promise = $client->updatePullRequestApprovalStateAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->updatePullRequestApprovalState([ 'approvalState' => 'APPROVE|REVOKE', // REQUIRED 'pullRequestId' => '<string>', // REQUIRED 'revisionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- approvalState
-
- Required: Yes
- Type: string
The approval state to associate with the user on the pull request.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request.
- revisionId
-
- Required: Yes
- Type: string
The system-generated ID of the revision.
Result Syntax
[]
Result Details
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- InvalidRevisionIdException:
The revision ID is not valid. Use GetPullRequest to determine the value.
- RevisionIdRequiredException:
A revision ID is required, but was not provided.
- InvalidApprovalStateException:
The state for the approval is not valid. Valid values include APPROVE and REVOKE.
- ApprovalStateRequiredException:
An approval state is required, but was not specified.
- PullRequestCannotBeApprovedByAuthorException:
The approval cannot be applied because the user approving the pull request matches the user who created the pull request. You cannot approve a pull request that you created.
- RevisionNotCurrentException:
The revision ID provided in the request does not match the current revision ID. Use GetPullRequest to retrieve the current revision ID.
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
- MaximumNumberOfApprovalsExceededException:
The number of approvals required for the approval rule exceeds the maximum number allowed.
- 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.
UpdatePullRequestDescription
$result = $client->updatePullRequestDescription
([/* ... */]); $promise = $client->updatePullRequestDescriptionAsync
([/* ... */]);
Replaces the contents of the description of a pull request.
Parameter Syntax
$result = $client->updatePullRequestDescription([ 'description' => '<string>', // REQUIRED 'pullRequestId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- description
-
- Required: Yes
- Type: string
The updated content of the description for the pull request. This content replaces the existing description.
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
Result Syntax
[ 'pullRequest' => [ 'approvalRules' => [ [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], // ... ], 'authorArn' => '<string>', 'clientRequestToken' => '<string>', 'creationDate' => <DateTime>, 'description' => '<string>', 'lastActivityDate' => <DateTime>, 'pullRequestId' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'pullRequestTargets' => [ [ 'destinationCommit' => '<string>', 'destinationReference' => '<string>', 'mergeBase' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', 'sourceCommit' => '<string>', 'sourceReference' => '<string>', ], // ... ], 'revisionId' => '<string>', 'title' => '<string>', ], ]
Result Details
Members
- pullRequest
-
- Required: Yes
- Type: PullRequest structure
Information about the updated pull request.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- InvalidDescriptionException:
The pull request description is not valid. Descriptions cannot be more than 1,000 characters.
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
UpdatePullRequestStatus
$result = $client->updatePullRequestStatus
([/* ... */]); $promise = $client->updatePullRequestStatusAsync
([/* ... */]);
Updates the status of a pull request.
Parameter Syntax
$result = $client->updatePullRequestStatus([ 'pullRequestId' => '<string>', // REQUIRED 'pullRequestStatus' => 'OPEN|CLOSED', // REQUIRED ]);
Parameter Details
Members
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
- pullRequestStatus
-
- Required: Yes
- Type: string
The status of the pull request. The only valid operations are to update the status from
OPEN
toOPEN
,OPEN
toCLOSED
or fromCLOSED
toCLOSED
.
Result Syntax
[ 'pullRequest' => [ 'approvalRules' => [ [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], // ... ], 'authorArn' => '<string>', 'clientRequestToken' => '<string>', 'creationDate' => <DateTime>, 'description' => '<string>', 'lastActivityDate' => <DateTime>, 'pullRequestId' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'pullRequestTargets' => [ [ 'destinationCommit' => '<string>', 'destinationReference' => '<string>', 'mergeBase' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', 'sourceCommit' => '<string>', 'sourceReference' => '<string>', ], // ... ], 'revisionId' => '<string>', 'title' => '<string>', ], ]
Result Details
Members
- pullRequest
-
- Required: Yes
- Type: PullRequest structure
Information about the pull request.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- InvalidPullRequestStatusUpdateException:
The pull request status update is not valid. The only valid update is from
OPEN
toCLOSED
.- InvalidPullRequestStatusException:
The pull request status is not valid. The only valid values are
OPEN
andCLOSED
.- PullRequestStatusRequiredException:
A pull request status is required, but none was provided.
- 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.
UpdatePullRequestTitle
$result = $client->updatePullRequestTitle
([/* ... */]); $promise = $client->updatePullRequestTitleAsync
([/* ... */]);
Replaces the title of a pull request.
Parameter Syntax
$result = $client->updatePullRequestTitle([ 'pullRequestId' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED ]);
Parameter Details
Members
- pullRequestId
-
- Required: Yes
- Type: string
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
- title
-
- Required: Yes
- Type: string
The updated title of the pull request. This replaces the existing title.
Result Syntax
[ 'pullRequest' => [ 'approvalRules' => [ [ 'approvalRuleContent' => '<string>', 'approvalRuleId' => '<string>', 'approvalRuleName' => '<string>', 'creationDate' => <DateTime>, 'lastModifiedDate' => <DateTime>, 'lastModifiedUser' => '<string>', 'originApprovalRuleTemplate' => [ 'approvalRuleTemplateId' => '<string>', 'approvalRuleTemplateName' => '<string>', ], 'ruleContentSha256' => '<string>', ], // ... ], 'authorArn' => '<string>', 'clientRequestToken' => '<string>', 'creationDate' => <DateTime>, 'description' => '<string>', 'lastActivityDate' => <DateTime>, 'pullRequestId' => '<string>', 'pullRequestStatus' => 'OPEN|CLOSED', 'pullRequestTargets' => [ [ 'destinationCommit' => '<string>', 'destinationReference' => '<string>', 'mergeBase' => '<string>', 'mergeMetadata' => [ 'isMerged' => true || false, 'mergeCommitId' => '<string>', 'mergeOption' => 'FAST_FORWARD_MERGE|SQUASH_MERGE|THREE_WAY_MERGE', 'mergedBy' => '<string>', ], 'repositoryName' => '<string>', 'sourceCommit' => '<string>', 'sourceReference' => '<string>', ], // ... ], 'revisionId' => '<string>', 'title' => '<string>', ], ]
Result Details
Members
- pullRequest
-
- Required: Yes
- Type: PullRequest structure
Information about the updated pull request.
Errors
- PullRequestDoesNotExistException:
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.
- InvalidPullRequestIdException:
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.
- PullRequestIdRequiredException:
A pull request ID is required, but none was provided.
- TitleRequiredException:
A pull request title is required. It cannot be empty or null.
- InvalidTitleException:
The title of the pull request is not valid. Pull request titles cannot exceed 100 characters in length.
- PullRequestAlreadyClosedException:
The pull request status cannot be updated because it is already closed.
UpdateRepositoryDescription
$result = $client->updateRepositoryDescription
([/* ... */]); $promise = $client->updateRepositoryDescriptionAsync
([/* ... */]);
Sets or changes the comment or description for a repository.
The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
Parameter Syntax
$result = $client->updateRepositoryDescription([ 'repositoryDescription' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- repositoryDescription
-
- Type: string
The new comment or description for the specified repository. Repository descriptions are limited to 1,000 characters.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to set or change the comment or description for.
Result Syntax
[]
Result Details
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- InvalidRepositoryDescriptionException:
The specified repository description is not valid.
- 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.
UpdateRepositoryEncryptionKey
$result = $client->updateRepositoryEncryptionKey
([/* ... */]); $promise = $client->updateRepositoryEncryptionKeyAsync
([/* ... */]);
Updates the Key Management Service encryption key used to encrypt and decrypt a CodeCommit repository.
Parameter Syntax
$result = $client->updateRepositoryEncryptionKey([ 'kmsKeyId' => '<string>', // REQUIRED 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- kmsKeyId
-
- Required: Yes
- Type: string
The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for keyID, see KeyId in the Decrypt API description in the Key Management Service API Reference.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository for which you want to update the KMS encryption key used to encrypt and decrypt the repository.
Result Syntax
[ 'kmsKeyId' => '<string>', 'originalKmsKeyId' => '<string>', 'repositoryId' => '<string>', ]
Result Details
Members
- kmsKeyId
-
- Type: string
The ID of the encryption key.
- originalKmsKeyId
-
- Type: string
The ID of the encryption key formerly used to encrypt and decrypt the repository.
- repositoryId
-
- Type: string
The ID of the repository.
Errors
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- RepositoryDoesNotExistException:
The specified repository does not exist.
- 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.
- EncryptionKeyRequiredException:
A KMS encryption key ID is required but was not specified.
- EncryptionIntegrityChecksFailedException:
An encryption integrity check failed.
- EncryptionKeyAccessDeniedException:
An encryption key could not be accessed.
- EncryptionKeyInvalidIdException:
The Key Management Service encryption key is not valid.
- EncryptionKeyInvalidUsageException:
A KMS encryption key was used to try and encrypt or decrypt a repository, but either the repository or the key was not in a valid state to support the operation.
- EncryptionKeyDisabledException:
The encryption key is disabled.
- EncryptionKeyNotFoundException:
No encryption key was found.
- EncryptionKeyUnavailableException:
The encryption key is not available.
UpdateRepositoryName
$result = $client->updateRepositoryName
([/* ... */]); $promise = $client->updateRepositoryNameAsync
([/* ... */]);
Renames a repository. The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix .git is prohibited. For more information about the limits on repository names, see Quotas in the CodeCommit User Guide.
Parameter Syntax
$result = $client->updateRepositoryName([ 'newName' => '<string>', // REQUIRED 'oldName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- newName
-
- Required: Yes
- Type: string
The new name for the repository.
- oldName
-
- Required: Yes
- Type: string
The current name of the repository.
Result Syntax
[]
Result Details
Errors
- RepositoryDoesNotExistException:
The specified repository does not exist.
- RepositoryNameExistsException:
The specified repository name already exists.
- RepositoryNameRequiredException:
A repository name is required, but was not specified.
- 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.
Shapes
ActorDoesNotExistException
Description
The specified Amazon Resource Name (ARN) does not exist in the Amazon Web Services account.
Members
Approval
Description
Returns information about a specific approval on a pull request.
Members
- approvalState
-
- Type: string
The state of the approval, APPROVE or REVOKE. REVOKE states are not stored.
- userArn
-
- Type: string
The Amazon Resource Name (ARN) of the user.
ApprovalRule
Description
Returns information about an approval rule.
Members
- approvalRuleContent
-
- Type: string
The content of the approval rule.
- approvalRuleId
-
- Type: string
The system-generated ID of the approval rule.
- approvalRuleName
-
- Type: string
The name of the approval rule.
- creationDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date the approval rule was created, in timestamp format.
- lastModifiedDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date the approval rule was most recently changed, in timestamp format.
- lastModifiedUser
-
- Type: string
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
- originApprovalRuleTemplate
-
- Type: OriginApprovalRuleTemplate structure
The approval rule template used to create the rule.
- ruleContentSha256
-
- Type: string
The SHA-256 hash signature for the content of the approval rule.
ApprovalRuleContentRequiredException
Description
The content for the approval rule is empty. You must provide some content for an approval rule. The content cannot be null.
Members
ApprovalRuleDoesNotExistException
Description
The specified approval rule does not exist.
Members
ApprovalRuleEventMetadata
Description
Returns information about an event for an approval rule.
Members
- approvalRuleContent
-
- Type: string
The content of the approval rule.
- approvalRuleId
-
- Type: string
The system-generated ID of the approval rule.
- approvalRuleName
-
- Type: string
The name of the approval rule.
ApprovalRuleNameAlreadyExistsException
Description
An approval rule with that name already exists. Approval rule names must be unique within the scope of a pull request.
Members
ApprovalRuleNameRequiredException
Description
An approval rule name is required, but was not specified.
Members
ApprovalRuleOverriddenEventMetadata
Description
Returns information about an override event for approval rules for a pull request.
Members
- overrideStatus
-
- Type: string
The status of the override event.
- revisionId
-
- Type: string
The revision ID of the pull request when the override event occurred.
ApprovalRuleTemplate
Description
Returns information about an approval rule template.
Members
- approvalRuleTemplateContent
-
- Type: string
The content of the approval rule template.
- approvalRuleTemplateDescription
-
- Type: string
The description of the approval rule template.
- approvalRuleTemplateId
-
- Type: string
The system-generated ID of the approval rule template.
- approvalRuleTemplateName
-
- Type: string
The name of the approval rule template.
- creationDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date the approval rule template was created, in timestamp format.
- lastModifiedDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date the approval rule template was most recently changed, in timestamp format.
- lastModifiedUser
-
- Type: string
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
- ruleContentSha256
-
- Type: string
The SHA-256 hash signature for the content of the approval rule template.
ApprovalRuleTemplateContentRequiredException
Description
The content for the approval rule template is empty. You must provide some content for an approval rule template. The content cannot be null.
Members
ApprovalRuleTemplateDoesNotExistException
Description
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
Members
ApprovalRuleTemplateInUseException
Description
The approval rule template is associated with one or more repositories. You cannot delete a template that is associated with a repository. Remove all associations, and then try again.
Members
ApprovalRuleTemplateNameAlreadyExistsException
Description
You cannot create an approval rule template with that name because a template with that name already exists in this Amazon Web Services Region for your Amazon Web Services account. Approval rule template names must be unique.
Members
ApprovalRuleTemplateNameRequiredException
Description
An approval rule template name is required, but was not specified.
Members
ApprovalStateChangedEventMetadata
Description
Returns information about a change in the approval state for a pull request.
Members
- approvalStatus
-
- Type: string
The approval status for the pull request.
- revisionId
-
- Type: string
The revision ID of the pull request when the approval state changed.
ApprovalStateRequiredException
Description
An approval state is required, but was not specified.
Members
AuthorDoesNotExistException
Description
The specified Amazon Resource Name (ARN) does not exist in the Amazon Web Services account.
Members
BatchAssociateApprovalRuleTemplateWithRepositoriesError
Description
Returns information about errors in a BatchAssociateApprovalRuleTemplateWithRepositories operation.
Members
- errorCode
-
- Type: string
An error code that specifies whether the repository name was not valid or not found.
- errorMessage
-
- Type: string
An error message that provides details about why the repository name was not found or not valid.
- repositoryName
-
- Type: string
The name of the repository where the association was not made.
BatchDescribeMergeConflictsError
Description
Returns information about errors in a BatchDescribeMergeConflicts operation.
Members
- exceptionName
-
- Required: Yes
- Type: string
The name of the exception.
- filePath
-
- Required: Yes
- Type: string
The path to the file.
- message
-
- Required: Yes
- Type: string
The message provided by the exception.
BatchDisassociateApprovalRuleTemplateFromRepositoriesError
Description
Returns information about errors in a BatchDisassociateApprovalRuleTemplateFromRepositories operation.
Members
- errorCode
-
- Type: string
An error code that specifies whether the repository name was not valid or not found.
- errorMessage
-
- Type: string
An error message that provides details about why the repository name was either not found or not valid.
- repositoryName
-
- Type: string
The name of the repository where the association with the template was not able to be removed.
BatchGetCommitsError
Description
Returns information about errors in a BatchGetCommits operation.
Members
- commitId
-
- Type: string
A commit ID that either could not be found or was not in a valid format.
- errorCode
-
- Type: string
An error code that specifies whether the commit ID was not valid or not found.
- errorMessage
-
- Type: string
An error message that provides detail about why the commit ID either was not found or was not valid.
BatchGetRepositoriesError
Description
Returns information about errors in a BatchGetRepositories operation.
Members
- errorCode
-
- Type: string
An error code that specifies the type of failure.
- errorMessage
-
- Type: string
An error message that provides detail about why the repository either was not found or was not in a valid state.
- repositoryId
-
- Type: string
The ID of a repository that either could not be found or was not in a valid state.
- repositoryName
-
- Type: string
The name of a repository that either could not be found or was not in a valid state.
BeforeCommitIdAndAfterCommitIdAreSameException
Description
The before commit ID and the after commit ID are the same, which is not valid. The before commit ID and the after commit ID must be different commit IDs.
Members
BlobIdDoesNotExistException
Description
The specified blob does not exist.
Members
BlobIdRequiredException
Description
A blob ID is required, but was not specified.
Members
BlobMetadata
Description
Returns information about a specific Git blob object.
Members
- blobId
-
- Type: string
The full ID of the blob.
- mode
-
- Type: string
The file mode permissions of the blob. File mode permission codes include:
-
100644
indicates read/write -
100755
indicates read/write/execute -
160000
indicates a submodule -
120000
indicates a symlink
- path
-
- Type: string
The path to the blob and associated file name, if any.
BranchDoesNotExistException
Description
The specified branch does not exist.
Members
BranchInfo
Description
Returns information about a branch.
Members
- branchName
-
- Type: string
The name of the branch.
- commitId
-
- Type: string
The ID of the last commit made to the branch.
BranchNameExistsException
Description
Cannot create the branch with the specified name because the commit conflicts with an existing branch with the same name. Branch names must be unique.
Members
BranchNameIsTagNameException
Description
The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use ListBranches.
Members
BranchNameRequiredException
Description
A branch name is required, but was not specified.
Members
CannotDeleteApprovalRuleFromTemplateException
Description
The approval rule cannot be deleted from the pull request because it was created by an approval rule template and applied to the pull request automatically.
Members
CannotModifyApprovalRuleFromTemplateException
Description
The approval rule cannot be modified for the pull request because it was created by an approval rule template and applied to the pull request automatically.
Members
ClientRequestTokenRequiredException
Description
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.
Members
Comment
Description
Returns information about a specific comment.
Members
- authorArn
-
- Type: string
The Amazon Resource Name (ARN) of the person who posted the comment.
- callerReactions
-
- Type: Array of strings
The emoji reactions to a comment, if any, submitted by the user whose credentials are associated with the call to the API.
- clientRequestToken
-
- Type: string
A 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.
- commentId
-
- Type: string
The system-generated comment ID.
- content
-
- Type: string
The content of the comment.
- creationDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the comment was created, in timestamp format.
- deleted
-
- Type: boolean
A Boolean value indicating whether the comment has been deleted.
- inReplyTo
-
- Type: string
The ID of the comment for which this comment is a reply, if any.
- lastModifiedDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the comment was most recently modified, in timestamp format.
- reactionCounts
-
- Type: Associative array of custom strings keys (ReactionValue) to ints
A string to integer map that represents the number of individual users who have responded to a comment with the specified reactions.
CommentContentRequiredException
Description
The comment is empty. You must provide some content for a comment. The content cannot be null.
Members
CommentContentSizeLimitExceededException
Description
The comment is too large. Comments are limited to 10,240 characters.
Members
CommentDeletedException
Description
This comment has already been deleted. You cannot edit or delete a deleted comment.
Members
CommentDoesNotExistException
Description
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
Members
CommentIdRequiredException
Description
The comment ID is missing or null. A comment ID is required.
Members
CommentNotCreatedByCallerException
Description
You cannot modify or delete this comment. Only comment authors can modify or delete their comments.
Members
CommentsForComparedCommit
Description
Returns information about comments on the comparison between two commits.
Members
- afterBlobId
-
- Type: string
The full blob ID of the commit used to establish the after of the comparison.
- afterCommitId
-
- Type: string
The full commit ID of the commit used to establish the after of the comparison.
- beforeBlobId
-
- Type: string
The full blob ID of the commit used to establish the before of the comparison.
- beforeCommitId
-
- Type: string
The full commit ID of the commit used to establish the before of the comparison.
- comments
-
- Type: Array of Comment structures
An array of comment objects. Each comment object contains information about a comment on the comparison between commits.
- location
-
- Type: Location structure
Location information about the comment on the comparison, including the file name, line number, and whether the version of the file where the comment was made is BEFORE or AFTER.
- repositoryName
-
- Type: string
The name of the repository that contains the compared commits.
CommentsForPullRequest
Description
Returns information about comments on a pull request.
Members
- afterBlobId
-
- Type: string
The full blob ID of the file on which you want to comment on the source commit.
- afterCommitId
-
- Type: string
The full commit ID of the commit that was the tip of the source branch at the time the comment was made.
- beforeBlobId
-
- Type: string
The full blob ID of the file on which you want to comment on the destination commit.
- beforeCommitId
-
- Type: string
The full commit ID of the commit that was the tip of the destination branch when the pull request was created. This commit is superceded by the after commit in the source branch when and if you merge the source branch into the destination branch.
- comments
-
- Type: Array of Comment structures
An array of comment objects. Each comment object contains information about a comment on the pull request.
- location
-
- Type: Location structure
Location information about the comment on the pull request, including the file name, line number, and whether the version of the file where the comment was made is BEFORE (destination branch) or AFTER (source branch).
- pullRequestId
-
- Type: string
The system-generated ID of the pull request.
- repositoryName
-
- Type: string
The name of the repository that contains the pull request.
Commit
Description
Returns information about a specific commit.
Members
- additionalData
-
- Type: string
Any other data associated with the specified commit.
- author
-
- Type: UserInfo structure
Information about the author of the specified commit. Information includes the date in timestamp format with GMT offset, the name of the author, and the email address for the author, as configured in Git.
- commitId
-
- Type: string
The full SHA ID of the specified commit.
- committer
-
- Type: UserInfo structure
Information about the person who committed the specified commit, also known as the committer. Information includes the date in timestamp format with GMT offset, the name of the committer, and the email address for the committer, as configured in Git.
For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
- message
-
- Type: string
The commit message associated with the specified commit.
- parents
-
- Type: Array of strings
A list of parent commits for the specified commit. Each parent commit ID is the full commit ID.
- treeId
-
- Type: string
Tree information for the specified commit.
CommitDoesNotExistException
Description
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
Members
CommitIdDoesNotExistException
Description
The specified commit ID does not exist.
Members
CommitIdRequiredException
Description
A commit ID was not specified.
Members
CommitIdsLimitExceededException
Description
The maximum number of allowed commit IDs in a batch request is 100. Verify that your batch requests contains no more than 100 commit IDs, and then try again.
Members
CommitIdsListRequiredException
Description
A list of commit IDs is required, but was either not specified or the list was empty.
Members
CommitMessageLengthExceededException
Description
The commit message is too long. Provide a shorter string.
Members
CommitRequiredException
Description
A commit was not specified.
Members
ConcurrentReferenceUpdateException
Description
The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
Members
Conflict
Description
Information about conflicts in a merge operation.
Members
- conflictMetadata
-
- Type: ConflictMetadata structure
Metadata about a conflict in a merge operation.
- mergeHunks
-
- Type: Array of MergeHunk structures
A list of hunks that contain the differences between files or lines causing the conflict.
ConflictMetadata
Description
Information about the metadata for a conflict in a merge operation.
Members
- contentConflict
-
- Type: boolean
A boolean value indicating whether there are conflicts in the content of a file.
- fileModeConflict
-
- Type: boolean
A boolean value indicating whether there are conflicts in the file mode of a file.
- fileModes
-
- Type: FileModes structure
The file modes of the file in the source, destination, and base of the merge.
- filePath
-
- Type: string
The path of the file that contains conflicts.
- fileSizes
-
- Type: FileSizes structure
The file sizes of the file in the source, destination, and base of the merge.
- isBinaryFile
-
- Type: IsBinaryFile structure
A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and base of the merge.
- mergeOperations
-
- Type: MergeOperations structure
Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.
- numberOfConflicts
-
- Type: int
The number of conflicts, including both hunk conflicts and metadata conflicts.
- objectTypeConflict
-
- Type: boolean
A boolean value (true or false) indicating whether there are conflicts between the branches in the object type of a file, folder, or submodule.
- objectTypes
-
- Type: ObjectTypes structure
Information about any object type conflicts in a merge operation.
ConflictResolution
Description
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
Members
- deleteFiles
-
- Type: Array of DeleteFileEntry structures
Files to be deleted as part of the merge conflict resolution.
- replaceContents
-
- Type: Array of ReplaceContentEntry structures
Files to have content replaced as part of the merge conflict resolution.
- setFileModes
-
- Type: Array of SetFileModeEntry structures
File modes that are set as part of the merge conflict resolution.
DefaultBranchCannotBeDeletedException
Description
The specified branch is the default branch for the repository, and cannot be deleted. To delete this branch, you must first set another branch as the default branch.
Members
DeleteFileEntry
Description
A file that is deleted as part of a commit.
Members
- filePath
-
- Required: Yes
- Type: string
The full path of the file to be deleted, including the name of the file.
Difference
Description
Returns information about a set of differences for a commit specifier.
Members
- afterBlob
-
- Type: BlobMetadata structure
Information about an
afterBlob
data type object, including the ID, the file mode permission code, and the path. - beforeBlob
-
- Type: BlobMetadata structure
Information about a
beforeBlob
data type object, including the ID, the file mode permission code, and the path. - changeType
-
- Type: string
Whether the change type of the difference is an addition (A), deletion (D), or modification (M).
DirectoryNameConflictsWithFileNameException
Description
A file cannot be added to the repository because the specified path name has the same name as a file that already exists in this repository. Either provide a different name for the file, or specify a different path for the file.
Members
EncryptionIntegrityChecksFailedException
Description
An encryption integrity check failed.
Members
EncryptionKeyAccessDeniedException
Description
An encryption key could not be accessed.
Members
EncryptionKeyDisabledException
Description
The encryption key is disabled.
Members
EncryptionKeyInvalidIdException
Description
The Key Management Service encryption key is not valid.
Members
EncryptionKeyInvalidUsageException
Description
A KMS encryption key was used to try and encrypt or decrypt a repository, but either the repository or the key was not in a valid state to support the operation.
Members
EncryptionKeyNotFoundException
Description
No encryption key was found.
Members
EncryptionKeyRequiredException
Description
A KMS encryption key ID is required but was not specified.
Members
EncryptionKeyUnavailableException
Description
The encryption key is not available.
Members
Evaluation
Description
Returns information about the approval rules applied to a pull request and whether conditions have been met.
Members
- approvalRulesNotSatisfied
-
- Type: Array of strings
The names of the approval rules that have not had their conditions met.
- approvalRulesSatisfied
-
- Type: Array of strings
The names of the approval rules that have had their conditions met.
- approved
-
- Type: boolean
Whether the state of the pull request is approved.
- overridden
-
- Type: boolean
Whether the approval rule requirements for the pull request have been overridden and no longer need to be met.
File
Description
Returns information about a file in a repository.
Members
- absolutePath
-
- Type: string
The fully qualified path to the file in the repository.
- blobId
-
- Type: string
The blob ID that contains the file information.
- fileMode
-
- Type: string
The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
- relativePath
-
- Type: string
The relative path of the file from the folder where the query originated.
FileContentAndSourceFileSpecifiedException
Description
The commit cannot be created because both a source file and file content have been specified for the same file. You cannot provide both. Either specify a source file or provide the file content directly.
Members
FileContentRequiredException
Description
The file cannot be added because it is empty. Empty files cannot be added to the repository with this API.
Members
FileContentSizeLimitExceededException
Description
The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
Members
FileDoesNotExistException
Description
The specified file does not exist. Verify that you have used the correct file name, full path, and extension.
Members
FileEntryRequiredException
Description
The commit cannot be created because no files have been specified as added, updated, or changed (PutFile or DeleteFile) for the commit.
Members
FileMetadata
Description
A file to be added, updated, or deleted as part of a commit.
Members
- absolutePath
-
- Type: string
The full path to the file to be added or updated, including the name of the file.
- blobId
-
- Type: string
The blob ID that contains the file information.
- fileMode
-
- Type: string
The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
FileModeRequiredException
Description
The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.
Members
FileModes
Description
Information about file modes in a merge or pull request.
Members
- base
-
- Type: string
The file mode of a file in the base of a merge or pull request.
- destination
-
- Type: string
The file mode of a file in the destination of a merge or pull request.
- source
-
- Type: string
The file mode of a file in the source of a merge or pull request.
FileNameConflictsWithDirectoryNameException
Description
A file cannot be added to the repository because the specified file name has the same name as a directory in this repository. Either provide another name for the file, or add the file in a directory that does not match the file name.
Members
FilePathConflictsWithSubmodulePathException
Description
The commit cannot be created because a specified file path points to a submodule. Verify that the destination files have valid file paths that do not point to a submodule.
Members
FileSizes
Description
Information about the size of files in a merge or pull request.
Members
- base
-
- Type: long (int|float)
The size of a file in the base of a merge or pull request.
- destination
-
- Type: long (int|float)
The size of a file in the destination of a merge or pull request.
- source
-
- Type: long (int|float)
The size of a file in the source of a merge or pull request.
FileTooLargeException
Description
The specified file exceeds the file size limit for CodeCommit. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
Members
FileVersion
Description
Information about a version of a file.
Members
- blobId
-
- Type: string
The blob ID of the object that represents the content of the file in this version.
- commit
-
- Type: Commit structure
Returns information about a specific commit.
- path
-
- Type: string
The name and path of the file at which this blob is indexed which contains the data for this version of the file. This value will vary between file versions if a file is renamed or if its path changes.
- revisionChildren
-
- Type: Array of strings
An array of commit IDs that contain more recent versions of this file. If there are no additional versions of the file, this array will be empty.
Folder
Description
Returns information about a folder in a repository.
Members
- absolutePath
-
- Type: string
The fully qualified path of the folder in the repository.
- relativePath
-
- Type: string
The relative path of the specified folder from the folder where the query originated.
- treeId
-
- Type: string
The full SHA-1 pointer of the tree information for the commit that contains the folder.
FolderContentSizeLimitExceededException
Description
The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
Members
FolderDoesNotExistException
Description
The specified folder does not exist. Either the folder name is not correct, or you did not enter the full path to the folder.
Members
IdempotencyParameterMismatchException
Description
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.
Members
InvalidActorArnException
Description
The Amazon Resource Name (ARN) is not valid. Make sure that you have provided the full ARN for the user who initiated the change for the pull request, and then try again.
Members
InvalidApprovalRuleContentException
Description
The content for the approval rule is not valid.
Members
InvalidApprovalRuleNameException
Description
The name for the approval rule is not valid.
Members
InvalidApprovalRuleTemplateContentException
Description
The content of the approval rule template is not valid.
Members
InvalidApprovalRuleTemplateDescriptionException
Description
The description for the approval rule template is not valid because it exceeds the maximum characters allowed for a description. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
Members
InvalidApprovalRuleTemplateNameException
Description
The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
Members
InvalidApprovalStateException
Description
The state for the approval is not valid. Valid values include APPROVE and REVOKE.
Members
InvalidAuthorArnException
Description
The Amazon Resource Name (ARN) is not valid. Make sure that you have provided the full ARN for the author of the pull request, and then try again.
Members
InvalidBlobIdException
Description
The specified blob is not valid.
Members
InvalidBranchNameException
Description
The specified reference name is not valid.
Members
InvalidClientRequestTokenException
Description
The client request token is not valid.
Members
InvalidCommentIdException
Description
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
Members
InvalidCommitException
Description
The specified commit is not valid.
Members
InvalidCommitIdException
Description
The specified commit ID is not valid.
Members
InvalidConflictDetailLevelException
Description
The specified conflict detail level is not valid.
Members
InvalidConflictResolutionException
Description
The specified conflict resolution list is not valid.
Members
InvalidConflictResolutionStrategyException
Description
The specified conflict resolution strategy is not valid.
Members
InvalidContinuationTokenException
Description
The specified continuation token is not valid.
Members
InvalidDeletionParameterException
Description
The specified deletion parameter is not valid.
Members
InvalidDescriptionException
Description
The pull request description is not valid. Descriptions cannot be more than 1,000 characters.
Members
InvalidDestinationCommitSpecifierException
Description
The destination commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
Members
InvalidEmailException
Description
The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
Members
InvalidFileLocationException
Description
The location of the file is not valid. Make sure that you include the file name and extension.
Members
InvalidFileModeException
Description
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
Members
InvalidFilePositionException
Description
The position is not valid. Make sure that the line number exists in the version of the file you want to comment on.
Members
InvalidMaxConflictFilesException
Description
The specified value for the number of conflict files to return is not valid.
Members
InvalidMaxMergeHunksException
Description
The specified value for the number of merge hunks to return is not valid.
Members
InvalidMaxResultsException
Description
The specified number of maximum results is not valid.
Members
InvalidMergeOptionException
Description
The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations.
Members
InvalidOrderException
Description
The specified sort order is not valid.
Members
InvalidOverrideStatusException
Description
The override status is not valid. Valid statuses are OVERRIDE and REVOKE.
Members
InvalidParentCommitIdException
Description
The parent commit ID is not valid. The commit ID cannot be empty, and must match the head commit ID for the branch of the repository where you want to add or update a file.
Members
InvalidPathException
Description
The specified path is not valid.
Members
InvalidPullRequestEventTypeException
Description
The pull request event type is not valid.
Members
InvalidPullRequestIdException
Description
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.
Members
InvalidPullRequestStatusException
Description
The pull request status is not valid. The only valid values are OPEN
and CLOSED
.
Members
InvalidPullRequestStatusUpdateException
Description
The pull request status update is not valid. The only valid update is from OPEN
to CLOSED
.
Members
InvalidReactionUserArnException
Description
The Amazon Resource Name (ARN) of the user or identity is not valid.
Members
InvalidReactionValueException
Description
The value of the reaction is not valid. For more information, see the CodeCommit User Guide.
Members
InvalidReferenceNameException
Description
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.
Members
InvalidRelativeFileVersionEnumException
Description
Either the enum is not in a valid format, or the specified file version enum is not valid in respect to the current file version.
Members
InvalidReplacementContentException
Description
Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
Members
InvalidReplacementTypeException
Description
Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
Members
InvalidRepositoryDescriptionException
Description
The specified repository description is not valid.
Members
InvalidRepositoryNameException
Description
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.
Members
InvalidRepositoryTriggerBranchNameException
Description
One or more branch names specified for the trigger is not valid.
Members
InvalidRepositoryTriggerCustomDataException
Description
The custom data provided for the trigger is not valid.
Members
InvalidRepositoryTriggerDestinationArnException
Description
The Amazon Resource Name (ARN) for the trigger is not valid for the specified destination. The most common reason for this error is that the ARN does not meet the requirements for the service type.
Members
InvalidRepositoryTriggerEventsException
Description
One or more events specified for the trigger is not valid. Check to make sure that all events specified match the requirements for allowed events.
Members
InvalidRepositoryTriggerNameException
Description
The name of the trigger is not valid.
Members
InvalidRepositoryTriggerRegionException
Description
The Amazon Web Services Region for the trigger target does not match the Amazon Web Services Region for the repository. Triggers must be created in the same Amazon Web Services Region as the target for the trigger.
Members
InvalidResourceArnException
Description
The value for the resource ARN is not valid. For more information about resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
Members
InvalidRevisionIdException
Description
The revision ID is not valid. Use GetPullRequest to determine the value.
Members
InvalidRuleContentSha256Exception
Description
The SHA-256 hash signature for the rule content is not valid.
Members
InvalidSortByException
Description
The specified sort by value is not valid.
Members
InvalidSourceCommitSpecifierException
Description
The source commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
Members
InvalidSystemTagUsageException
Description
The specified tag is not valid. Key names cannot be prefixed with aws:.
Members
InvalidTagKeysListException
Description
The list of tags is not valid.
Members
InvalidTagsMapException
Description
The map of tags is not valid.
Members
InvalidTargetBranchException
Description
The specified target branch is not valid.
Members
InvalidTargetException
Description
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.
Members
InvalidTargetsException
Description
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.
Members
InvalidTitleException
Description
The title of the pull request is not valid. Pull request titles cannot exceed 100 characters in length.
Members
IsBinaryFile
Description
Information about whether a file is binary or textual in a merge or pull request operation.
Members
- base
-
- Type: boolean
The binary or non-binary status of a file in the base of a merge or pull request.
- destination
-
- Type: boolean
The binary or non-binary status of a file in the destination of a merge or pull request.
- source
-
- Type: boolean
The binary or non-binary status of file in the source of a merge or pull request.
Location
Description
Returns information about the location of a change or comment in the comparison between two commits or a pull request.
Members
- filePath
-
- Type: string
The name of the file being compared, including its extension and subdirectory, if any.
- filePosition
-
- Type: long (int|float)
The position of a change in a compared file, in line number format.
- relativeFileVersion
-
- Type: string
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
ManualMergeRequiredException
Description
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
Members
MaximumBranchesExceededException
Description
The number of branches for the trigger was exceeded.
Members
MaximumConflictResolutionEntriesExceededException
Description
The number of allowed conflict resolution entries was exceeded.
Members
MaximumFileContentToLoadExceededException
Description
The number of files to load exceeds the allowed limit.
Members
MaximumFileEntriesExceededException
Description
The number of specified files to change as part of this commit exceeds the maximum number of files that can be changed in a single commit. Consider using a Git client for these changes.
Members
MaximumItemsToCompareExceededException
Description
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
Members
MaximumNumberOfApprovalsExceededException
Description
The number of approvals required for the approval rule exceeds the maximum number allowed.
Members
MaximumOpenPullRequestsExceededException
Description
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.
Members
MaximumRepositoryNamesExceededException
Description
The maximum number of allowed repository names was exceeded. Currently, this number is 100.
Members
MaximumRepositoryTriggersExceededException
Description
The number of triggers allowed for the repository was exceeded.
Members
MaximumRuleTemplatesAssociatedWithRepositoryException
Description
The maximum number of approval rule templates for a repository has been exceeded. You cannot associate more than 25 approval rule templates with a repository.
Members
MergeHunk
Description
Information about merge hunks in a merge or pull request operation.
Members
- base
-
- Type: MergeHunkDetail structure
Information about the merge hunk in the base of a merge or pull request.
- destination
-
- Type: MergeHunkDetail structure
Information about the merge hunk in the destination of a merge or pull request.
- isConflict
-
- Type: boolean
A Boolean value indicating whether a combination of hunks contains a conflict. Conflicts occur when the same file or the same lines in a file were modified in both the source and destination of a merge or pull request. Valid values include true, false, and null. True when the hunk represents a conflict and one or more files contains a line conflict. File mode conflicts in a merge do not set this to true.
- source
-
- Type: MergeHunkDetail structure
Information about the merge hunk in the source of a merge or pull request.
MergeHunkDetail
Description
Information about the details of a merge hunk that contains a conflict in a merge or pull request operation.
Members
- endLine
-
- Type: int
The end position of the hunk in the merge result.
- hunkContent
-
- Type: string
The base-64 encoded content of the hunk merged region that might contain a conflict.
- startLine
-
- Type: int
The start position of the hunk in the merge result.
MergeMetadata
Description
Returns information about a merge or potential merge between a source reference and a destination reference in a pull request.
Members
- isMerged
-
- Type: boolean
A Boolean value indicating whether the merge has been made.
- mergeCommitId
-
- Type: string
The commit ID for the merge commit, if any.
- mergeOption
-
- Type: string
The merge strategy used in the merge.
- mergedBy
-
- Type: string
The Amazon Resource Name (ARN) of the user who merged the branches.
MergeOperations
Description
Information about the file operation conflicts in a merge operation.
Members
- destination
-
- Type: string
The operation on a file in the destination of a merge or pull request.
- source
-
- Type: string
The operation (add, modify, or delete) on a file in the source of a merge or pull request.
MergeOptionRequiredException
Description
A merge option or stategy is required, and none was provided.
Members
MultipleConflictResolutionEntriesException
Description
More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
Members
MultipleRepositoriesInPullRequestException
Description
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.
Members
NameLengthExceededException
Description
The user name is not valid because it has exceeded the character limit for author names.
Members
NoChangeException
Description
The commit cannot be created because no changes will be made to the repository as a result of this commit. A commit must contain at least one change.
Members
NumberOfRuleTemplatesExceededException
Description
The maximum number of approval rule templates has been exceeded for this Amazon Web Services Region.
Members
NumberOfRulesExceededException
Description
The approval rule cannot be added. The pull request has the maximum number of approval rules associated with it.
Members
ObjectTypes
Description
Information about the type of an object in a merge operation.
Members
- base
-
- Type: string
The type of the object in the base commit of the merge.
- destination
-
- Type: string
The type of the object in the destination branch.
- source
-
- Type: string
The type of the object in the source branch.
OperationNotAllowedException
Description
The requested action is not allowed.
Members
OriginApprovalRuleTemplate
Description
Returns information about the template that created the approval rule for a pull request.
Members
- approvalRuleTemplateId
-
- Type: string
The ID of the template that created the approval rule.
- approvalRuleTemplateName
-
- Type: string
The name of the template that created the approval rule.
OverrideAlreadySetException
Description
The pull request has already had its approval rules set to override.
Members
OverrideStatusRequiredException
Description
An override status is required, but no value was provided. Valid values include OVERRIDE and REVOKE.
Members
ParentCommitDoesNotExistException
Description
The parent commit ID is not valid because it does not exist. The specified parent commit ID does not exist in the specified branch of the repository.
Members
ParentCommitIdOutdatedException
Description
The file could not be added because the provided parent commit ID is not the current tip of the specified branch. To view the full commit ID of the current head of the branch, use GetBranch.
Members
ParentCommitIdRequiredException
Description
A parent commit ID is required. To view the full commit ID of a branch in a repository, use GetBranch or a Git command (for example, git pull or git log).
Members
PathDoesNotExistException
Description
The specified path does not exist.
Members
PathRequiredException
Description
The folderPath for a location cannot be null.
Members
PullRequest
Description
Returns information about a pull request.
Members
- approvalRules
-
- Type: Array of ApprovalRule structures
The approval rules applied to the pull request.
- authorArn
-
- Type: string
The Amazon Resource Name (ARN) of the user who created the pull request.
- clientRequestToken
-
- Type: string
A 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.
- creationDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the pull request was originally created, in timestamp format.
- description
-
- Type: string
The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.
- lastActivityDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The day and time of the last user or system activity on the pull request, in timestamp format.
- pullRequestId
-
- Type: string
The system-generated ID of the pull request.
- pullRequestStatus
-
- Type: string
The status of the pull request. Pull request status can only change from
OPEN
toCLOSED
. - pullRequestTargets
-
- Type: Array of PullRequestTarget structures
The targets of the pull request, including the source branch and destination branch for the pull request.
- revisionId
-
- Type: string
The system-generated revision ID for the pull request.
- title
-
- Type: string
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
PullRequestAlreadyClosedException
Description
The pull request status cannot be updated because it is already closed.
Members
PullRequestApprovalRulesNotSatisfiedException
Description
The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.
Members
PullRequestCannotBeApprovedByAuthorException
Description
The approval cannot be applied because the user approving the pull request matches the user who created the pull request. You cannot approve a pull request that you created.
Members
PullRequestCreatedEventMetadata
Description
Metadata about the pull request that is used when comparing the pull request source with its destination.
Members
- destinationCommitId
-
- Type: string
The commit ID of the tip of the branch specified as the destination branch when the pull request was created.
- mergeBase
-
- Type: string
The commit ID of the most recent commit that the source branch and the destination branch have in common.
- repositoryName
-
- Type: string
The name of the repository where the pull request was created.
- sourceCommitId
-
- Type: string
The commit ID on the source branch used when the pull request was created.
PullRequestDoesNotExistException
Description
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.
Members
PullRequestEvent
Description
Returns information about a pull request event.