Table of Contents
A low-level client representing AWS CodeCommit:
client = session.create_client('codecommit')
These are the available methods:
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.
See also: AWS API Documentation
Request Syntax
response = client.associate_approval_rule_template_with_repository(
approvalRuleTemplateName='string',
repositoryName='string'
)
[REQUIRED]
The name for the approval rule template.
[REQUIRED]
The name of the repository that you want to associate with the template.
None
Exceptions
Creates an association between an approval rule template and one or more specified repositories.
See also: AWS API Documentation
Request Syntax
response = client.batch_associate_approval_rule_template_with_repositories(
approvalRuleTemplateName='string',
repositoryNames=[
'string',
]
)
[REQUIRED]
The name of the template you want to associate with one or more repositories.
[REQUIRED]
The names of the repositories you want to associate with the template.
Note
The length constraint limit is for each string in the array. The array itself can be empty.
dict
Response Syntax
{
'associatedRepositoryNames': [
'string',
],
'errors': [
{
'repositoryName': 'string',
'errorCode': 'string',
'errorMessage': 'string'
},
]
}
Response Structure
(dict) --
associatedRepositoryNames (list) --
A list of names of the repositories that have been associated with the template.
errors (list) --
A list of any errors that might have occurred while attempting to create the association between the template and the repositories.
(dict) --
Returns information about errors in a BatchAssociateApprovalRuleTemplateWithRepositories operation.
repositoryName (string) --
The name of the repository where the association was not made.
errorCode (string) --
An error code that specifies whether the repository name was not valid or not found.
errorMessage (string) --
An error message that provides details about why the repository name was not found or not valid.
Exceptions
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
See also: AWS API Documentation
Request Syntax
response = client.batch_describe_merge_conflicts(
repositoryName='string',
destinationCommitSpecifier='string',
sourceCommitSpecifier='string',
mergeOption='FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
maxMergeHunks=123,
maxConflictFiles=123,
filePaths=[
'string',
],
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
nextToken='string'
)
[REQUIRED]
The name of the repository that contains the merge conflicts you want to review.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The merge option or strategy you want to use to merge the code.
The path of the target files used to describe the conflicts. If not specified, the default is all conflict files.
dict
Response Syntax
{
'conflicts': [
{
'conflictMetadata': {
'filePath': 'string',
'fileSizes': {
'source': 123,
'destination': 123,
'base': 123
},
'fileModes': {
'source': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
'destination': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
'base': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
'objectTypes': {
'source': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
'destination': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
'base': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK'
},
'numberOfConflicts': 123,
'isBinaryFile': {
'source': True|False,
'destination': True|False,
'base': True|False
},
'contentConflict': True|False,
'fileModeConflict': True|False,
'objectTypeConflict': True|False,
'mergeOperations': {
'source': 'A'|'M'|'D',
'destination': 'A'|'M'|'D'
}
},
'mergeHunks': [
{
'isConflict': True|False,
'source': {
'startLine': 123,
'endLine': 123,
'hunkContent': 'string'
},
'destination': {
'startLine': 123,
'endLine': 123,
'hunkContent': 'string'
},
'base': {
'startLine': 123,
'endLine': 123,
'hunkContent': 'string'
}
},
]
},
],
'nextToken': 'string',
'errors': [
{
'filePath': 'string',
'exceptionName': 'string',
'message': 'string'
},
],
'destinationCommitId': 'string',
'sourceCommitId': 'string',
'baseCommitId': 'string'
}
Response Structure
(dict) --
conflicts (list) --
A list of conflicts for each file, including the conflict metadata and the hunks of the differences between the files.
(dict) --
Information about conflicts in a merge operation.
conflictMetadata (dict) --
Metadata about a conflict in a merge operation.
filePath (string) --
The path of the file that contains conflicts.
fileSizes (dict) --
The file sizes of the file in the source, destination, and base of the merge.
source (integer) --
The size of a file in the source of a merge or pull request.
destination (integer) --
The size of a file in the destination of a merge or pull request.
base (integer) --
The size of a file in the base of a merge or pull request.
fileModes (dict) --
The file modes of the file in the source, destination, and base of the merge.
source (string) --
The file mode of a file in the source of a merge or pull request.
destination (string) --
The file mode of a file in the destination of a merge or pull request.
base (string) --
The file mode of a file in the base of a merge or pull request.
objectTypes (dict) --
Information about any object type conflicts in a merge operation.
source (string) --
The type of the object in the source branch.
destination (string) --
The type of the object in the destination branch.
base (string) --
The type of the object in the base commit of the merge.
numberOfConflicts (integer) --
The number of conflicts, including both hunk conflicts and metadata conflicts.
isBinaryFile (dict) --
A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and base of the merge.
source (boolean) --
The binary or non-binary status of file in the source of a merge or pull request.
destination (boolean) --
The binary or non-binary status of a file in the destination of a merge or pull request.
base (boolean) --
The binary or non-binary status of a file in the base of a merge or pull request.
contentConflict (boolean) --
A boolean value indicating whether there are conflicts in the content of a file.
fileModeConflict (boolean) --
A boolean value indicating whether there are conflicts in the file mode of a file.
objectTypeConflict (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.
mergeOperations (dict) --
Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.
source (string) --
The operation (add, modify, or delete) on a file in the source of a merge or pull request.
destination (string) --
The operation on a file in the destination of a merge or pull request.
mergeHunks (list) --
A list of hunks that contain the differences between files or lines causing the conflict.
(dict) --
Information about merge hunks in a merge or pull request operation.
isConflict (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 (dict) --
Information about the merge hunk in the source of a merge or pull request.
startLine (integer) --
The start position of the hunk in the merge result.
endLine (integer) --
The end position of the hunk in the merge result.
hunkContent (string) --
The base-64 encoded content of the hunk merged region that might contain a conflict.
destination (dict) --
Information about the merge hunk in the destination of a merge or pull request.
startLine (integer) --
The start position of the hunk in the merge result.
endLine (integer) --
The end position of the hunk in the merge result.
hunkContent (string) --
The base-64 encoded content of the hunk merged region that might contain a conflict.
base (dict) --
Information about the merge hunk in the base of a merge or pull request.
startLine (integer) --
The start position of the hunk in the merge result.
endLine (integer) --
The end position of the hunk in the merge result.
hunkContent (string) --
The base-64 encoded content of the hunk merged region that might contain a conflict.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
errors (list) --
A list of any errors returned while describing the merge conflicts for each file.
(dict) --
Returns information about errors in a BatchDescribeMergeConflicts operation.
filePath (string) --
The path to the file.
exceptionName (string) --
The name of the exception.
message (string) --
The message provided by the exception.
destinationCommitId (string) --
The commit ID of the destination commit specifier that was used in the merge evaluation.
sourceCommitId (string) --
The commit ID of the source commit specifier that was used in the merge evaluation.
baseCommitId (string) --
The commit ID of the merge base.
Exceptions
Removes the association between an approval rule template and one or more specified repositories.
See also: AWS API Documentation
Request Syntax
response = client.batch_disassociate_approval_rule_template_from_repositories(
approvalRuleTemplateName='string',
repositoryNames=[
'string',
]
)
[REQUIRED]
The name of the template that you want to disassociate from one or more repositories.
[REQUIRED]
The repository names that you want to disassociate from the approval rule template.
Note
The length constraint limit is for each string in the array. The array itself can be empty.
dict
Response Syntax
{
'disassociatedRepositoryNames': [
'string',
],
'errors': [
{
'repositoryName': 'string',
'errorCode': 'string',
'errorMessage': 'string'
},
]
}
Response Structure
(dict) --
disassociatedRepositoryNames (list) --
A list of repository names that have had their association with the template removed.
errors (list) --
A list of any errors that might have occurred while attempting to remove the association between the template and the repositories.
(dict) --
Returns information about errors in a BatchDisassociateApprovalRuleTemplateFromRepositories operation.
repositoryName (string) --
The name of the repository where the association with the template was not able to be removed.
errorCode (string) --
An error code that specifies whether the repository name was not valid or not found.
errorMessage (string) --
An error message that provides details about why the repository name was either not found or not valid.
Exceptions
Returns information about the contents of one or more commits in a repository.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_commits(
commitIds=[
'string',
],
repositoryName='string'
)
[REQUIRED]
The full commit IDs of the commits to get information about.
Note
You must supply the full SHA IDs of each commit. You cannot use shortened SHA IDs.
[REQUIRED]
The name of the repository that contains the commits.
dict
Response Syntax
{
'commits': [
{
'commitId': 'string',
'treeId': 'string',
'parents': [
'string',
],
'message': 'string',
'author': {
'name': 'string',
'email': 'string',
'date': 'string'
},
'committer': {
'name': 'string',
'email': 'string',
'date': 'string'
},
'additionalData': 'string'
},
],
'errors': [
{
'commitId': 'string',
'errorCode': 'string',
'errorMessage': 'string'
},
]
}
Response Structure
(dict) --
commits (list) --
An array of commit data type objects, each of which contains information about a specified commit.
(dict) --
Returns information about a specific commit.
commitId (string) --
The full SHA ID of the specified commit.
treeId (string) --
Tree information for the specified commit.
parents (list) --
A list of parent commits for the specified commit. Each parent commit ID is the full commit ID.
message (string) --
The commit message associated with the specified commit.
author (dict) --
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.
name (string) --
The name of the user who made the specified commit.
email (string) --
The email address associated with the user who made the commit, if any.
date (string) --
The date when the specified commit was commited, in timestamp format with GMT offset.
committer (dict) --
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.
name (string) --
The name of the user who made the specified commit.
email (string) --
The email address associated with the user who made the commit, if any.
date (string) --
The date when the specified commit was commited, in timestamp format with GMT offset.
additionalData (string) --
Any other data associated with the specified commit.
errors (list) --
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.
(dict) --
Returns information about errors in a BatchGetCommits operation.
commitId (string) --
A commit ID that either could not be found or was not in a valid format.
errorCode (string) --
An error code that specifies whether the commit ID was not valid or not found.
errorMessage (string) --
An error message that provides detail about why the commit ID either was not found or was not valid.
Exceptions
Returns information about one or more repositories.
Note
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.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_repositories(
repositoryNames=[
'string',
]
)
[REQUIRED]
The names of the repositories to get information about.
Note
The length constraint limit is for each string in the array. The array itself can be empty.
{
'repositories': [
{
'accountId': 'string',
'repositoryId': 'string',
'repositoryName': 'string',
'repositoryDescription': 'string',
'defaultBranch': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'cloneUrlHttp': 'string',
'cloneUrlSsh': 'string',
'Arn': 'string'
},
],
'repositoriesNotFound': [
'string',
]
}
Response Structure
Represents the output of a batch get repositories operation.
A list of repositories returned by the batch get repositories operation.
Information about a repository.
The ID of the AWS account associated with the repository.
The ID of the repository.
The repository's name.
A comment or description about the repository.
The repository's default branch name.
The date and time the repository was last modified, in timestamp format.
The date and time the repository was created, in timestamp format.
The URL to use for cloning the repository over HTTPS.
The URL to use for cloning the repository over SSH.
The Amazon Resource Name (ARN) of the repository.
Returns a list of repository names for which information could not be found.
Exceptions
Check if an operation can be paginated.
Creates a template for approval rules that can then be associated with one or more repositories in your AWS account. When you associate a template with a repository, AWS 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 .
See also: AWS API Documentation
Request Syntax
response = client.create_approval_rule_template(
approvalRuleTemplateName='string',
approvalRuleTemplateContent='string',
approvalRuleTemplateDescription='string'
)
[REQUIRED]
The name of the approval rule template. Provide descriptive names, because this name is applied to the approval rules created automatically in associated repositories.
[REQUIRED]
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.
Note
When you create the content of the approval rule template, you can specify approvers in an approval pool in one of two ways:
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).
For more information about IAM ARNs, wildcards, and formats, see IAM Identifiers in the IAM User Guide .
dict
Response Syntax
{
'approvalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string',
'approvalRuleTemplateDescription': 'string',
'approvalRuleTemplateContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string'
}
}
Response Structure
(dict) --
approvalRuleTemplate (dict) --
The content and structure of the created approval rule template.
approvalRuleTemplateId (string) --
The system-generated ID of the approval rule template.
approvalRuleTemplateName (string) --
The name of the approval rule template.
approvalRuleTemplateDescription (string) --
The description of the approval rule template.
approvalRuleTemplateContent (string) --
The content of the approval rule template.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule template.
lastModifiedDate (datetime) --
The date the approval rule template was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule template was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
Exceptions
Creates a branch in a repository and points the branch to a commit.
Note
Calling the create branch operation does not set a repository's default branch. To do this, call the update default branch operation.
See also: AWS API Documentation
Request Syntax
response = client.create_branch(
repositoryName='string',
branchName='string',
commitId='string'
)
[REQUIRED]
The name of the repository in which you want to create the new branch.
[REQUIRED]
The name of the new branch to create.
[REQUIRED]
The ID of the commit to point the new branch to.
None
Exceptions
Creates a commit for a repository on the tip of a specified branch.
See also: AWS API Documentation
Request Syntax
response = client.create_commit(
repositoryName='string',
branchName='string',
parentCommitId='string',
authorName='string',
email='string',
commitMessage='string',
keepEmptyFolders=True|False,
putFiles=[
{
'filePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
'fileContent': b'bytes',
'sourceFile': {
'filePath': 'string',
'isMove': True|False
}
},
],
deleteFiles=[
{
'filePath': 'string'
},
],
setFileModes=[
{
'filePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
]
)
[REQUIRED]
The name of the repository where you create the commit.
[REQUIRED]
The name of the branch where you create the commit.
The files to add or update in this commit.
Information about a file added or updated as part of a commit.
The full path to the file in the repository, including the name of the file.
The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
The content of the file, if a source file is not specified.
The name and full path of the file that contains the changes you want to make as part of the commit, if you are not providing the file content directly.
The full path to the file, including the name of the file.
Whether to remove the source file from the parent commit.
The files to delete in this commit. These files still exist in earlier commits.
A file that is deleted as part of a commit.
The full path of the file to be deleted, including the name of the file.
The file modes to update for files in this commit.
Information about the file mode changes.
The full path to the file, including the name of the file.
The file mode for the file.
dict
Response Syntax
{
'commitId': 'string',
'treeId': 'string',
'filesAdded': [
{
'absolutePath': 'string',
'blobId': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'filesUpdated': [
{
'absolutePath': 'string',
'blobId': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'filesDeleted': [
{
'absolutePath': 'string',
'blobId': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
]
}
Response Structure
(dict) --
commitId (string) --
The full commit ID of the commit that contains your committed file changes.
treeId (string) --
The full SHA-1 pointer of the tree information for the commit that contains the commited file changes.
filesAdded (list) --
The files added as part of the committed file changes.
(dict) --
A file to be added, updated, or deleted as part of a commit.
absolutePath (string) --
The full path to the file to be added or updated, including the name of the file.
blobId (string) --
The blob ID that contains the file information.
fileMode (string) --
The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
filesUpdated (list) --
The files updated as part of the commited file changes.
(dict) --
A file to be added, updated, or deleted as part of a commit.
absolutePath (string) --
The full path to the file to be added or updated, including the name of the file.
blobId (string) --
The blob ID that contains the file information.
fileMode (string) --
The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
filesDeleted (list) --
The files deleted as part of the committed file changes.
(dict) --
A file to be added, updated, or deleted as part of a commit.
absolutePath (string) --
The full path to the file to be added or updated, including the name of the file.
blobId (string) --
The blob ID that contains the file information.
fileMode (string) --
The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
Exceptions
Creates a pull request in the specified repository.
See also: AWS API Documentation
Request Syntax
response = client.create_pull_request(
title='string',
description='string',
targets=[
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string'
},
],
clientRequestToken='string'
)
[REQUIRED]
The title of the pull request. This title is used to identify the pull request to other users in the repository.
[REQUIRED]
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).
Returns information about a target for a pull request.
The name of the repository that contains the pull request.
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
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.
Note
The AWS SDKs prepopulate client request tokens. If you are using an AWS SDK, an idempotency token is created for you.
This field is autopopulated if not provided.
dict
Response Syntax
{
'pullRequest': {
'pullRequestId': 'string',
'title': 'string',
'description': 'string',
'lastActivityDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'pullRequestStatus': 'OPEN'|'CLOSED',
'authorArn': 'string',
'pullRequestTargets': [
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string',
'destinationCommit': 'string',
'sourceCommit': 'string',
'mergeBase': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
],
'clientRequestToken': 'string',
'revisionId': 'string',
'approvalRules': [
{
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
},
]
}
}
Response Structure
(dict) --
pullRequest (dict) --
Information about the newly created pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
description (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 (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED .
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
clientRequestToken (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.
revisionId (string) --
The system-generated revision ID for the pull request.
approvalRules (list) --
The approval rules applied to the pull request.
(dict) --
Returns information about an approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
Creates an approval rule for a pull request.
See also: AWS API Documentation
Request Syntax
response = client.create_pull_request_approval_rule(
pullRequestId='string',
approvalRuleName='string',
approvalRuleContent='string'
)
[REQUIRED]
The system-generated ID of the pull request for which you want to create the approval rule.
[REQUIRED]
The name for the approval rule.
[REQUIRED]
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 AWS CodeCommit User Guide.
Note
When you create the content of the approval rule, you can specify approvers in an approval pool in one of two ways:
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).
For more information about IAM ARNs, wildcards, and formats, see IAM Identifiers in the IAM User Guide .
dict
Response Syntax
{
'approvalRule': {
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
}
}
Response Structure
(dict) --
approvalRule (dict) --
Information about the created approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
Creates a new, empty repository.
See also: AWS API Documentation
Request Syntax
response = client.create_repository(
repositoryName='string',
repositoryDescription='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The name of the new repository to be created.
Note
The repository name must be unique across the calling AWS 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 Limits in the AWS CodeCommit User Guide . The suffix .git is prohibited.
A comment or description about the new repository.
Note
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.
One or more tag key-value pairs to use when tagging this repository.
dict
Response Syntax
{
'repositoryMetadata': {
'accountId': 'string',
'repositoryId': 'string',
'repositoryName': 'string',
'repositoryDescription': 'string',
'defaultBranch': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'cloneUrlHttp': 'string',
'cloneUrlSsh': 'string',
'Arn': 'string'
}
}
Response Structure
(dict) --
Represents the output of a create repository operation.
repositoryMetadata (dict) --
Information about the newly created repository.
accountId (string) --
The ID of the AWS account associated with the repository.
repositoryId (string) --
The ID of the repository.
repositoryName (string) --
The repository's name.
repositoryDescription (string) --
A comment or description about the repository.
defaultBranch (string) --
The repository's default branch name.
lastModifiedDate (datetime) --
The date and time the repository was last modified, in timestamp format.
creationDate (datetime) --
The date and time the repository was created, in timestamp format.
cloneUrlHttp (string) --
The URL to use for cloning the repository over HTTPS.
cloneUrlSsh (string) --
The URL to use for cloning the repository over SSH.
Arn (string) --
The Amazon Resource Name (ARN) of the repository.
Exceptions
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.
Note
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.
See also: AWS API Documentation
Request Syntax
response = client.create_unreferenced_merge_commit(
repositoryName='string',
sourceCommitSpecifier='string',
destinationCommitSpecifier='string',
mergeOption='FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
authorName='string',
email='string',
commitMessage='string',
keepEmptyFolders=True|False,
conflictResolution={
'replaceContents': [
{
'filePath': 'string',
'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
'content': b'bytes',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'deleteFiles': [
{
'filePath': 'string'
},
],
'setFileModes': [
{
'filePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
]
}
)
[REQUIRED]
The name of the repository where you want to create the unreferenced merge commit.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The merge option or strategy you want to use to merge the code.
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
Files to have content replaced as part of the merge conflict resolution.
Information about a replacement content entry in the conflict of a merge or pull request operation.
The path of the conflicting file.
The replacement type to use when determining how to resolve the conflict.
The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.
The file mode to apply during conflict resoltion.
Files to be deleted as part of the merge conflict resolution.
A file that is deleted as part of a commit.
The full path of the file to be deleted, including the name of the file.
File modes that are set as part of the merge conflict resolution.
Information about the file mode changes.
The full path to the file, including the name of the file.
The file mode for the file.
dict
Response Syntax
{
'commitId': 'string',
'treeId': 'string'
}
Response Structure
(dict) --
commitId (string) --
The full commit ID of the commit that contains your merge results.
treeId (string) --
The full SHA-1 pointer of the tree information for the commit that contains the merge results.
Exceptions
Deletes a specified approval rule template. Deleting a template does not remove approval rules on pull requests already created with the template.
See also: AWS API Documentation
Request Syntax
response = client.delete_approval_rule_template(
approvalRuleTemplateName='string'
)
[REQUIRED]
The name of the approval rule template to delete.
{
'approvalRuleTemplateId': 'string'
}
Response Structure
The system-generated ID of the deleted approval rule template. If the template has been previously deleted, the only response is a 200 OK.
Exceptions
Deletes a branch from a repository, unless that branch is the default branch for the repository.
See also: AWS API Documentation
Request Syntax
response = client.delete_branch(
repositoryName='string',
branchName='string'
)
[REQUIRED]
The name of the repository that contains the branch to be deleted.
[REQUIRED]
The name of the branch to delete.
dict
Response Syntax
{
'deletedBranch': {
'branchName': 'string',
'commitId': 'string'
}
}
Response Structure
(dict) --
Represents the output of a delete branch operation.
deletedBranch (dict) --
Information about the branch deleted by the operation, including the branch name and the commit ID that was the tip of the branch.
branchName (string) --
The name of the branch.
commitId (string) --
The ID of the last commit made to the branch.
Exceptions
Deletes the content of a comment made on a change, file, or commit in a repository.
See also: AWS API Documentation
Request Syntax
response = client.delete_comment_content(
commentId='string'
)
[REQUIRED]
The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest .
{
'comment': {
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
}
}
Response Structure
Information about the comment you just deleted.
The system-generated comment ID.
The content of the comment.
The ID of the comment for which this comment is a reply, if any.
The date and time the comment was created, in timestamp format.
The date and time the comment was most recently modified, in timestamp format.
The Amazon Resource Name (ARN) of the person who posted the comment.
A Boolean value indicating whether the comment has been deleted.
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.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.delete_file(
repositoryName='string',
branchName='string',
filePath='string',
parentCommitId='string',
keepEmptyFolders=True|False,
commitMessage='string',
name='string',
email='string'
)
[REQUIRED]
The name of the repository that contains the file to delete.
[REQUIRED]
The name of the branch where the commit that deletes the file is made.
[REQUIRED]
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.
[REQUIRED]
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.
dict
Response Syntax
{
'commitId': 'string',
'blobId': 'string',
'treeId': 'string',
'filePath': 'string'
}
Response Structure
(dict) --
commitId (string) --
The full commit ID of the commit that contains the change that deletes the file.
blobId (string) --
The blob ID removed from the tree as part of deleting the file.
treeId (string) --
The full SHA-1 pointer of the tree information for the commit that contains the delete file change.
filePath (string) --
The fully qualified path to the file to be deleted, including the full name and extension of that file.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.delete_pull_request_approval_rule(
pullRequestId='string',
approvalRuleName='string'
)
[REQUIRED]
The system-generated ID of the pull request that contains the approval rule you want to delete.
[REQUIRED]
The name of the approval rule you want to delete.
dict
Response Syntax
{
'approvalRuleId': 'string'
}
Response Structure
(dict) --
approvalRuleId (string) --
The ID of the deleted approval rule.
Note
If the approval rule was deleted in an earlier API call, the response is 200 OK without content.
Exceptions
Deletes a repository. If a specified repository was already deleted, a null repository ID is returned.
Warning
Deleting a repository also deletes all associated objects and metadata. After a repository is deleted, all future push calls to the deleted repository fail.
See also: AWS API Documentation
Request Syntax
response = client.delete_repository(
repositoryName='string'
)
[REQUIRED]
The name of the repository to delete.
{
'repositoryId': 'string'
}
Response Structure
Represents the output of a delete repository operation.
The ID of the repository that was deleted.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.describe_merge_conflicts(
repositoryName='string',
destinationCommitSpecifier='string',
sourceCommitSpecifier='string',
mergeOption='FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
maxMergeHunks=123,
filePath='string',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
nextToken='string'
)
[REQUIRED]
The name of the repository where you want to get information about a merge conflict.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The merge option or strategy you want to use to merge the code.
[REQUIRED]
The path of the target files used to describe the conflicts.
dict
Response Syntax
{
'conflictMetadata': {
'filePath': 'string',
'fileSizes': {
'source': 123,
'destination': 123,
'base': 123
},
'fileModes': {
'source': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
'destination': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
'base': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
'objectTypes': {
'source': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
'destination': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
'base': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK'
},
'numberOfConflicts': 123,
'isBinaryFile': {
'source': True|False,
'destination': True|False,
'base': True|False
},
'contentConflict': True|False,
'fileModeConflict': True|False,
'objectTypeConflict': True|False,
'mergeOperations': {
'source': 'A'|'M'|'D',
'destination': 'A'|'M'|'D'
}
},
'mergeHunks': [
{
'isConflict': True|False,
'source': {
'startLine': 123,
'endLine': 123,
'hunkContent': 'string'
},
'destination': {
'startLine': 123,
'endLine': 123,
'hunkContent': 'string'
},
'base': {
'startLine': 123,
'endLine': 123,
'hunkContent': 'string'
}
},
],
'nextToken': 'string',
'destinationCommitId': 'string',
'sourceCommitId': 'string',
'baseCommitId': 'string'
}
Response Structure
(dict) --
conflictMetadata (dict) --
Contains metadata about the conflicts found in the merge.
filePath (string) --
The path of the file that contains conflicts.
fileSizes (dict) --
The file sizes of the file in the source, destination, and base of the merge.
source (integer) --
The size of a file in the source of a merge or pull request.
destination (integer) --
The size of a file in the destination of a merge or pull request.
base (integer) --
The size of a file in the base of a merge or pull request.
fileModes (dict) --
The file modes of the file in the source, destination, and base of the merge.
source (string) --
The file mode of a file in the source of a merge or pull request.
destination (string) --
The file mode of a file in the destination of a merge or pull request.
base (string) --
The file mode of a file in the base of a merge or pull request.
objectTypes (dict) --
Information about any object type conflicts in a merge operation.
source (string) --
The type of the object in the source branch.
destination (string) --
The type of the object in the destination branch.
base (string) --
The type of the object in the base commit of the merge.
numberOfConflicts (integer) --
The number of conflicts, including both hunk conflicts and metadata conflicts.
isBinaryFile (dict) --
A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and base of the merge.
source (boolean) --
The binary or non-binary status of file in the source of a merge or pull request.
destination (boolean) --
The binary or non-binary status of a file in the destination of a merge or pull request.
base (boolean) --
The binary or non-binary status of a file in the base of a merge or pull request.
contentConflict (boolean) --
A boolean value indicating whether there are conflicts in the content of a file.
fileModeConflict (boolean) --
A boolean value indicating whether there are conflicts in the file mode of a file.
objectTypeConflict (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.
mergeOperations (dict) --
Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.
source (string) --
The operation (add, modify, or delete) on a file in the source of a merge or pull request.
destination (string) --
The operation on a file in the destination of a merge or pull request.
mergeHunks (list) --
A list of merge hunks of the differences between the files or lines.
(dict) --
Information about merge hunks in a merge or pull request operation.
isConflict (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 (dict) --
Information about the merge hunk in the source of a merge or pull request.
startLine (integer) --
The start position of the hunk in the merge result.
endLine (integer) --
The end position of the hunk in the merge result.
hunkContent (string) --
The base-64 encoded content of the hunk merged region that might contain a conflict.
destination (dict) --
Information about the merge hunk in the destination of a merge or pull request.
startLine (integer) --
The start position of the hunk in the merge result.
endLine (integer) --
The end position of the hunk in the merge result.
hunkContent (string) --
The base-64 encoded content of the hunk merged region that might contain a conflict.
base (dict) --
Information about the merge hunk in the base of a merge or pull request.
startLine (integer) --
The start position of the hunk in the merge result.
endLine (integer) --
The end position of the hunk in the merge result.
hunkContent (string) --
The base-64 encoded content of the hunk merged region that might contain a conflict.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
destinationCommitId (string) --
The commit ID of the destination commit specifier that was used in the merge evaluation.
sourceCommitId (string) --
The commit ID of the source commit specifier that was used in the merge evaluation.
baseCommitId (string) --
The commit ID of the merge base.
Exceptions
Returns information about one or more pull request events.
See also: AWS API Documentation
Request Syntax
response = client.describe_pull_request_events(
pullRequestId='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',
actorArn='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
dict
Response Syntax
{
'pullRequestEvents': [
{
'pullRequestId': 'string',
'eventDate': datetime(2015, 1, 1),
'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',
'actorArn': 'string',
'pullRequestCreatedEventMetadata': {
'repositoryName': 'string',
'sourceCommitId': 'string',
'destinationCommitId': 'string',
'mergeBase': 'string'
},
'pullRequestStatusChangedEventMetadata': {
'pullRequestStatus': 'OPEN'|'CLOSED'
},
'pullRequestSourceReferenceUpdatedEventMetadata': {
'repositoryName': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'mergeBase': 'string'
},
'pullRequestMergedStateChangedEventMetadata': {
'repositoryName': 'string',
'destinationReference': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
'approvalRuleEventMetadata': {
'approvalRuleName': 'string',
'approvalRuleId': 'string',
'approvalRuleContent': 'string'
},
'approvalStateChangedEventMetadata': {
'revisionId': 'string',
'approvalStatus': 'APPROVE'|'REVOKE'
},
'approvalRuleOverriddenEventMetadata': {
'revisionId': 'string',
'overrideStatus': 'OVERRIDE'|'REVOKE'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
pullRequestEvents (list) --
Information about the pull request events.
(dict) --
Returns information about a pull request event.
pullRequestId (string) --
The system-generated ID of the pull request.
eventDate (datetime) --
The day and time of the pull request event, in timestamp format.
pullRequestEventType (string) --
The type of the pull request event (for example, a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED)).
actorArn (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.
pullRequestCreatedEventMetadata (dict) --
Information about the source and destination branches for the pull request.
repositoryName (string) --
The name of the repository where the pull request was created.
sourceCommitId (string) --
The commit ID on the source branch used when the pull request was created.
destinationCommitId (string) --
The commit ID of the tip of the branch specified as the destination branch when the pull request was created.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
pullRequestStatusChangedEventMetadata (dict) --
Information about the change in status for the pull request event.
pullRequestStatus (string) --
The changed status of the pull request.
pullRequestSourceReferenceUpdatedEventMetadata (dict) --
Information about the updated source branch for the pull request event.
repositoryName (string) --
The name of the repository where the pull request was updated.
beforeCommitId (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 updated.
afterCommitId (string) --
The full commit ID of the commit in the source branch that was the tip of the branch at the time the pull request was updated.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
pullRequestMergedStateChangedEventMetadata (dict) --
Information about the change in mergability state for the pull request event.
repositoryName (string) --
The name of the repository where the pull request was created.
destinationReference (string) --
The name of the branch that the pull request is merged into.
mergeMetadata (dict) --
Information about the merge state change event.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
approvalRuleEventMetadata (dict) --
Information about a pull request event.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
approvalStateChangedEventMetadata (dict) --
Information about an approval state change for a pull request.
revisionId (string) --
The revision ID of the pull request when the approval state changed.
approvalStatus (string) --
The approval status for the pull request.
approvalRuleOverriddenEventMetadata (dict) --
Information about an approval rule override event for a pull request.
revisionId (string) --
The revision ID of the pull request when the override event occurred.
overrideStatus (string) --
The status of the override event.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_approval_rule_template_from_repository(
approvalRuleTemplateName='string',
repositoryName='string'
)
[REQUIRED]
The name of the approval rule template to disassociate from a specified repository.
[REQUIRED]
The name of the repository you want to disassociate from the template.
None
Exceptions
Evaluates whether a pull request has met all the conditions specified in its associated approval rules.
See also: AWS API Documentation
Request Syntax
response = client.evaluate_pull_request_approval_rules(
pullRequestId='string',
revisionId='string'
)
[REQUIRED]
The system-generated ID of the pull request you want to evaluate.
[REQUIRED]
The system-generated ID for the pull request revision. To retrieve the most recent revision ID for a pull request, use GetPullRequest .
dict
Response Syntax
{
'evaluation': {
'approved': True|False,
'overridden': True|False,
'approvalRulesSatisfied': [
'string',
],
'approvalRulesNotSatisfied': [
'string',
]
}
}
Response Structure
(dict) --
evaluation (dict) --
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.
approved (boolean) --
Whether the state of the pull request is approved.
overridden (boolean) --
Whether the approval rule requirements for the pull request have been overridden and no longer need to be met.
approvalRulesSatisfied (list) --
The names of the approval rules that have had their conditions met.
approvalRulesNotSatisfied (list) --
The names of the approval rules that have not had their conditions met.
Exceptions
Generate a presigned url given a client, its method, and arguments
The presigned url
Returns information about a specified approval rule template.
See also: AWS API Documentation
Request Syntax
response = client.get_approval_rule_template(
approvalRuleTemplateName='string'
)
[REQUIRED]
The name of the approval rule template for which you want to get information.
{
'approvalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string',
'approvalRuleTemplateDescription': 'string',
'approvalRuleTemplateContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string'
}
}
Response Structure
The content and structure of the approval rule template.
The system-generated ID of the approval rule template.
The name of the approval rule template.
The description of the approval rule template.
The content of the approval rule template.
The SHA-256 hash signature for the content of the approval rule template.
The date the approval rule template was most recently changed, in timestamp format.
The date the approval rule template was created, in timestamp format.
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
Exceptions
Returns the base-64 encoded content of an individual blob in a repository.
See also: AWS API Documentation
Request Syntax
response = client.get_blob(
repositoryName='string',
blobId='string'
)
[REQUIRED]
The name of the repository that contains the blob.
[REQUIRED]
The ID of the blob, which is its SHA-1 pointer.
dict
Response Syntax
{
'content': b'bytes'
}
Response Structure
(dict) --
Represents the output of a get blob operation.
content (bytes) --
The content of the blob, usually a file.
Exceptions
Returns information about a repository branch, including its name and the last commit ID.
See also: AWS API Documentation
Request Syntax
response = client.get_branch(
repositoryName='string',
branchName='string'
)
dict
Response Syntax
{
'branch': {
'branchName': 'string',
'commitId': 'string'
}
}
Response Structure
(dict) --
Represents the output of a get branch operation.
branch (dict) --
The name of the branch.
branchName (string) --
The name of the branch.
commitId (string) --
The ID of the last commit made to the branch.
Exceptions
Returns the content of a comment made on a change, file, or commit in a repository.
See also: AWS API Documentation
Request Syntax
response = client.get_comment(
commentId='string'
)
[REQUIRED]
The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest .
{
'comment': {
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
}
}
Response Structure
The contents of the comment.
The system-generated comment ID.
The content of the comment.
The ID of the comment for which this comment is a reply, if any.
The date and time the comment was created, in timestamp format.
The date and time the comment was most recently modified, in timestamp format.
The Amazon Resource Name (ARN) of the person who posted the comment.
A Boolean value indicating whether the comment has been deleted.
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.
Exceptions
Returns information about comments made on the comparison between two commits.
See also: AWS API Documentation
Request Syntax
response = client.get_comments_for_compared_commit(
repositoryName='string',
beforeCommitId='string',
afterCommitId='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The name of the repository where you want to compare commits.
[REQUIRED]
To establish the directionality of the comparison, the full commit ID of the after commit.
dict
Response Syntax
{
'commentsForComparedCommitData': [
{
'repositoryName': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'beforeBlobId': 'string',
'afterBlobId': 'string',
'location': {
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
'comments': [
{
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
},
]
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
commentsForComparedCommitData (list) --
A list of comment objects on the compared commit.
(dict) --
Returns information about comments on the comparison between two commits.
repositoryName (string) --
The name of the repository that contains the compared commits.
beforeCommitId (string) --
The full commit ID of the commit used to establish the before of the comparison.
afterCommitId (string) --
The full commit ID of the commit used to establish the after of the comparison.
beforeBlobId (string) --
The full blob ID of the commit used to establish the before of the comparison.
afterBlobId (string) --
The full blob ID of the commit used to establish the after of the comparison.
location (dict) --
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.
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change in a compared file, in line number format.
relativeFileVersion (string) --
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
comments (list) --
An array of comment objects. Each comment object contains information about a comment on the comparison between commits.
(dict) --
Returns information about a specific comment.
commentId (string) --
The system-generated comment ID.
content (string) --
The content of the comment.
inReplyTo (string) --
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) --
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) --
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) --
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) --
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (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.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
Exceptions
Returns comments made on a pull request.
See also: AWS API Documentation
Request Syntax
response = client.get_comments_for_pull_request(
pullRequestId='string',
repositoryName='string',
beforeCommitId='string',
afterCommitId='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
dict
Response Syntax
{
'commentsForPullRequestData': [
{
'pullRequestId': 'string',
'repositoryName': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'beforeBlobId': 'string',
'afterBlobId': 'string',
'location': {
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
'comments': [
{
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
},
]
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
commentsForPullRequestData (list) --
An array of comment objects on the pull request.
(dict) --
Returns information about comments on a pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
repositoryName (string) --
The name of the repository that contains the pull request.
beforeCommitId (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.
afterCommitId (string) --
The full commit ID of the commit that was the tip of the source branch at the time the comment was made.
beforeBlobId (string) --
The full blob ID of the file on which you want to comment on the destination commit.
afterBlobId (string) --
The full blob ID of the file on which you want to comment on the source commit.
location (dict) --
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).
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change in a compared file, in line number format.
relativeFileVersion (string) --
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
comments (list) --
An array of comment objects. Each comment object contains information about a comment on the pull request.
(dict) --
Returns information about a specific comment.
commentId (string) --
The system-generated comment ID.
content (string) --
The content of the comment.
inReplyTo (string) --
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) --
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) --
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) --
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) --
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (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.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
Exceptions
Returns information about a commit, including commit message and committer information.
See also: AWS API Documentation
Request Syntax
response = client.get_commit(
repositoryName='string',
commitId='string'
)
[REQUIRED]
The name of the repository to which the commit was made.
[REQUIRED]
The commit ID. Commit IDs are the full SHA ID of the commit.
dict
Response Syntax
{
'commit': {
'commitId': 'string',
'treeId': 'string',
'parents': [
'string',
],
'message': 'string',
'author': {
'name': 'string',
'email': 'string',
'date': 'string'
},
'committer': {
'name': 'string',
'email': 'string',
'date': 'string'
},
'additionalData': 'string'
}
}
Response Structure
(dict) --
Represents the output of a get commit operation.
commit (dict) --
A commit data type object that contains information about the specified commit.
commitId (string) --
The full SHA ID of the specified commit.
treeId (string) --
Tree information for the specified commit.
parents (list) --
A list of parent commits for the specified commit. Each parent commit ID is the full commit ID.
message (string) --
The commit message associated with the specified commit.
author (dict) --
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.
name (string) --
The name of the user who made the specified commit.
email (string) --
The email address associated with the user who made the commit, if any.
date (string) --
The date when the specified commit was commited, in timestamp format with GMT offset.
committer (dict) --
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.
name (string) --
The name of the user who made the specified commit.
email (string) --
The email address associated with the user who made the commit, if any.
date (string) --
The date when the specified commit was commited, in timestamp format with GMT offset.
additionalData (string) --
Any other data associated with the specified commit.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.get_differences(
repositoryName='string',
beforeCommitSpecifier='string',
afterCommitSpecifier='string',
beforePath='string',
afterPath='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The name of the repository where you want to get differences.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit.
dict
Response Syntax
{
'differences': [
{
'beforeBlob': {
'blobId': 'string',
'path': 'string',
'mode': 'string'
},
'afterBlob': {
'blobId': 'string',
'path': 'string',
'mode': 'string'
},
'changeType': 'A'|'M'|'D'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
differences (list) --
A data type object that contains information about the differences, including whether the difference is added, modified, or deleted (A, D, M).
(dict) --
Returns information about a set of differences for a commit specifier.
beforeBlob (dict) --
Information about a beforeBlob data type object, including the ID, the file mode permission code, and the path.
blobId (string) --
The full ID of the blob.
path (string) --
The path to the blob and associated file name, if any.
mode (string) --
The file mode permissions of the blob. File mode permission codes include:
afterBlob (dict) --
Information about an afterBlob data type object, including the ID, the file mode permission code, and the path.
blobId (string) --
The full ID of the blob.
path (string) --
The path to the blob and associated file name, if any.
mode (string) --
The file mode permissions of the blob. File mode permission codes include:
changeType (string) --
Whether the change type of the difference is an addition (A), deletion (D), or modification (M).
NextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
Exceptions
Returns the base-64 encoded contents of a specified file and its metadata.
See also: AWS API Documentation
Request Syntax
response = client.get_file(
repositoryName='string',
commitSpecifier='string',
filePath='string'
)
[REQUIRED]
The name of the repository that contains the file.
[REQUIRED]
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.
dict
Response Syntax
{
'commitId': 'string',
'blobId': 'string',
'filePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
'fileSize': 123,
'fileContent': b'bytes'
}
Response Structure
(dict) --
commitId (string) --
The full commit ID of the commit that contains the content returned by GetFile.
blobId (string) --
The blob ID of the object that represents the file content.
filePath (string) --
The fully qualified path to the specified file. Returns the name and extension of the file.
fileMode (string) --
The extrapolated file mode permissions of the blob. Valid values include strings such as EXECUTABLE and not numeric values.
Note
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.
fileSize (integer) --
The size of the contents of the file, in bytes.
fileContent (bytes) --
The base-64 encoded binary data object that represents the content of the file.
Exceptions
Returns the contents of a specified folder in a repository.
See also: AWS API Documentation
Request Syntax
response = client.get_folder(
repositoryName='string',
commitSpecifier='string',
folderPath='string'
)
[REQUIRED]
The name of the repository.
[REQUIRED]
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.
dict
Response Syntax
{
'commitId': 'string',
'folderPath': 'string',
'treeId': 'string',
'subFolders': [
{
'treeId': 'string',
'absolutePath': 'string',
'relativePath': 'string'
},
],
'files': [
{
'blobId': 'string',
'absolutePath': 'string',
'relativePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'symbolicLinks': [
{
'blobId': 'string',
'absolutePath': 'string',
'relativePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'subModules': [
{
'commitId': 'string',
'absolutePath': 'string',
'relativePath': 'string'
},
]
}
Response Structure
(dict) --
commitId (string) --
The full commit ID used as a reference for the returned version of the folder content.
folderPath (string) --
The fully qualified path of the folder whose contents are returned.
treeId (string) --
The full SHA-1 pointer of the tree information for the commit that contains the folder.
subFolders (list) --
The list of folders that exist under the specified folder, if any.
(dict) --
Returns information about a folder in a repository.
treeId (string) --
The full SHA-1 pointer of the tree information for the commit that contains the folder.
absolutePath (string) --
The fully qualified path of the folder in the repository.
relativePath (string) --
The relative path of the specified folder from the folder where the query originated.
files (list) --
The list of files in the specified folder, if any.
(dict) --
Returns information about a file in a repository.
blobId (string) --
The blob ID that contains the file information.
absolutePath (string) --
The fully qualified path to the file in the repository.
relativePath (string) --
The relative path of the file from the folder where the query originated.
fileMode (string) --
The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
symbolicLinks (list) --
The list of symbolic links to other files and folders in the specified folder, if any.
(dict) --
Returns information about a symbolic link in a repository folder.
blobId (string) --
The blob ID that contains the information about the symbolic link.
absolutePath (string) --
The fully qualified path to the folder that contains the symbolic link.
relativePath (string) --
The relative path of the symbolic link from the folder where the query originated.
fileMode (string) --
The file mode permissions of the blob that cotains information about the symbolic link.
subModules (list) --
The list of submodules in the specified folder, if any.
(dict) --
Returns information about a submodule reference in a repository folder.
commitId (string) --
The commit ID that contains the reference to the submodule.
absolutePath (string) --
The fully qualified path to the folder that contains the reference to the submodule.
relativePath (string) --
The relative path of the submodule from the folder where the query originated.
Exceptions
Returns information about a specified merge commit.
See also: AWS API Documentation
Request Syntax
response = client.get_merge_commit(
repositoryName='string',
sourceCommitSpecifier='string',
destinationCommitSpecifier='string',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE'
)
[REQUIRED]
The name of the repository that contains the merge commit about which you want to get information.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
dict
Response Syntax
{
'sourceCommitId': 'string',
'destinationCommitId': 'string',
'baseCommitId': 'string',
'mergedCommitId': 'string'
}
Response Structure
(dict) --
sourceCommitId (string) --
The commit ID of the source commit specifier that was used in the merge evaluation.
destinationCommitId (string) --
The commit ID of the destination commit specifier that was used in the merge evaluation.
baseCommitId (string) --
The commit ID of the merge base.
mergedCommitId (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.
Exceptions
Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
See also: AWS API Documentation
Request Syntax
response = client.get_merge_conflicts(
repositoryName='string',
destinationCommitSpecifier='string',
sourceCommitSpecifier='string',
mergeOption='FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
maxConflictFiles=123,
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
nextToken='string'
)
[REQUIRED]
The name of the repository where the pull request was created.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The merge option or strategy you want to use to merge the code.
dict
Response Syntax
{
'mergeable': True|False,
'destinationCommitId': 'string',
'sourceCommitId': 'string',
'baseCommitId': 'string',
'conflictMetadataList': [
{
'filePath': 'string',
'fileSizes': {
'source': 123,
'destination': 123,
'base': 123
},
'fileModes': {
'source': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
'destination': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
'base': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
'objectTypes': {
'source': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
'destination': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
'base': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK'
},
'numberOfConflicts': 123,
'isBinaryFile': {
'source': True|False,
'destination': True|False,
'base': True|False
},
'contentConflict': True|False,
'fileModeConflict': True|False,
'objectTypeConflict': True|False,
'mergeOperations': {
'source': 'A'|'M'|'D',
'destination': 'A'|'M'|'D'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
mergeable (boolean) --
A Boolean value that indicates whether the code is mergeable by the specified merge option.
destinationCommitId (string) --
The commit ID of the destination commit specifier that was used in the merge evaluation.
sourceCommitId (string) --
The commit ID of the source commit specifier that was used in the merge evaluation.
baseCommitId (string) --
The commit ID of the merge base.
conflictMetadataList (list) --
A list of metadata for any conflicting files. If the specified merge strategy is FAST_FORWARD_MERGE, this list is always empty.
(dict) --
Information about the metadata for a conflict in a merge operation.
filePath (string) --
The path of the file that contains conflicts.
fileSizes (dict) --
The file sizes of the file in the source, destination, and base of the merge.
source (integer) --
The size of a file in the source of a merge or pull request.
destination (integer) --
The size of a file in the destination of a merge or pull request.
base (integer) --
The size of a file in the base of a merge or pull request.
fileModes (dict) --
The file modes of the file in the source, destination, and base of the merge.
source (string) --
The file mode of a file in the source of a merge or pull request.
destination (string) --
The file mode of a file in the destination of a merge or pull request.
base (string) --
The file mode of a file in the base of a merge or pull request.
objectTypes (dict) --
Information about any object type conflicts in a merge operation.
source (string) --
The type of the object in the source branch.
destination (string) --
The type of the object in the destination branch.
base (string) --
The type of the object in the base commit of the merge.
numberOfConflicts (integer) --
The number of conflicts, including both hunk conflicts and metadata conflicts.
isBinaryFile (dict) --
A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and base of the merge.
source (boolean) --
The binary or non-binary status of file in the source of a merge or pull request.
destination (boolean) --
The binary or non-binary status of a file in the destination of a merge or pull request.
base (boolean) --
The binary or non-binary status of a file in the base of a merge or pull request.
contentConflict (boolean) --
A boolean value indicating whether there are conflicts in the content of a file.
fileModeConflict (boolean) --
A boolean value indicating whether there are conflicts in the file mode of a file.
objectTypeConflict (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.
mergeOperations (dict) --
Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.
source (string) --
The operation (add, modify, or delete) on a file in the source of a merge or pull request.
destination (string) --
The operation on a file in the destination of a merge or pull request.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.get_merge_options(
repositoryName='string',
sourceCommitSpecifier='string',
destinationCommitSpecifier='string',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE'
)
[REQUIRED]
The name of the repository that contains the commits about which you want to get merge options.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
dict
Response Syntax
{
'mergeOptions': [
'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
],
'sourceCommitId': 'string',
'destinationCommitId': 'string',
'baseCommitId': 'string'
}
Response Structure
(dict) --
mergeOptions (list) --
The merge option or strategy used to merge the code.
sourceCommitId (string) --
The commit ID of the source commit specifier that was used in the merge evaluation.
destinationCommitId (string) --
The commit ID of the destination commit specifier that was used in the merge evaluation.
baseCommitId (string) --
The commit ID of the merge base.
Exceptions
Create a paginator for an operation.
Gets information about a pull request in a specified repository.
See also: AWS API Documentation
Request Syntax
response = client.get_pull_request(
pullRequestId='string'
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
{
'pullRequest': {
'pullRequestId': 'string',
'title': 'string',
'description': 'string',
'lastActivityDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'pullRequestStatus': 'OPEN'|'CLOSED',
'authorArn': 'string',
'pullRequestTargets': [
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string',
'destinationCommit': 'string',
'sourceCommit': 'string',
'mergeBase': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
],
'clientRequestToken': 'string',
'revisionId': 'string',
'approvalRules': [
{
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
},
]
}
}
Response Structure
Information about the specified pull request.
The system-generated ID of the pull request.
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
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.
The day and time of the last user or system activity on the pull request, in timestamp format.
The date and time the pull request was originally created, in timestamp format.
The status of the pull request. Pull request status can only change from OPEN to CLOSED .
The Amazon Resource Name (ARN) of the user who created the pull request.
The targets of the pull request, including the source branch and destination branch for the pull request.
Returns information about a pull request target.
The name of the repository that contains the pull request source and destination branches.
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch.
The commit ID of the most recent commit that the source branch and the destination branch have in common.
Returns metadata about the state of the merge, including whether the merge has been made.
A Boolean value indicating whether the merge has been made.
The Amazon Resource Name (ARN) of the user who merged the branches.
The commit ID for the merge commit, if any.
The merge strategy used in the merge.
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 system-generated revision ID for the pull request.
The approval rules applied to the pull request.
Returns information about an approval rule.
The system-generated ID of the approval rule.
The name of the approval rule.
The content of the approval rule.
The SHA-256 hash signature for the content of the approval rule.
The date the approval rule was most recently changed, in timestamp format.
The date the approval rule was created, in timestamp format.
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
The approval rule template used to create the rule.
The ID of the template that created the approval rule.
The name of the template that created the approval rule.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.get_pull_request_approval_states(
pullRequestId='string',
revisionId='string'
)
[REQUIRED]
The system-generated ID for the pull request.
[REQUIRED]
The system-generated ID for the pull request revision.
dict
Response Syntax
{
'approvals': [
{
'userArn': 'string',
'approvalState': 'APPROVE'|'REVOKE'
},
]
}
Response Structure
(dict) --
approvals (list) --
Information about users who have approved the pull request.
(dict) --
Returns information about a specific approval on a pull request.
userArn (string) --
The Amazon Resource Name (ARN) of the user.
approvalState (string) --
The state of the approval, APPROVE or REVOKE. REVOKE states are not stored.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.get_pull_request_override_state(
pullRequestId='string',
revisionId='string'
)
[REQUIRED]
The ID of the pull request for which you want to get information about whether approval rules have been set aside (overridden).
[REQUIRED]
The system-generated ID of the revision for the pull request. To retrieve the most recent revision ID, use GetPullRequest .
dict
Response Syntax
{
'overridden': True|False,
'overrider': 'string'
}
Response Structure
(dict) --
overridden (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 (string) --
The Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.
Exceptions
Returns information about a repository.
Note
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.
See also: AWS API Documentation
Request Syntax
response = client.get_repository(
repositoryName='string'
)
[REQUIRED]
The name of the repository to get information about.
{
'repositoryMetadata': {
'accountId': 'string',
'repositoryId': 'string',
'repositoryName': 'string',
'repositoryDescription': 'string',
'defaultBranch': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'cloneUrlHttp': 'string',
'cloneUrlSsh': 'string',
'Arn': 'string'
}
}
Response Structure
Represents the output of a get repository operation.
Information about the repository.
The ID of the AWS account associated with the repository.
The ID of the repository.
The repository's name.
A comment or description about the repository.
The repository's default branch name.
The date and time the repository was last modified, in timestamp format.
The date and time the repository was created, in timestamp format.
The URL to use for cloning the repository over HTTPS.
The URL to use for cloning the repository over SSH.
The Amazon Resource Name (ARN) of the repository.
Exceptions
Gets information about triggers configured for a repository.
See also: AWS API Documentation
Request Syntax
response = client.get_repository_triggers(
repositoryName='string'
)
[REQUIRED]
The name of the repository for which the trigger is configured.
{
'configurationId': 'string',
'triggers': [
{
'name': 'string',
'destinationArn': 'string',
'customData': 'string',
'branches': [
'string',
],
'events': [
'all'|'updateReference'|'createReference'|'deleteReference',
]
},
]
}
Response Structure
Represents the output of a get repository triggers operation.
The system-generated unique ID for the trigger.
The JSON block of configuration information for each trigger.
Information about a trigger for a repository.
The name of the trigger.
The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
Note
Although no content is required in the array, you must include the array itself.
The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
Note
The valid value "all" cannot be used with any other values.
Exceptions
Returns an object that can wait for some condition.
Lists all approval rule templates in the specified AWS Region in your AWS account. If an AWS Region is not specified, the AWS Region where you are signed in is used.
See also: AWS API Documentation
Request Syntax
response = client.list_approval_rule_templates(
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'approvalRuleTemplateNames': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
approvalRuleTemplateNames (list) --
The names of all the approval rule templates found in the AWS Region for your AWS account.
nextToken (string) --
An enumeration token that allows the operation to batch the next results of the operation.
Exceptions
Lists all approval rule templates that are associated with a specified repository.
See also: AWS API Documentation
Request Syntax
response = client.list_associated_approval_rule_templates_for_repository(
repositoryName='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The name of the repository for which you want to list all associated approval rule templates.
dict
Response Syntax
{
'approvalRuleTemplateNames': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
approvalRuleTemplateNames (list) --
The names of all approval rule templates associated with the repository.
nextToken (string) --
An enumeration token that allows the operation to batch the next results of the operation.
Exceptions
Gets information about one or more branches in a repository.
See also: AWS API Documentation
Request Syntax
response = client.list_branches(
repositoryName='string',
nextToken='string'
)
[REQUIRED]
The name of the repository that contains the branches.
dict
Response Syntax
{
'branches': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a list branches operation.
branches (list) --
The list of branch names.
nextToken (string) --
An enumeration token that returns the batch of the results.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.list_pull_requests(
repositoryName='string',
authorArn='string',
pullRequestStatus='OPEN'|'CLOSED',
nextToken='string',
maxResults=123
)
[REQUIRED]
The name of the repository for which you want to list pull requests.
dict
Response Syntax
{
'pullRequestIds': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
pullRequestIds (list) --
The system-generated IDs of the pull requests.
nextToken (string) --
An enumeration token that allows the operation to batch the next results of the operation.
Exceptions
Gets information about one or more repositories.
See also: AWS API Documentation
Request Syntax
response = client.list_repositories(
nextToken='string',
sortBy='repositoryName'|'lastModifiedDate',
order='ascending'|'descending'
)
dict
Response Syntax
{
'repositories': [
{
'repositoryName': 'string',
'repositoryId': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a list repositories operation.
repositories (list) --
Lists the repositories called by the list repositories operation.
(dict) --
Information about a repository name and ID.
repositoryName (string) --
The name associated with the repository.
repositoryId (string) --
The ID associated with the repository.
nextToken (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 AWS CodeCommit, another page of 1,000 records is retrieved.
Exceptions
Lists all repositories associated with the specified approval rule template.
See also: AWS API Documentation
Request Syntax
response = client.list_repositories_for_approval_rule_template(
approvalRuleTemplateName='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The name of the approval rule template for which you want to list repositories that are associated with that template.
dict
Response Syntax
{
'repositoryNames': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
repositoryNames (list) --
A list of repository names that are associated with the specified approval rule template.
nextToken (string) --
An enumeration token that allows the operation to batch the next results of the operation.
Exceptions
Gets information about AWS tags for a specified Amazon Resource Name (ARN) in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the*AWS CodeCommit User Guide* .
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceArn='string',
nextToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource for which you want to get information about tags, if any.
dict
Response Syntax
{
'tags': {
'string': 'string'
},
'nextToken': 'string'
}
Response Structure
(dict) --
tags (dict) --
A list of tag key and value pairs associated with the specified resource.
nextToken (string) --
An enumeration token that allows the operation to batch the next results of the operation.
Exceptions
Merges two branches using the fast-forward merge strategy.
See also: AWS API Documentation
Request Syntax
response = client.merge_branches_by_fast_forward(
repositoryName='string',
sourceCommitSpecifier='string',
destinationCommitSpecifier='string',
targetBranch='string'
)
[REQUIRED]
The name of the repository where you want to merge two branches.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
dict
Response Syntax
{
'commitId': 'string',
'treeId': 'string'
}
Response Structure
(dict) --
commitId (string) --
The commit ID of the merge in the destination or target branch.
treeId (string) --
The tree ID of the merge in the destination or target branch.
Exceptions
Merges two branches using the squash merge strategy.
See also: AWS API Documentation
Request Syntax
response = client.merge_branches_by_squash(
repositoryName='string',
sourceCommitSpecifier='string',
destinationCommitSpecifier='string',
targetBranch='string',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
authorName='string',
email='string',
commitMessage='string',
keepEmptyFolders=True|False,
conflictResolution={
'replaceContents': [
{
'filePath': 'string',
'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
'content': b'bytes',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'deleteFiles': [
{
'filePath': 'string'
},
],
'setFileModes': [
{
'filePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
]
}
)
[REQUIRED]
The name of the repository where you want to merge two branches.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
Files to have content replaced as part of the merge conflict resolution.
Information about a replacement content entry in the conflict of a merge or pull request operation.
The path of the conflicting file.
The replacement type to use when determining how to resolve the conflict.
The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.
The file mode to apply during conflict resoltion.
Files to be deleted as part of the merge conflict resolution.
A file that is deleted as part of a commit.
The full path of the file to be deleted, including the name of the file.
File modes that are set as part of the merge conflict resolution.
Information about the file mode changes.
The full path to the file, including the name of the file.
The file mode for the file.
dict
Response Syntax
{
'commitId': 'string',
'treeId': 'string'
}
Response Structure
(dict) --
commitId (string) --
The commit ID of the merge in the destination or target branch.
treeId (string) --
The tree ID of the merge in the destination or target branch.
Exceptions
Merges two specified branches using the three-way merge strategy.
See also: AWS API Documentation
Request Syntax
response = client.merge_branches_by_three_way(
repositoryName='string',
sourceCommitSpecifier='string',
destinationCommitSpecifier='string',
targetBranch='string',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
authorName='string',
email='string',
commitMessage='string',
keepEmptyFolders=True|False,
conflictResolution={
'replaceContents': [
{
'filePath': 'string',
'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
'content': b'bytes',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'deleteFiles': [
{
'filePath': 'string'
},
],
'setFileModes': [
{
'filePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
]
}
)
[REQUIRED]
The name of the repository where you want to merge two branches.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
Files to have content replaced as part of the merge conflict resolution.
Information about a replacement content entry in the conflict of a merge or pull request operation.
The path of the conflicting file.
The replacement type to use when determining how to resolve the conflict.
The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.
The file mode to apply during conflict resoltion.
Files to be deleted as part of the merge conflict resolution.
A file that is deleted as part of a commit.
The full path of the file to be deleted, including the name of the file.
File modes that are set as part of the merge conflict resolution.
Information about the file mode changes.
The full path to the file, including the name of the file.
The file mode for the file.
dict
Response Syntax
{
'commitId': 'string',
'treeId': 'string'
}
Response Structure
(dict) --
commitId (string) --
The commit ID of the merge in the destination or target branch.
treeId (string) --
The tree ID of the merge in the destination or target branch.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.merge_pull_request_by_fast_forward(
pullRequestId='string',
repositoryName='string',
sourceCommitId='string'
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
[REQUIRED]
The name of the repository where the pull request was created.
dict
Response Syntax
{
'pullRequest': {
'pullRequestId': 'string',
'title': 'string',
'description': 'string',
'lastActivityDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'pullRequestStatus': 'OPEN'|'CLOSED',
'authorArn': 'string',
'pullRequestTargets': [
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string',
'destinationCommit': 'string',
'sourceCommit': 'string',
'mergeBase': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
],
'clientRequestToken': 'string',
'revisionId': 'string',
'approvalRules': [
{
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
},
]
}
}
Response Structure
(dict) --
pullRequest (dict) --
Information about the specified pull request, including the merge.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
description (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 (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED .
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
clientRequestToken (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.
revisionId (string) --
The system-generated revision ID for the pull request.
approvalRules (list) --
The approval rules applied to the pull request.
(dict) --
Returns information about an approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.merge_pull_request_by_squash(
pullRequestId='string',
repositoryName='string',
sourceCommitId='string',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
commitMessage='string',
authorName='string',
email='string',
keepEmptyFolders=True|False,
conflictResolution={
'replaceContents': [
{
'filePath': 'string',
'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
'content': b'bytes',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'deleteFiles': [
{
'filePath': 'string'
},
],
'setFileModes': [
{
'filePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
]
}
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
[REQUIRED]
The name of the repository where the pull request was created.
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
Files to have content replaced as part of the merge conflict resolution.
Information about a replacement content entry in the conflict of a merge or pull request operation.
The path of the conflicting file.
The replacement type to use when determining how to resolve the conflict.
The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.
The file mode to apply during conflict resoltion.
Files to be deleted as part of the merge conflict resolution.
A file that is deleted as part of a commit.
The full path of the file to be deleted, including the name of the file.
File modes that are set as part of the merge conflict resolution.
Information about the file mode changes.
The full path to the file, including the name of the file.
The file mode for the file.
dict
Response Syntax
{
'pullRequest': {
'pullRequestId': 'string',
'title': 'string',
'description': 'string',
'lastActivityDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'pullRequestStatus': 'OPEN'|'CLOSED',
'authorArn': 'string',
'pullRequestTargets': [
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string',
'destinationCommit': 'string',
'sourceCommit': 'string',
'mergeBase': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
],
'clientRequestToken': 'string',
'revisionId': 'string',
'approvalRules': [
{
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
},
]
}
}
Response Structure
(dict) --
pullRequest (dict) --
Returns information about a pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
description (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 (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED .
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
clientRequestToken (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.
revisionId (string) --
The system-generated revision ID for the pull request.
approvalRules (list) --
The approval rules applied to the pull request.
(dict) --
Returns information about an approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.merge_pull_request_by_three_way(
pullRequestId='string',
repositoryName='string',
sourceCommitId='string',
conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
commitMessage='string',
authorName='string',
email='string',
keepEmptyFolders=True|False,
conflictResolution={
'replaceContents': [
{
'filePath': 'string',
'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
'content': b'bytes',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
],
'deleteFiles': [
{
'filePath': 'string'
},
],
'setFileModes': [
{
'filePath': 'string',
'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
},
]
}
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
[REQUIRED]
The name of the repository where the pull request was created.
If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.
Files to have content replaced as part of the merge conflict resolution.
Information about a replacement content entry in the conflict of a merge or pull request operation.
The path of the conflicting file.
The replacement type to use when determining how to resolve the conflict.
The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.
The file mode to apply during conflict resoltion.
Files to be deleted as part of the merge conflict resolution.
A file that is deleted as part of a commit.
The full path of the file to be deleted, including the name of the file.
File modes that are set as part of the merge conflict resolution.
Information about the file mode changes.
The full path to the file, including the name of the file.
The file mode for the file.
dict
Response Syntax
{
'pullRequest': {
'pullRequestId': 'string',
'title': 'string',
'description': 'string',
'lastActivityDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'pullRequestStatus': 'OPEN'|'CLOSED',
'authorArn': 'string',
'pullRequestTargets': [
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string',
'destinationCommit': 'string',
'sourceCommit': 'string',
'mergeBase': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
],
'clientRequestToken': 'string',
'revisionId': 'string',
'approvalRules': [
{
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
},
]
}
}
Response Structure
(dict) --
pullRequest (dict) --
Returns information about a pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
description (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 (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED .
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
clientRequestToken (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.
revisionId (string) --
The system-generated revision ID for the pull request.
approvalRules (list) --
The approval rules applied to the pull request.
(dict) --
Returns information about an approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
Sets aside (overrides) all approval rule requirements for a specified pull request.
See also: AWS API Documentation
Request Syntax
response = client.override_pull_request_approval_rules(
pullRequestId='string',
revisionId='string',
overrideStatus='OVERRIDE'|'REVOKE'
)
[REQUIRED]
The system-generated ID of the pull request for which you want to override all approval rule requirements. To get this information, use GetPullRequest .
[REQUIRED]
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.
[REQUIRED]
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.
None
Exceptions
Posts a comment on the comparison between two commits.
See also: AWS API Documentation
Request Syntax
response = client.post_comment_for_compared_commit(
repositoryName='string',
beforeCommitId='string',
afterCommitId='string',
location={
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
content='string',
clientRequestToken='string'
)
[REQUIRED]
The name of the repository where you want to post a comment on the comparison between commits.
[REQUIRED]
To establish the directionality of the comparison, the full commit ID of the after commit.
The location of the comparison where you want to comment.
The name of the file being compared, including its extension and subdirectory, if any.
The position of a change in a compared file, in line number format.
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
[REQUIRED]
The content of the comment you want to make.
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.
This field is autopopulated if not provided.
dict
Response Syntax
{
'repositoryName': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'beforeBlobId': 'string',
'afterBlobId': 'string',
'location': {
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
'comment': {
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
}
}
Response Structure
(dict) --
repositoryName (string) --
The name of the repository where you posted a comment on the comparison between commits.
beforeCommitId (string) --
In the directionality you established, the full commit ID of the before commit.
afterCommitId (string) --
In the directionality you established, the full commit ID of the after commit.
beforeBlobId (string) --
In the directionality you established, the blob ID of the before blob.
afterBlobId (string) --
In the directionality you established, the blob ID of the after blob.
location (dict) --
The location of the comment in the comparison between the two commits.
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change in a compared file, in line number format.
relativeFileVersion (string) --
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
comment (dict) --
The content of the comment you posted.
commentId (string) --
The system-generated comment ID.
content (string) --
The content of the comment.
inReplyTo (string) --
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) --
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) --
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) --
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) --
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (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.
Exceptions
Posts a comment on a pull request.
See also: AWS API Documentation
Request Syntax
response = client.post_comment_for_pull_request(
pullRequestId='string',
repositoryName='string',
beforeCommitId='string',
afterCommitId='string',
location={
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
content='string',
clientRequestToken='string'
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
[REQUIRED]
The name of the repository where you want to post a comment on a pull request.
[REQUIRED]
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.
[REQUIRED]
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.
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.
The name of the file being compared, including its extension and subdirectory, if any.
The position of a change in a compared file, in line number format.
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
[REQUIRED]
The content of your comment on the change.
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.
This field is autopopulated if not provided.
dict
Response Syntax
{
'repositoryName': 'string',
'pullRequestId': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'beforeBlobId': 'string',
'afterBlobId': 'string',
'location': {
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
'comment': {
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
}
}
Response Structure
(dict) --
repositoryName (string) --
The name of the repository where you posted a comment on a pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
beforeCommitId (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.
afterCommitId (string) --
The full commit ID of the commit in the destination branch where the pull request is merged.
beforeBlobId (string) --
In the directionality of the pull request, the blob ID of the before blob.
afterBlobId (string) --
In the directionality of the pull request, the blob ID of the after blob.
location (dict) --
The location of the change where you posted your comment.
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change in a compared file, in line number format.
relativeFileVersion (string) --
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
comment (dict) --
The content of the comment you posted.
commentId (string) --
The system-generated comment ID.
content (string) --
The content of the comment.
inReplyTo (string) --
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) --
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) --
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) --
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) --
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (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.
Exceptions
Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
See also: AWS API Documentation
Request Syntax
response = client.post_comment_reply(
inReplyTo='string',
clientRequestToken='string',
content='string'
)
[REQUIRED]
The system-generated ID of the comment to which you want to reply. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest .
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.
This field is autopopulated if not provided.
[REQUIRED]
The contents of your reply to a comment.
dict
Response Syntax
{
'comment': {
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
}
}
Response Structure
(dict) --
comment (dict) --
Information about the reply to a comment.
commentId (string) --
The system-generated comment ID.
content (string) --
The content of the comment.
inReplyTo (string) --
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) --
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) --
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) --
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) --
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (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.
Exceptions
Adds or updates a file in a branch in an AWS CodeCommit repository, and generates a commit for the addition in the specified branch.
See also: AWS API Documentation
Request Syntax
response = client.put_file(
repositoryName='string',
branchName='string',
fileContent=b'bytes',
filePath='string',
fileMode='EXECUTABLE'|'NORMAL'|'SYMLINK',
parentCommitId='string',
commitMessage='string',
name='string',
email='string'
)
[REQUIRED]
The name of the repository where you want to add or update the file.
[REQUIRED]
The name of the branch where you want to add or update the file. If this is an empty repository, this branch is created.
[REQUIRED]
The content of the file, in binary object format.
[REQUIRED]
The name of the file you want to add or update, including the relative path to the file in the repository.
Note
If the path does not currently exist in the repository, the path is created as part of adding the file.
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.
dict
Response Syntax
{
'commitId': 'string',
'blobId': 'string',
'treeId': 'string'
}
Response Structure
(dict) --
commitId (string) --
The full SHA ID of the commit that contains this file change.
blobId (string) --
The ID of the blob, which is its SHA-1 pointer.
treeId (string) --
The full SHA-1 pointer of the tree information for the commit that contains this file change.
Exceptions
Replaces all triggers for a repository. Used to create or delete triggers.
See also: AWS API Documentation
Request Syntax
response = client.put_repository_triggers(
repositoryName='string',
triggers=[
{
'name': 'string',
'destinationArn': 'string',
'customData': 'string',
'branches': [
'string',
],
'events': [
'all'|'updateReference'|'createReference'|'deleteReference',
]
},
]
)
[REQUIRED]
The name of the repository where you want to create or update the trigger.
[REQUIRED]
The JSON block of configuration information for each trigger.
Information about a trigger for a repository.
The name of the trigger.
The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
Note
Although no content is required in the array, you must include the array itself.
The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
Note
The valid value "all" cannot be used with any other values.
dict
Response Syntax
{
'configurationId': 'string'
}
Response Structure
(dict) --
Represents the output of a put repository triggers operation.
configurationId (string) --
The system-generated unique ID for the create or update operation.
Exceptions
Adds or updates tags for a resource in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide .
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceArn='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to which you want to add or update tags.
[REQUIRED]
The key-value pair to use when tagging this repository.
None
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.test_repository_triggers(
repositoryName='string',
triggers=[
{
'name': 'string',
'destinationArn': 'string',
'customData': 'string',
'branches': [
'string',
],
'events': [
'all'|'updateReference'|'createReference'|'deleteReference',
]
},
]
)
[REQUIRED]
The name of the repository in which to test the triggers.
[REQUIRED]
The list of triggers to test.
Information about a trigger for a repository.
The name of the trigger.
The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
Note
Although no content is required in the array, you must include the array itself.
The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
Note
The valid value "all" cannot be used with any other values.
dict
Response Syntax
{
'successfulExecutions': [
'string',
],
'failedExecutions': [
{
'trigger': 'string',
'failureMessage': 'string'
},
]
}
Response Structure
(dict) --
Represents the output of a test repository triggers operation.
successfulExecutions (list) --
The list of triggers that were successfully tested. This list provides the names of the triggers that were successfully tested, separated by commas.
failedExecutions (list) --
The list of triggers that were not tested. This list provides the names of the triggers that could not be tested, separated by commas.
(dict) --
A trigger failed to run.
trigger (string) --
The name of the trigger that did not run.
failureMessage (string) --
Message information about the trigger that did not run.
Exceptions
Removes tags for a resource in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide .
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to which you want to remove tags.
[REQUIRED]
The tag key for each tag that you want to remove from the resource.
None
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.update_approval_rule_template_content(
approvalRuleTemplateName='string',
newRuleContent='string',
existingRuleContentSha256='string'
)
[REQUIRED]
The name of the approval rule template where you want to update the content of the rule.
[REQUIRED]
The content that replaces the existing content of the rule. Content statements must be complete. You cannot provide only the changes.
dict
Response Syntax
{
'approvalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string',
'approvalRuleTemplateDescription': 'string',
'approvalRuleTemplateContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string'
}
}
Response Structure
(dict) --
approvalRuleTemplate (dict) --
Returns information about an approval rule template.
approvalRuleTemplateId (string) --
The system-generated ID of the approval rule template.
approvalRuleTemplateName (string) --
The name of the approval rule template.
approvalRuleTemplateDescription (string) --
The description of the approval rule template.
approvalRuleTemplateContent (string) --
The content of the approval rule template.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule template.
lastModifiedDate (datetime) --
The date the approval rule template was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule template was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
Exceptions
Updates the description for a specified approval rule template.
See also: AWS API Documentation
Request Syntax
response = client.update_approval_rule_template_description(
approvalRuleTemplateName='string',
approvalRuleTemplateDescription='string'
)
[REQUIRED]
The name of the template for which you want to update the description.
[REQUIRED]
The updated description of the approval rule template.
dict
Response Syntax
{
'approvalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string',
'approvalRuleTemplateDescription': 'string',
'approvalRuleTemplateContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string'
}
}
Response Structure
(dict) --
approvalRuleTemplate (dict) --
The structure and content of the updated approval rule template.
approvalRuleTemplateId (string) --
The system-generated ID of the approval rule template.
approvalRuleTemplateName (string) --
The name of the approval rule template.
approvalRuleTemplateDescription (string) --
The description of the approval rule template.
approvalRuleTemplateContent (string) --
The content of the approval rule template.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule template.
lastModifiedDate (datetime) --
The date the approval rule template was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule template was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
Exceptions
Updates the name of a specified approval rule template.
See also: AWS API Documentation
Request Syntax
response = client.update_approval_rule_template_name(
oldApprovalRuleTemplateName='string',
newApprovalRuleTemplateName='string'
)
[REQUIRED]
The current name of the approval rule template.
[REQUIRED]
The new name you want to apply to the approval rule template.
dict
Response Syntax
{
'approvalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string',
'approvalRuleTemplateDescription': 'string',
'approvalRuleTemplateContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string'
}
}
Response Structure
(dict) --
approvalRuleTemplate (dict) --
The structure and content of the updated approval rule template.
approvalRuleTemplateId (string) --
The system-generated ID of the approval rule template.
approvalRuleTemplateName (string) --
The name of the approval rule template.
approvalRuleTemplateDescription (string) --
The description of the approval rule template.
approvalRuleTemplateContent (string) --
The content of the approval rule template.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule template.
lastModifiedDate (datetime) --
The date the approval rule template was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule template was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
Exceptions
Replaces the contents of a comment.
See also: AWS API Documentation
Request Syntax
response = client.update_comment(
commentId='string',
content='string'
)
[REQUIRED]
The system-generated ID of the comment you want to update. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest .
[REQUIRED]
The updated content to replace the existing content of the comment.
dict
Response Syntax
{
'comment': {
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
}
}
Response Structure
(dict) --
comment (dict) --
Information about the updated comment.
commentId (string) --
The system-generated comment ID.
content (string) --
The content of the comment.
inReplyTo (string) --
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) --
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) --
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) --
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) --
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (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.
Exceptions
Sets or changes the default branch name for the specified repository.
Note
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.
See also: AWS API Documentation
Request Syntax
response = client.update_default_branch(
repositoryName='string',
defaultBranchName='string'
)
[REQUIRED]
The name of the repository to set or change the default branch for.
[REQUIRED]
The name of the branch to set as the default.
None
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.update_pull_request_approval_rule_content(
pullRequestId='string',
approvalRuleName='string',
existingRuleContentSha256='string',
newRuleContent='string'
)
[REQUIRED]
The system-generated ID of the pull request.
[REQUIRED]
The name of the approval rule you want to update.
[REQUIRED]
The updated content for the approval rule.
Note
When you update the content of the approval rule, you can specify approvers in an approval pool in one of two ways:
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).
For more information about IAM ARNs, wildcards, and formats, see IAM Identifiers in the IAM User Guide .
dict
Response Syntax
{
'approvalRule': {
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
}
}
Response Structure
(dict) --
approvalRule (dict) --
Information about the updated approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.update_pull_request_approval_state(
pullRequestId='string',
revisionId='string',
approvalState='APPROVE'|'REVOKE'
)
[REQUIRED]
The system-generated ID of the pull request.
[REQUIRED]
The system-generated ID of the revision.
[REQUIRED]
The approval state to associate with the user on the pull request.
None
Exceptions
Replaces the contents of the description of a pull request.
See also: AWS API Documentation
Request Syntax
response = client.update_pull_request_description(
pullRequestId='string',
description='string'
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
[REQUIRED]
The updated content of the description for the pull request. This content replaces the existing description.
dict
Response Syntax
{
'pullRequest': {
'pullRequestId': 'string',
'title': 'string',
'description': 'string',
'lastActivityDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'pullRequestStatus': 'OPEN'|'CLOSED',
'authorArn': 'string',
'pullRequestTargets': [
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string',
'destinationCommit': 'string',
'sourceCommit': 'string',
'mergeBase': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
],
'clientRequestToken': 'string',
'revisionId': 'string',
'approvalRules': [
{
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
},
]
}
}
Response Structure
(dict) --
pullRequest (dict) --
Information about the updated pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
description (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 (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED .
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
clientRequestToken (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.
revisionId (string) --
The system-generated revision ID for the pull request.
approvalRules (list) --
The approval rules applied to the pull request.
(dict) --
Returns information about an approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
Updates the status of a pull request.
See also: AWS API Documentation
Request Syntax
response = client.update_pull_request_status(
pullRequestId='string',
pullRequestStatus='OPEN'|'CLOSED'
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
[REQUIRED]
The status of the pull request. The only valid operations are to update the status from OPEN to OPEN , OPEN to CLOSED or from CLOSED to CLOSED .
dict
Response Syntax
{
'pullRequest': {
'pullRequestId': 'string',
'title': 'string',
'description': 'string',
'lastActivityDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'pullRequestStatus': 'OPEN'|'CLOSED',
'authorArn': 'string',
'pullRequestTargets': [
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string',
'destinationCommit': 'string',
'sourceCommit': 'string',
'mergeBase': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
],
'clientRequestToken': 'string',
'revisionId': 'string',
'approvalRules': [
{
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
},
]
}
}
Response Structure
(dict) --
pullRequest (dict) --
Information about the pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
description (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 (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED .
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
clientRequestToken (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.
revisionId (string) --
The system-generated revision ID for the pull request.
approvalRules (list) --
The approval rules applied to the pull request.
(dict) --
Returns information about an approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
Replaces the title of a pull request.
See also: AWS API Documentation
Request Syntax
response = client.update_pull_request_title(
pullRequestId='string',
title='string'
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
[REQUIRED]
The updated title of the pull request. This replaces the existing title.
dict
Response Syntax
{
'pullRequest': {
'pullRequestId': 'string',
'title': 'string',
'description': 'string',
'lastActivityDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'pullRequestStatus': 'OPEN'|'CLOSED',
'authorArn': 'string',
'pullRequestTargets': [
{
'repositoryName': 'string',
'sourceReference': 'string',
'destinationReference': 'string',
'destinationCommit': 'string',
'sourceCommit': 'string',
'mergeBase': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
],
'clientRequestToken': 'string',
'revisionId': 'string',
'approvalRules': [
{
'approvalRuleId': 'string',
'approvalRuleName': 'string',
'approvalRuleContent': 'string',
'ruleContentSha256': 'string',
'lastModifiedDate': datetime(2015, 1, 1),
'creationDate': datetime(2015, 1, 1),
'lastModifiedUser': 'string',
'originApprovalRuleTemplate': {
'approvalRuleTemplateId': 'string',
'approvalRuleTemplateName': 'string'
}
},
]
}
}
Response Structure
(dict) --
pullRequest (dict) --
Information about the updated pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users.
description (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 (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED .
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes are merged. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
clientRequestToken (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.
revisionId (string) --
The system-generated revision ID for the pull request.
approvalRules (list) --
The approval rules applied to the pull request.
(dict) --
Returns information about an approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
ruleContentSha256 (string) --
The SHA-256 hash signature for the content of the approval rule.
lastModifiedDate (datetime) --
The date the approval rule was most recently changed, in timestamp format.
creationDate (datetime) --
The date the approval rule was created, in timestamp format.
lastModifiedUser (string) --
The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.
originApprovalRuleTemplate (dict) --
The approval rule template used to create the rule.
approvalRuleTemplateId (string) --
The ID of the template that created the approval rule.
approvalRuleTemplateName (string) --
The name of the template that created the approval rule.
Exceptions
Sets or changes the comment or description for a repository.
Note
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.
See also: AWS API Documentation
Request Syntax
response = client.update_repository_description(
repositoryName='string',
repositoryDescription='string'
)
[REQUIRED]
The name of the repository to set or change the comment or description for.
None
Exceptions
Renames a repository. The repository name must be unique across the calling AWS 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 Limits in the AWS CodeCommit User Guide.
See also: AWS API Documentation
Request Syntax
response = client.update_repository_name(
oldName='string',
newName='string'
)
[REQUIRED]
The current name of the repository.
[REQUIRED]
The new name for the repository.
None
Exceptions
Client exceptions are available on a client instance via the exceptions property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
The available client exceptions are:
The specified Amazon Resource Name (ARN) does not exist in the AWS account.
Example
try:
...
except client.exceptions.ActorDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified Amazon Resource Name (ARN) does not exist in the AWS account.
The content for the approval rule is empty. You must provide some content for an approval rule. The content cannot be null.
Example
try:
...
except client.exceptions.ApprovalRuleContentRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The content for the approval rule is empty. You must provide some content for an approval rule. The content cannot be null.
The specified approval rule does not exist.
Example
try:
...
except client.exceptions.ApprovalRuleDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified approval rule does not exist.
An approval rule with that name already exists. Approval rule names must be unique within the scope of a pull request.
Example
try:
...
except client.exceptions.ApprovalRuleNameAlreadyExistsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
An approval rule with that name already exists. Approval rule names must be unique within the scope of a pull request.
An approval rule name is required, but was not specified.
Example
try:
...
except client.exceptions.ApprovalRuleNameRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
An approval rule name is required, but was not specified.
The content for the approval rule template is empty. You must provide some content for an approval rule template. The content cannot be null.
Example
try:
...
except client.exceptions.ApprovalRuleTemplateContentRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The content for the approval rule template is empty. You must provide some content for an approval rule template. The content cannot be null.
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the AWS Region where the template was created, and then try again.
Example
try:
...
except client.exceptions.ApprovalRuleTemplateDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the AWS Region where the template was created, and then try again.
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.
Example
try:
...
except client.exceptions.ApprovalRuleTemplateInUseException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
You cannot create an approval rule template with that name because a template with that name already exists in this AWS Region for your AWS account. Approval rule template names must be unique.
Example
try:
...
except client.exceptions.ApprovalRuleTemplateNameAlreadyExistsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
You cannot create an approval rule template with that name because a template with that name already exists in this AWS Region for your AWS account. Approval rule template names must be unique.
An approval rule template name is required, but was not specified.
Example
try:
...
except client.exceptions.ApprovalRuleTemplateNameRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
An approval rule template name is required, but was not specified.
An approval state is required, but was not specified.
Example
try:
...
except client.exceptions.ApprovalStateRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
An approval state is required, but was not specified.
The specified Amazon Resource Name (ARN) does not exist in the AWS account.
Example
try:
...
except client.exceptions.AuthorDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified Amazon Resource Name (ARN) does not exist in the AWS account.
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.
Example
try:
...
except client.exceptions.BeforeCommitIdAndAfterCommitIdAreSameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The specified blob does not exist.
Example
try:
...
except client.exceptions.BlobIdDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified blob does not exist.
A blob ID is required, but was not specified.
Example
try:
...
except client.exceptions.BlobIdRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A blob ID is required, but was not specified.
The specified branch does not exist.
Example
try:
...
except client.exceptions.BranchDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified branch does not exist.
The specified branch name already exists.
Example
try:
...
except client.exceptions.BranchNameExistsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified branch name already exists.
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 .
Example
try:
...
except client.exceptions.BranchNameIsTagNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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 .
A branch name is required, but was not specified.
Example
try:
...
except client.exceptions.BranchNameRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A branch name is required, but was not specified.
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.
Example
try:
...
except client.exceptions.CannotDeleteApprovalRuleFromTemplateException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.CannotModifyApprovalRuleFromTemplateException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.ClientRequestTokenRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The comment is empty. You must provide some content for a comment. The content cannot be null.
Example
try:
...
except client.exceptions.CommentContentRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The comment is empty. You must provide some content for a comment. The content cannot be null.
The comment is too large. Comments are limited to 1,000 characters.
Example
try:
...
except client.exceptions.CommentContentSizeLimitExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The comment is too large. Comments are limited to 1,000 characters.
This comment has already been deleted. You cannot edit or delete a deleted comment.
Example
try:
...
except client.exceptions.CommentDeletedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
This comment has already been deleted. You cannot edit or delete a deleted comment.
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
Example
try:
...
except client.exceptions.CommentDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
The comment ID is missing or null. A comment ID is required.
Example
try:
...
except client.exceptions.CommentIdRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The comment ID is missing or null. A comment ID is required.
You cannot modify or delete this comment. Only comment authors can modify or delete their comments.
Example
try:
...
except client.exceptions.CommentNotCreatedByCallerException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
You cannot modify or delete this comment. Only comment authors can modify or delete their comments.
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
Example
try:
...
except client.exceptions.CommitDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
The specified commit ID does not exist.
Example
try:
...
except client.exceptions.CommitIdDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified commit ID does not exist.
A commit ID was not specified.
Example
try:
...
except client.exceptions.CommitIdRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A commit ID was not specified.
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.
Example
try:
...
except client.exceptions.CommitIdsLimitExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
A list of commit IDs is required, but was either not specified or the list was empty.
Example
try:
...
except client.exceptions.CommitIdsListRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A list of commit IDs is required, but was either not specified or the list was empty.
The commit message is too long. Provide a shorter string.
Example
try:
...
except client.exceptions.CommitMessageLengthExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The commit message is too long. Provide a shorter string.
A commit was not specified.
Example
try:
...
except client.exceptions.CommitRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A commit was not specified.
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.
Example
try:
...
except client.exceptions.ConcurrentReferenceUpdateException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.DefaultBranchCannotBeDeletedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.DirectoryNameConflictsWithFileNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
An encryption integrity check failed.
Example
try:
...
except client.exceptions.EncryptionIntegrityChecksFailedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
An encryption integrity check failed.
An encryption key could not be accessed.
Example
try:
...
except client.exceptions.EncryptionKeyAccessDeniedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
An encryption key could not be accessed.
The encryption key is disabled.
Example
try:
...
except client.exceptions.EncryptionKeyDisabledException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The encryption key is disabled.
No encryption key was found.
Example
try:
...
except client.exceptions.EncryptionKeyNotFoundException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
No encryption key was found.
The encryption key is not available.
Example
try:
...
except client.exceptions.EncryptionKeyUnavailableException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The encryption key is not available.
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.
Example
try:
...
except client.exceptions.FileContentAndSourceFileSpecifiedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The file cannot be added because it is empty. Empty files cannot be added to the repository with this API.
Example
try:
...
except client.exceptions.FileContentRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The file cannot be added because it is empty. Empty files cannot be added to the repository with this API.
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.
Example
try:
...
except client.exceptions.FileContentSizeLimitExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The specified file does not exist. Verify that you have used the correct file name, full path, and extension.
Example
try:
...
except client.exceptions.FileDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified file does not exist. Verify that you have used the correct file name, full path, and extension.
The commit cannot be created because no files have been specified as added, updated, or changed (PutFile or DeleteFile) for the commit.
Example
try:
...
except client.exceptions.FileEntryRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The commit cannot be created because no files have been specified as added, updated, or changed (PutFile or DeleteFile) for the commit.
The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.
Example
try:
...
except client.exceptions.FileModeRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.
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.
Example
try:
...
except client.exceptions.FileNameConflictsWithDirectoryNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.FilePathConflictsWithSubmodulePathException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The specified file exceeds the file size limit for AWS CodeCommit. For more information about limits in AWS CodeCommit, see AWS CodeCommit User Guide .
Example
try:
...
except client.exceptions.FileTooLargeException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified file exceeds the file size limit for AWS CodeCommit. For more information about limits in AWS CodeCommit, see AWS CodeCommit User Guide .
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.
Example
try:
...
except client.exceptions.FolderContentSizeLimitExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The specified folder does not exist. Either the folder name is not correct, or you did not enter the full path to the folder.
Example
try:
...
except client.exceptions.FolderDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified folder does not exist. Either the folder name is not correct, or you did not enter the full path to the folder.
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.
Example
try:
...
except client.exceptions.IdempotencyParameterMismatchException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.InvalidActorArnException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The content for the approval rule is not valid.
Example
try:
...
except client.exceptions.InvalidApprovalRuleContentException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The content for the approval rule is not valid.
The name for the approval rule is not valid.
Example
try:
...
except client.exceptions.InvalidApprovalRuleNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The name for the approval rule is not valid.
The content of the approval rule template is not valid.
Example
try:
...
except client.exceptions.InvalidApprovalRuleTemplateContentException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The content of the approval rule template is not valid.
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 AWS CodeCommit, see AWS CodeCommit User Guide .
Example
try:
...
except client.exceptions.InvalidApprovalRuleTemplateDescriptionException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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 AWS CodeCommit, see AWS CodeCommit User Guide .
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 AWS CodeCommit, see AWS CodeCommit User Guide .
Example
try:
...
except client.exceptions.InvalidApprovalRuleTemplateNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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 AWS CodeCommit, see AWS CodeCommit User Guide .
The state for the approval is not valid. Valid values include APPROVE and REVOKE.
Example
try:
...
except client.exceptions.InvalidApprovalStateException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The state for the approval is not valid. Valid values include APPROVE and REVOKE.
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.
Example
try:
...
except client.exceptions.InvalidAuthorArnException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The specified blob is not valid.
Example
try:
...
except client.exceptions.InvalidBlobIdException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified blob is not valid.
The specified reference name is not valid.
Example
try:
...
except client.exceptions.InvalidBranchNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified reference name is not valid.
The client request token is not valid.
Example
try:
...
except client.exceptions.InvalidClientRequestTokenException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The client request token is not valid.
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
Example
try:
...
except client.exceptions.InvalidCommentIdException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
The specified commit is not valid.
Example
try:
...
except client.exceptions.InvalidCommitException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified commit is not valid.
The specified commit ID is not valid.
Example
try:
...
except client.exceptions.InvalidCommitIdException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified commit ID is not valid.
The specified conflict detail level is not valid.
Example
try:
...
except client.exceptions.InvalidConflictDetailLevelException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified conflict detail level is not valid.
The specified conflict resolution list is not valid.
Example
try:
...
except client.exceptions.InvalidConflictResolutionException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified conflict resolution list is not valid.
The specified conflict resolution strategy is not valid.
Example
try:
...
except client.exceptions.InvalidConflictResolutionStrategyException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified conflict resolution strategy is not valid.
The specified continuation token is not valid.
Example
try:
...
except client.exceptions.InvalidContinuationTokenException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified continuation token is not valid.
The specified deletion parameter is not valid.
Example
try:
...
except client.exceptions.InvalidDeletionParameterException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified deletion parameter is not valid.
The pull request description is not valid. Descriptions cannot be more than 1,000 characters.
Example
try:
...
except client.exceptions.InvalidDescriptionException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The pull request description is not valid. Descriptions cannot be more than 1,000 characters.
The destination commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
Example
try:
...
except client.exceptions.InvalidDestinationCommitSpecifierException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The destination commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
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.
Example
try:
...
except client.exceptions.InvalidEmailException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The location of the file is not valid. Make sure that you include the file name and extension.
Example
try:
...
except client.exceptions.InvalidFileLocationException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The location of the file is not valid. Make sure that you include the file name and extension.
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile .
Example
try:
...
except client.exceptions.InvalidFileModeException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile .
The position is not valid. Make sure that the line number exists in the version of the file you want to comment on.
Example
try:
...
except client.exceptions.InvalidFilePositionException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The position is not valid. Make sure that the line number exists in the version of the file you want to comment on.
The specified value for the number of conflict files to return is not valid.
Example
try:
...
except client.exceptions.InvalidMaxConflictFilesException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified value for the number of conflict files to return is not valid.
The specified value for the number of merge hunks to return is not valid.
Example
try:
...
except client.exceptions.InvalidMaxMergeHunksException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified value for the number of merge hunks to return is not valid.
The specified number of maximum results is not valid.
Example
try:
...
except client.exceptions.InvalidMaxResultsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified number of maximum results is not valid.
The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations.
Example
try:
...
except client.exceptions.InvalidMergeOptionException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations.
The specified sort order is not valid.
Example
try:
...
except client.exceptions.InvalidOrderException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified sort order is not valid.
The override status is not valid. Valid statuses are OVERRIDE and REVOKE.
Example
try:
...
except client.exceptions.InvalidOverrideStatusException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The override status is not valid. Valid statuses are OVERRIDE and REVOKE.
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.
Example
try:
...
except client.exceptions.InvalidParentCommitIdException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The specified path is not valid.
Example
try:
...
except client.exceptions.InvalidPathException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified path is not valid.
The pull request event type is not valid.
Example
try:
...
except client.exceptions.InvalidPullRequestEventTypeException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The pull request event type is not valid.
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.
Example
try:
...
except client.exceptions.InvalidPullRequestIdException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The pull request status is not valid. The only valid values are OPEN and CLOSED .
Example
try:
...
except client.exceptions.InvalidPullRequestStatusException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The pull request status is not valid. The only valid values are OPEN and CLOSED .
The pull request status update is not valid. The only valid update is from OPEN to CLOSED .
Example
try:
...
except client.exceptions.InvalidPullRequestStatusUpdateException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The pull request status update is not valid. The only valid update is from OPEN to CLOSED .
The specified reference name format is not valid. Reference names must conform to the Git references format (for example, refs/heads/master). For more information, see Git Internals - Git References or consult your Git documentation.
Example
try:
...
except client.exceptions.InvalidReferenceNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified reference name format is not valid. Reference names must conform to the Git references format (for example, refs/heads/master). For more information, see Git Internals - Git References or consult your Git documentation.
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.
Example
try:
...
except client.exceptions.InvalidRelativeFileVersionEnumException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
Example
try:
...
except client.exceptions.InvalidReplacementContentException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
Example
try:
...
except client.exceptions.InvalidReplacementTypeException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
The specified repository description is not valid.
Example
try:
...
except client.exceptions.InvalidRepositoryDescriptionException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified repository description is not valid.
A specified repository name is not valid.
Note
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.
Example
try:
...
except client.exceptions.InvalidRepositoryNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A specified repository name is not valid.
Note
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.
One or more branch names specified for the trigger is not valid.
Example
try:
...
except client.exceptions.InvalidRepositoryTriggerBranchNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
One or more branch names specified for the trigger is not valid.
The custom data provided for the trigger is not valid.
Example
try:
...
except client.exceptions.InvalidRepositoryTriggerCustomDataException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The custom data provided for the trigger is not valid.
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.
Example
try:
...
except client.exceptions.InvalidRepositoryTriggerDestinationArnException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.InvalidRepositoryTriggerEventsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The name of the trigger is not valid.
Example
try:
...
except client.exceptions.InvalidRepositoryTriggerNameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The name of the trigger is not valid.
The AWS Region for the trigger target does not match the AWS Region for the repository. Triggers must be created in the same Region as the target for the trigger.
Example
try:
...
except client.exceptions.InvalidRepositoryTriggerRegionException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The AWS Region for the trigger target does not match the AWS Region for the repository. Triggers must be created in the same Region as the target for the trigger.
The value for the resource ARN is not valid. For more information about resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
Example
try:
...
except client.exceptions.InvalidResourceArnException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The value for the resource ARN is not valid. For more information about resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
The revision ID is not valid. Use GetPullRequest to determine the value.
Example
try:
...
except client.exceptions.InvalidRevisionIdException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The revision ID is not valid. Use GetPullRequest to determine the value.
The SHA-256 hash signature for the rule content is not valid.
Example
try:
...
except client.exceptions.InvalidRuleContentSha256Exception as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The SHA-256 hash signature for the rule content is not valid.
The specified sort by value is not valid.
Example
try:
...
except client.exceptions.InvalidSortByException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified sort by value is not valid.
The source commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
Example
try:
...
except client.exceptions.InvalidSourceCommitSpecifierException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The source commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
The specified tag is not valid. Key names cannot be prefixed with aws:.
Example
try:
...
except client.exceptions.InvalidSystemTagUsageException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified tag is not valid. Key names cannot be prefixed with aws:.
The list of tags is not valid.
Example
try:
...
except client.exceptions.InvalidTagKeysListException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The list of tags is not valid.
The map of tags is not valid.
Example
try:
...
except client.exceptions.InvalidTagsMapException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The map of tags is not valid.
The specified target branch is not valid.
Example
try:
...
except client.exceptions.InvalidTargetBranchException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified target branch is not valid.
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.
Example
try:
...
except client.exceptions.InvalidTargetException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.InvalidTargetsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The title of the pull request is not valid. Pull request titles cannot exceed 100 characters in length.
Example
try:
...
except client.exceptions.InvalidTitleException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The title of the pull request is not valid. Pull request titles cannot exceed 100 characters in length.
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
Example
try:
...
except client.exceptions.ManualMergeRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
The number of branches for the trigger was exceeded.
Example
try:
...
except client.exceptions.MaximumBranchesExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The number of branches for the trigger was exceeded.
The number of allowed conflict resolution entries was exceeded.
Example
try:
...
except client.exceptions.MaximumConflictResolutionEntriesExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The number of allowed conflict resolution entries was exceeded.
The number of files to load exceeds the allowed limit.
Example
try:
...
except client.exceptions.MaximumFileContentToLoadExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The number of files to load exceeds the allowed limit.
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.
Example
try:
...
except client.exceptions.MaximumFileEntriesExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
Example
try:
...
except client.exceptions.MaximumItemsToCompareExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
The number of approvals required for the approval rule exceeds the maximum number allowed.
Example
try:
...
except client.exceptions.MaximumNumberOfApprovalsExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The number of approvals required for the approval rule exceeds the maximum number allowed.
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.
Example
try:
...
except client.exceptions.MaximumOpenPullRequestsExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The maximum number of allowed repository names was exceeded. Currently, this number is 100.
Example
try:
...
except client.exceptions.MaximumRepositoryNamesExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The maximum number of allowed repository names was exceeded. Currently, this number is 100.
The number of triggers allowed for the repository was exceeded.
Example
try:
...
except client.exceptions.MaximumRepositoryTriggersExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The number of triggers allowed for the repository was exceeded.
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.
Example
try:
...
except client.exceptions.MaximumRuleTemplatesAssociatedWithRepositoryException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
A merge option or stategy is required, and none was provided.
Example
try:
...
except client.exceptions.MergeOptionRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A merge option or stategy is required, and none was provided.
More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
Example
try:
...
except client.exceptions.MultipleConflictResolutionEntriesException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
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.
Example
try:
...
except client.exceptions.MultipleRepositoriesInPullRequestException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The user name is not valid because it has exceeded the character limit for author names.
Example
try:
...
except client.exceptions.NameLengthExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The user name is not valid because it has exceeded the character limit for author names.
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.
Example
try:
...
except client.exceptions.NoChangeException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The maximum number of approval rule templates has been exceeded for this AWS Region.
Example
try:
...
except client.exceptions.NumberOfRuleTemplatesExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The maximum number of approval rule templates has been exceeded for this AWS Region.
The approval rule cannot be added. The pull request has the maximum number of approval rules associated with it.
Example
try:
...
except client.exceptions.NumberOfRulesExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The approval rule cannot be added. The pull request has the maximum number of approval rules associated with it.
The pull request has already had its approval rules set to override.
Example
try:
...
except client.exceptions.OverrideAlreadySetException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The pull request has already had its approval rules set to override.
An override status is required, but no value was provided. Valid values include OVERRIDE and REVOKE.
Example
try:
...
except client.exceptions.OverrideStatusRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
An override status is required, but no value was provided. Valid values include OVERRIDE and REVOKE.
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.
Example
try:
...
except client.exceptions.ParentCommitDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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 .
Example
try:
...
except client.exceptions.ParentCommitIdOutdatedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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 .
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).
Example
try:
...
except client.exceptions.ParentCommitIdRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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).
The specified path does not exist.
Example
try:
...
except client.exceptions.PathDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified path does not exist.
The folderPath for a location cannot be null.
Example
try:
...
except client.exceptions.PathRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The folderPath for a location cannot be null.
The pull request status cannot be updated because it is already closed.
Example
try:
...
except client.exceptions.PullRequestAlreadyClosedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The pull request status cannot be updated because it is already closed.
The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.
Example
try:
...
except client.exceptions.PullRequestApprovalRulesNotSatisfiedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.
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.
Example
try:
...
except client.exceptions.PullRequestCannotBeApprovedByAuthorException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.PullRequestDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
A pull request ID is required, but none was provided.
Example
try:
...
except client.exceptions.PullRequestIdRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A pull request ID is required, but none was provided.
A pull request status is required, but none was provided.
Example
try:
...
except client.exceptions.PullRequestStatusRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A pull request status is required, but none was provided.
The commit cannot be created because one or more files specified in the commit reference both a file and a folder.
Example
try:
...
except client.exceptions.PutFileEntryConflictException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The commit cannot be created because one or more files specified in the commit reference both a file and a folder.
The specified reference does not exist. You must provide a full commit ID.
Example
try:
...
except client.exceptions.ReferenceDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified reference does not exist. You must provide a full commit ID.
A reference name is required, but none was provided.
Example
try:
...
except client.exceptions.ReferenceNameRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A reference name is required, but none was provided.
The specified reference is not a supported type.
Example
try:
...
except client.exceptions.ReferenceTypeNotSupportedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified reference is not a supported type.
USE_NEW_CONTENT was specified, but no replacement content has been provided.
Example
try:
...
except client.exceptions.ReplacementContentRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
USE_NEW_CONTENT was specified, but no replacement content has been provided.
A replacement type is required.
Example
try:
...
except client.exceptions.ReplacementTypeRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A replacement type is required.
The specified repository does not exist.
Example
try:
...
except client.exceptions.RepositoryDoesNotExistException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified repository does not exist.
A repository resource limit was exceeded.
Example
try:
...
except client.exceptions.RepositoryLimitExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A repository resource limit was exceeded.
The specified repository name already exists.
Example
try:
...
except client.exceptions.RepositoryNameExistsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The specified repository name already exists.
A repository name is required, but was not specified.
Example
try:
...
except client.exceptions.RepositoryNameRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A repository name is required, but was not specified.
At least one repository name object is required, but was not specified.
Example
try:
...
except client.exceptions.RepositoryNamesRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
At least one repository name object is required, but was not specified.
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.
Example
try:
...
except client.exceptions.RepositoryNotAssociatedWithPullRequestException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
At least one branch name is required, but was not specified in the trigger configuration.
Example
try:
...
except client.exceptions.RepositoryTriggerBranchNameListRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
At least one branch name is required, but was not specified in the trigger configuration.
A destination ARN for the target service for the trigger is required, but was not specified.
Example
try:
...
except client.exceptions.RepositoryTriggerDestinationArnRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A destination ARN for the target service for the trigger is required, but was not specified.
At least one event for the trigger is required, but was not specified.
Example
try:
...
except client.exceptions.RepositoryTriggerEventsListRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
At least one event for the trigger is required, but was not specified.
A name for the trigger is required, but was not specified.
Example
try:
...
except client.exceptions.RepositoryTriggerNameRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A name for the trigger is required, but was not specified.
The list of triggers for the repository is required, but was not specified.
Example
try:
...
except client.exceptions.RepositoryTriggersListRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The list of triggers for the repository is required, but was not specified.
A valid Amazon Resource Name (ARN) for an AWS CodeCommit resource is required. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
Example
try:
...
except client.exceptions.ResourceArnRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A valid Amazon Resource Name (ARN) for an AWS CodeCommit resource is required. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
The commit cannot be created because one of the changes specifies copying or moving a .gitkeep file.
Example
try:
...
except client.exceptions.RestrictedSourceFileException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The commit cannot be created because one of the changes specifies copying or moving a .gitkeep file.
A revision ID is required, but was not provided.
Example
try:
...
except client.exceptions.RevisionIdRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A revision ID is required, but was not provided.
The revision ID provided in the request does not match the current revision ID. Use GetPullRequest to retrieve the current revision ID.
Example
try:
...
except client.exceptions.RevisionNotCurrentException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The revision ID provided in the request does not match the current revision ID. Use GetPullRequest to retrieve the current revision ID.
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.
Example
try:
...
except client.exceptions.SameFileContentException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.SamePathRequestException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
The source branch and destination branch for the pull request are the same. You must specify different branches for the source and destination.
Example
try:
...
except client.exceptions.SourceAndDestinationAreSameException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The source branch and destination branch for the pull request are the same. You must specify different branches for the source and destination.
The commit cannot be created because no source files or file content have been specified for the commit.
Example
try:
...
except client.exceptions.SourceFileOrContentRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The commit cannot be created because no source files or file content have been specified for the commit.
A list of tag keys is required. The list cannot be empty or null.
Example
try:
...
except client.exceptions.TagKeysListRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A list of tag keys is required. The list cannot be empty or null.
The tag policy is not valid.
Example
try:
...
except client.exceptions.TagPolicyException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The tag policy is not valid.
A map of tags is required.
Example
try:
...
except client.exceptions.TagsMapRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A map of tags is required.
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.
Example
try:
...
except client.exceptions.TargetRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
An array of target objects is required. It cannot be empty or null.
Example
try:
...
except client.exceptions.TargetsRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
An array of target objects is required. It cannot be empty or null.
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.
Example
try:
...
except client.exceptions.TipOfSourceReferenceIsDifferentException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
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.
Example
try:
...
except client.exceptions.TipsDivergenceExceededException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
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.
A pull request title is required. It cannot be empty or null.
Example
try:
...
except client.exceptions.TitleRequiredException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
A pull request title is required. It cannot be empty or null.
The maximum number of tags for an AWS CodeCommit resource has been exceeded.
Example
try:
...
except client.exceptions.TooManyTagsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{}
Structure
(dict) --
The maximum number of tags for an AWS CodeCommit resource has been exceeded.
The available paginators are:
paginator = client.get_paginator('describe_pull_request_events')
Creates an iterator that will paginate through responses from CodeCommit.Client.describe_pull_request_events().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
pullRequestId='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',
actorArn='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'pullRequestEvents': [
{
'pullRequestId': 'string',
'eventDate': datetime(2015, 1, 1),
'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',
'actorArn': 'string',
'pullRequestCreatedEventMetadata': {
'repositoryName': 'string',
'sourceCommitId': 'string',
'destinationCommitId': 'string',
'mergeBase': 'string'
},
'pullRequestStatusChangedEventMetadata': {
'pullRequestStatus': 'OPEN'|'CLOSED'
},
'pullRequestSourceReferenceUpdatedEventMetadata': {
'repositoryName': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'mergeBase': 'string'
},
'pullRequestMergedStateChangedEventMetadata': {
'repositoryName': 'string',
'destinationReference': 'string',
'mergeMetadata': {
'isMerged': True|False,
'mergedBy': 'string',
'mergeCommitId': 'string',
'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
}
},
'approvalRuleEventMetadata': {
'approvalRuleName': 'string',
'approvalRuleId': 'string',
'approvalRuleContent': 'string'
},
'approvalStateChangedEventMetadata': {
'revisionId': 'string',
'approvalStatus': 'APPROVE'|'REVOKE'
},
'approvalRuleOverriddenEventMetadata': {
'revisionId': 'string',
'overrideStatus': 'OVERRIDE'|'REVOKE'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
pullRequestEvents (list) --
Information about the pull request events.
(dict) --
Returns information about a pull request event.
pullRequestId (string) --
The system-generated ID of the pull request.
eventDate (datetime) --
The day and time of the pull request event, in timestamp format.
pullRequestEventType (string) --
The type of the pull request event (for example, a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED)).
actorArn (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.
pullRequestCreatedEventMetadata (dict) --
Information about the source and destination branches for the pull request.
repositoryName (string) --
The name of the repository where the pull request was created.
sourceCommitId (string) --
The commit ID on the source branch used when the pull request was created.
destinationCommitId (string) --
The commit ID of the tip of the branch specified as the destination branch when the pull request was created.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
pullRequestStatusChangedEventMetadata (dict) --
Information about the change in status for the pull request event.
pullRequestStatus (string) --
The changed status of the pull request.
pullRequestSourceReferenceUpdatedEventMetadata (dict) --
Information about the updated source branch for the pull request event.
repositoryName (string) --
The name of the repository where the pull request was updated.
beforeCommitId (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 updated.
afterCommitId (string) --
The full commit ID of the commit in the source branch that was the tip of the branch at the time the pull request was updated.
mergeBase (string) --
The commit ID of the most recent commit that the source branch and the destination branch have in common.
pullRequestMergedStateChangedEventMetadata (dict) --
Information about the change in mergability state for the pull request event.
repositoryName (string) --
The name of the repository where the pull request was created.
destinationReference (string) --
The name of the branch that the pull request is merged into.
mergeMetadata (dict) --
Information about the merge state change event.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
mergeCommitId (string) --
The commit ID for the merge commit, if any.
mergeOption (string) --
The merge strategy used in the merge.
approvalRuleEventMetadata (dict) --
Information about a pull request event.
approvalRuleName (string) --
The name of the approval rule.
approvalRuleId (string) --
The system-generated ID of the approval rule.
approvalRuleContent (string) --
The content of the approval rule.
approvalStateChangedEventMetadata (dict) --
Information about an approval state change for a pull request.
revisionId (string) --
The revision ID of the pull request when the approval state changed.
approvalStatus (string) --
The approval status for the pull request.
approvalRuleOverriddenEventMetadata (dict) --
Information about an approval rule override event for a pull request.
revisionId (string) --
The revision ID of the pull request when the override event occurred.
overrideStatus (string) --
The status of the override event.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_comments_for_compared_commit')
Creates an iterator that will paginate through responses from CodeCommit.Client.get_comments_for_compared_commit().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
repositoryName='string',
beforeCommitId='string',
afterCommitId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the repository where you want to compare commits.
[REQUIRED]
To establish the directionality of the comparison, the full commit ID of the after commit.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'commentsForComparedCommitData': [
{
'repositoryName': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'beforeBlobId': 'string',
'afterBlobId': 'string',
'location': {
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
'comments': [
{
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
commentsForComparedCommitData (list) --
A list of comment objects on the compared commit.
(dict) --
Returns information about comments on the comparison between two commits.
repositoryName (string) --
The name of the repository that contains the compared commits.
beforeCommitId (string) --
The full commit ID of the commit used to establish the before of the comparison.
afterCommitId (string) --
The full commit ID of the commit used to establish the after of the comparison.
beforeBlobId (string) --
The full blob ID of the commit used to establish the before of the comparison.
afterBlobId (string) --
The full blob ID of the commit used to establish the after of the comparison.
location (dict) --
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.
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change in a compared file, in line number format.
relativeFileVersion (string) --
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
comments (list) --
An array of comment objects. Each comment object contains information about a comment on the comparison between commits.
(dict) --
Returns information about a specific comment.
commentId (string) --
The system-generated comment ID.
content (string) --
The content of the comment.
inReplyTo (string) --
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) --
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) --
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) --
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) --
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (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.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_comments_for_pull_request')
Creates an iterator that will paginate through responses from CodeCommit.Client.get_comments_for_pull_request().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
pullRequestId='string',
repositoryName='string',
beforeCommitId='string',
afterCommitId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests .
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'commentsForPullRequestData': [
{
'pullRequestId': 'string',
'repositoryName': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'beforeBlobId': 'string',
'afterBlobId': 'string',
'location': {
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
'comments': [
{
'commentId': 'string',
'content': 'string',
'inReplyTo': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'authorArn': 'string',
'deleted': True|False,
'clientRequestToken': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
commentsForPullRequestData (list) --
An array of comment objects on the pull request.
(dict) --
Returns information about comments on a pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
repositoryName (string) --
The name of the repository that contains the pull request.
beforeCommitId (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.
afterCommitId (string) --
The full commit ID of the commit that was the tip of the source branch at the time the comment was made.
beforeBlobId (string) --
The full blob ID of the file on which you want to comment on the destination commit.
afterBlobId (string) --
The full blob ID of the file on which you want to comment on the source commit.
location (dict) --
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).
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change in a compared file, in line number format.
relativeFileVersion (string) --
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
comments (list) --
An array of comment objects. Each comment object contains information about a comment on the pull request.
(dict) --
Returns information about a specific comment.
commentId (string) --
The system-generated comment ID.
content (string) --
The content of the comment.
inReplyTo (string) --
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) --
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) --
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) --
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) --
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (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.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_differences')
Creates an iterator that will paginate through responses from CodeCommit.Client.get_differences().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
repositoryName='string',
beforeCommitSpecifier='string',
afterCommitSpecifier='string',
beforePath='string',
afterPath='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the repository where you want to get differences.
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'differences': [
{
'beforeBlob': {
'blobId': 'string',
'path': 'string',
'mode': 'string'
},
'afterBlob': {
'blobId': 'string',
'path': 'string',
'mode': 'string'
},
'changeType': 'A'|'M'|'D'
},
],
}
Response Structure
(dict) --
differences (list) --
A data type object that contains information about the differences, including whether the difference is added, modified, or deleted (A, D, M).
(dict) --
Returns information about a set of differences for a commit specifier.
beforeBlob (dict) --
Information about a beforeBlob data type object, including the ID, the file mode permission code, and the path.
blobId (string) --
The full ID of the blob.
path (string) --
The path to the blob and associated file name, if any.
mode (string) --
The file mode permissions of the blob. File mode permission codes include:
afterBlob (dict) --
Information about an afterBlob data type object, including the ID, the file mode permission code, and the path.
blobId (string) --
The full ID of the blob.
path (string) --
The path to the blob and associated file name, if any.
mode (string) --
The file mode permissions of the blob. File mode permission codes include:
changeType (string) --
Whether the change type of the difference is an addition (A), deletion (D), or modification (M).
paginator = client.get_paginator('list_branches')
Creates an iterator that will paginate through responses from CodeCommit.Client.list_branches().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
repositoryName='string',
PaginationConfig={
'MaxItems': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the repository that contains the branches.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'branches': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a list branches operation.
branches (list) --
The list of branch names.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_pull_requests')
Creates an iterator that will paginate through responses from CodeCommit.Client.list_pull_requests().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
repositoryName='string',
authorArn='string',
pullRequestStatus='OPEN'|'CLOSED',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the repository for which you want to list pull requests.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'pullRequestIds': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
pullRequestIds (list) --
The system-generated IDs of the pull requests.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_repositories')
Creates an iterator that will paginate through responses from CodeCommit.Client.list_repositories().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
sortBy='repositoryName'|'lastModifiedDate',
order='ascending'|'descending',
PaginationConfig={
'MaxItems': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'repositories': [
{
'repositoryName': 'string',
'repositoryId': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a list repositories operation.
repositories (list) --
Lists the repositories called by the list repositories operation.
(dict) --
Information about a repository name and ID.
repositoryName (string) --
The name associated with the repository.
repositoryId (string) --
The ID associated with the repository.
NextToken (string) --
A token to resume pagination.