Class: AWS.CodeCommit
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.CodeCommit
- Identifier:
- codecommit
- API Version:
- 2015-04-13
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
This is the CodeCommit API Reference. This reference provides descriptions of the operations and data types for CodeCommit API along with usage examples.
You can use the CodeCommit API to work with the following objects:
Repositories, by calling the following:
-
BatchGetRepositories, which returns information about one or more repositories associated with your Amazon Web Services account.
-
CreateRepository, which creates an CodeCommit repository.
-
DeleteRepository, which deletes an CodeCommit repository.
-
GetRepository, which returns information about a specified repository.
-
ListRepositories, which lists all CodeCommit repositories associated with your Amazon Web Services account.
-
UpdateRepositoryDescription, which sets or updates the description of the repository.
-
UpdateRepositoryEncryptionKey, which updates the Key Management Service encryption key used to encrypt and decrypt a repository.
-
UpdateRepositoryName, which changes the name of the repository. If you change the name of a repository, no other users of that repository can access it until you send them the new HTTPS or SSH URL to use.
Branches, by calling the following:
-
CreateBranch, which creates a branch in a specified repository.
-
DeleteBranch, which deletes the specified branch in a repository unless it is the default branch.
-
GetBranch, which returns information about a specified branch.
-
ListBranches, which lists all branches for a specified repository.
-
UpdateDefaultBranch, which changes the default branch for a repository.
Files, by calling the following:
-
DeleteFile, which deletes the content of a specified file from a specified branch.
-
GetBlob, which returns the base-64 encoded content of an individual Git blob object in a repository.
-
GetFile, which returns the base-64 encoded content of a specified file.
-
GetFolder, which returns the contents of a specified folder or directory.
-
ListFileCommitHistory, which retrieves a list of commits and changes to a specified file.
-
PutFile, which adds or modifies a single file in a specified repository and branch.
Commits, by calling the following:
-
BatchGetCommits, which returns information about one or more commits in a repository.
-
CreateCommit, which creates a commit for changes to a repository.
-
GetCommit, which returns information about a commit, including commit messages and author and committer information.
-
GetDifferences, which returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference).
Merges, by calling the following:
-
BatchDescribeMergeConflicts, which returns information about conflicts in a merge between commits in a repository.
-
CreateUnreferencedMergeCommit, which creates an unreferenced commit between two branches or commits for the purpose of comparing them and identifying any potential conflicts.
-
DescribeMergeConflicts, which returns information about merge conflicts between the base, source, and destination versions of a file in a potential merge.
-
GetMergeCommit, which returns information about the merge between a source and destination commit.
-
GetMergeConflicts, which returns information about merge conflicts between the source and destination branch in a pull request.
-
GetMergeOptions, which returns information about the available merge options between two branches or commit specifiers.
-
MergeBranchesByFastForward, which merges two branches using the fast-forward merge option.
-
MergeBranchesBySquash, which merges two branches using the squash merge option.
-
MergeBranchesByThreeWay, which merges two branches using the three-way merge option.
Pull requests, by calling the following:
-
CreatePullRequest, which creates a pull request in a specified repository.
-
CreatePullRequestApprovalRule, which creates an approval rule for a specified pull request.
-
DeletePullRequestApprovalRule, which deletes an approval rule for a specified pull request.
-
DescribePullRequestEvents, which returns information about one or more pull request events.
-
EvaluatePullRequestApprovalRules, which evaluates whether a pull request has met all the conditions specified in its associated approval rules.
-
GetCommentsForPullRequest, which returns information about comments on a specified pull request.
-
GetPullRequest, which returns information about a specified pull request.
-
GetPullRequestApprovalStates, which returns information about the approval states for a specified pull request.
-
GetPullRequestOverrideState, which returns information about whether approval rules have been set aside (overriden) 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.
-
ListPullRequests, which lists all pull requests for a repository.
-
MergePullRequestByFastForward, which merges the source destination branch of a pull request into the specified destination branch for that pull request using the fast-forward merge option.
-
MergePullRequestBySquash, which merges the source destination branch of a pull request into the specified destination branch for that pull request using the squash merge option.
-
MergePullRequestByThreeWay, which merges the source destination branch of a pull request into the specified destination branch for that pull request using the three-way merge option.
-
OverridePullRequestApprovalRules, which sets aside all approval rule requirements for a pull request.
-
PostCommentForPullRequest, which posts a comment to a pull request at the specified line, file, or request.
-
UpdatePullRequestApprovalRuleContent, which updates the structure of an approval rule for a pull request.
-
UpdatePullRequestApprovalState, which updates the state of an approval on a pull request.
-
UpdatePullRequestDescription, which updates the description of a pull request.
-
UpdatePullRequestStatus, which updates the status of a pull request.
-
UpdatePullRequestTitle, which updates the title of a pull request.
Approval rule templates, by calling the following:
-
AssociateApprovalRuleTemplateWithRepository, which associates a template with a specified repository. After the template is associated with a repository, CodeCommit creates approval rules that match the template conditions on every pull request created in the specified repository.
-
BatchAssociateApprovalRuleTemplateWithRepositories, which associates a template with one or more specified repositories. After the template is associated with a repository, CodeCommit creates approval rules that match the template conditions on every pull request created in the specified repositories.
-
BatchDisassociateApprovalRuleTemplateFromRepositories, which removes the association between a template and specified repositories so that approval rules based on the template are not automatically created when pull requests are created in those repositories.
-
CreateApprovalRuleTemplate, which creates a template for approval rules that can then be associated with one or more repositories in your Amazon Web Services account.
-
DeleteApprovalRuleTemplate, which deletes the specified template. It does not remove approval rules on pull requests already created with the template.
-
DisassociateApprovalRuleTemplateFromRepository, which 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.
-
GetApprovalRuleTemplate, which returns information about an approval rule template.
-
ListApprovalRuleTemplates, which lists all approval rule templates in the Amazon Web Services Region in your Amazon Web Services account.
-
ListAssociatedApprovalRuleTemplatesForRepository, which lists all approval rule templates that are associated with a specified repository.
-
ListRepositoriesForApprovalRuleTemplate, which lists all repositories associated with the specified approval rule template.
-
UpdateApprovalRuleTemplateDescription, which updates the description of an approval rule template.
-
UpdateApprovalRuleTemplateName, which updates the name of an approval rule template.
-
UpdateApprovalRuleTemplateContent, which updates the content of an approval rule template.
Comments in a repository, by calling the following:
-
DeleteCommentContent, which deletes the content of a comment on a commit in a repository.
-
GetComment, which returns information about a comment on a commit.
-
GetCommentReactions, which returns information about emoji reactions to comments.
-
GetCommentsForComparedCommit, which returns information about comments on the comparison between two commit specifiers in a repository.
-
PostCommentForComparedCommit, which creates a comment on the comparison between two commit specifiers in a repository.
-
PostCommentReply, which creates a reply to a comment.
-
PutCommentReaction, which creates or updates an emoji reaction to a comment.
-
UpdateComment, which updates the content of a comment on a commit in a repository.
Tags used to tag resources in CodeCommit (not Git tags), by calling the following:
-
ListTagsForResource, which gets information about Amazon Web Servicestags for a specified Amazon Resource Name (ARN) in CodeCommit.
-
TagResource, which adds or updates tags for a resource in CodeCommit.
-
UntagResource, which removes tags for a resource in CodeCommit.
Triggers, by calling the following:
-
GetRepositoryTriggers, which returns information about triggers configured for a repository.
-
PutRepositoryTriggers, which replaces all triggers for a repository and can be used to create or delete triggers.
-
TestRepositoryTriggers, which tests the functionality of a repository trigger by sending data to the trigger target.
For information about how to use CodeCommit, see the CodeCommit User Guide.
Sending a Request Using CodeCommit
var codecommit = new AWS.CodeCommit();
codecommit.associateApprovalRuleTemplateWithRepository(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the CodeCommit object uses this specific API, you can
construct the object by passing the apiVersion option to the constructor:
var codecommit = new AWS.CodeCommit({apiVersion: '2015-04-13'});
You can also set the API version globally in AWS.config.apiVersions using
the codecommit service identifier:
AWS.config.apiVersions = {
codecommit: '2015-04-13',
// other service API versions
};
var codecommit = new AWS.CodeCommit();
Constructor Summary collapse
-
new AWS.CodeCommit(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
associateApprovalRuleTemplateWithRepository(params = {}, callback) ⇒ AWS.Request
Creates an association between an approval rule template and a specified repository.
-
batchAssociateApprovalRuleTemplateWithRepositories(params = {}, callback) ⇒ AWS.Request
Creates an association between an approval rule template and one or more specified repositories.
-
batchDescribeMergeConflicts(params = {}, callback) ⇒ AWS.Request
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
.
-
batchDisassociateApprovalRuleTemplateFromRepositories(params = {}, callback) ⇒ AWS.Request
Removes the association between an approval rule template and one or more specified repositories.
-
batchGetCommits(params = {}, callback) ⇒ AWS.Request
Returns information about the contents of one or more commits in a repository.
.
-
batchGetRepositories(params = {}, callback) ⇒ AWS.Request
Returns information about one or more repositories.
Note: The description field for a repository accepts all HTML characters and all valid Unicode characters.- createApprovalRuleTemplate(params = {}, callback) ⇒ AWS.Request
Creates a template for approval rules that can then be associated with one or more repositories in your Amazon Web Services account.
- createBranch(params = {}, callback) ⇒ AWS.Request
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.- createCommit(params = {}, callback) ⇒ AWS.Request
Creates a commit for a repository on the tip of a specified branch.
.
- createPullRequest(params = {}, callback) ⇒ AWS.Request
Creates a pull request in the specified repository.
.
- createPullRequestApprovalRule(params = {}, callback) ⇒ AWS.Request
Creates an approval rule for a pull request.
.
- createRepository(params = {}, callback) ⇒ AWS.Request
Creates a new, empty repository.
.
- createUnreferencedMergeCommit(params = {}, callback) ⇒ AWS.Request
Creates an unreferenced commit that represents the result of merging two branches using a specified merge strategy.
- deleteApprovalRuleTemplate(params = {}, callback) ⇒ AWS.Request
Deletes a specified approval rule template.
- deleteBranch(params = {}, callback) ⇒ AWS.Request
Deletes a branch from a repository, unless that branch is the default branch for the repository.
- deleteCommentContent(params = {}, callback) ⇒ AWS.Request
Deletes the content of a comment made on a change, file, or commit in a repository.
.
- deleteFile(params = {}, callback) ⇒ AWS.Request
Deletes a specified file from a specified branch.
- deletePullRequestApprovalRule(params = {}, callback) ⇒ AWS.Request
Deletes an approval rule from a specified pull request.
- deleteRepository(params = {}, callback) ⇒ AWS.Request
Deletes a repository.
- describeMergeConflicts(params = {}, callback) ⇒ AWS.Request
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
- describePullRequestEvents(params = {}, callback) ⇒ AWS.Request
Returns information about one or more pull request events.
.
- disassociateApprovalRuleTemplateFromRepository(params = {}, callback) ⇒ AWS.Request
Removes the association between a template and a repository so that approval rules based on the template are not automatically created when pull requests are created in the specified repository.
- evaluatePullRequestApprovalRules(params = {}, callback) ⇒ AWS.Request
Evaluates whether a pull request has met all the conditions specified in its associated approval rules.
.
- getApprovalRuleTemplate(params = {}, callback) ⇒ AWS.Request
Returns information about a specified approval rule template.
.
- getBlob(params = {}, callback) ⇒ AWS.Request
Returns the base-64 encoded content of an individual blob in a repository.
.
- getBranch(params = {}, callback) ⇒ AWS.Request
Returns information about a repository branch, including its name and the last commit ID.
.
- getComment(params = {}, callback) ⇒ AWS.Request
Returns the content of a comment made on a change, file, or commit in a repository.
- getCommentReactions(params = {}, callback) ⇒ AWS.Request
Returns information about reactions to a specified comment ID.
- getCommentsForComparedCommit(params = {}, callback) ⇒ AWS.Request
Returns information about comments made on the comparison between two commits.
Note: Reaction counts might include numbers from user identities who were deleted after the reaction was made.- getCommentsForPullRequest(params = {}, callback) ⇒ AWS.Request
Returns comments made on a pull request.
Note: Reaction counts might include numbers from user identities who were deleted after the reaction was made.- getCommit(params = {}, callback) ⇒ AWS.Request
Returns information about a commit, including commit message and committer information.
.
- getDifferences(params = {}, callback) ⇒ AWS.Request
Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference).
- getFile(params = {}, callback) ⇒ AWS.Request
Returns the base-64 encoded contents of a specified file and its metadata.
.
- getFolder(params = {}, callback) ⇒ AWS.Request
Returns the contents of a specified folder in a repository.
.
- getMergeCommit(params = {}, callback) ⇒ AWS.Request
Returns information about a specified merge commit.
.
- getMergeConflicts(params = {}, callback) ⇒ AWS.Request
Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
.
- getMergeOptions(params = {}, callback) ⇒ AWS.Request
Returns information about the merge options available for merging two specified branches.
- getPullRequest(params = {}, callback) ⇒ AWS.Request
Gets information about a pull request in a specified repository.
.
- getPullRequestApprovalStates(params = {}, callback) ⇒ AWS.Request
Gets information about the approval states for a specified pull request.
- getPullRequestOverrideState(params = {}, callback) ⇒ AWS.Request
Returns information about whether approval rules have been set aside (overridden) for a pull request, and if so, the Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.
.
- getRepository(params = {}, callback) ⇒ AWS.Request
Returns information about a repository.
Note: The description field for a repository accepts all HTML characters and all valid Unicode characters.- getRepositoryTriggers(params = {}, callback) ⇒ AWS.Request
Gets information about triggers configured for a repository.
.
- listApprovalRuleTemplates(params = {}, callback) ⇒ AWS.Request
Lists all approval rule templates in the specified Amazon Web Services Region in your Amazon Web Services account.
- listAssociatedApprovalRuleTemplatesForRepository(params = {}, callback) ⇒ AWS.Request
Lists all approval rule templates that are associated with a specified repository.
.
- listBranches(params = {}, callback) ⇒ AWS.Request
Gets information about one or more branches in a repository.
.
- listFileCommitHistory(params = {}, callback) ⇒ AWS.Request
Retrieves a list of commits and changes to a specified file.
.
- listPullRequests(params = {}, callback) ⇒ AWS.Request
Returns a list of pull requests for a specified repository.
- listRepositories(params = {}, callback) ⇒ AWS.Request
Gets information about one or more repositories.
.
- listRepositoriesForApprovalRuleTemplate(params = {}, callback) ⇒ AWS.Request
Lists all repositories associated with the specified approval rule template.
.
- listTagsForResource(params = {}, callback) ⇒ AWS.Request
Gets information about Amazon Web Servicestags for a specified Amazon Resource Name (ARN) in CodeCommit.
- mergeBranchesByFastForward(params = {}, callback) ⇒ AWS.Request
Merges two branches using the fast-forward merge strategy.
.
- mergeBranchesBySquash(params = {}, callback) ⇒ AWS.Request
Merges two branches using the squash merge strategy.
.
- mergeBranchesByThreeWay(params = {}, callback) ⇒ AWS.Request
Merges two specified branches using the three-way merge strategy.
.
- mergePullRequestByFastForward(params = {}, callback) ⇒ AWS.Request
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge strategy.
- mergePullRequestBySquash(params = {}, callback) ⇒ AWS.Request
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the squash merge strategy.
- mergePullRequestByThreeWay(params = {}, callback) ⇒ AWS.Request
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the three-way merge strategy.
- overridePullRequestApprovalRules(params = {}, callback) ⇒ AWS.Request
Sets aside (overrides) all approval rule requirements for a specified pull request.
.
- postCommentForComparedCommit(params = {}, callback) ⇒ AWS.Request
Posts a comment on the comparison between two commits.
.
- postCommentForPullRequest(params = {}, callback) ⇒ AWS.Request
Posts a comment on a pull request.
.
- postCommentReply(params = {}, callback) ⇒ AWS.Request
Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
.
- putCommentReaction(params = {}, callback) ⇒ AWS.Request
Adds or updates a reaction to a specified comment for the user whose identity is used to make the request.
- putFile(params = {}, callback) ⇒ AWS.Request
Adds or updates a file in a branch in an CodeCommit repository, and generates a commit for the addition in the specified branch.
.
- putRepositoryTriggers(params = {}, callback) ⇒ AWS.Request
Replaces all triggers for a repository.
- tagResource(params = {}, callback) ⇒ AWS.Request
Adds or updates tags for a resource in CodeCommit.
- testRepositoryTriggers(params = {}, callback) ⇒ AWS.Request
Tests the functionality of repository triggers by sending information to the trigger target.
- untagResource(params = {}, callback) ⇒ AWS.Request
Removes tags for a resource in CodeCommit.
- updateApprovalRuleTemplateContent(params = {}, callback) ⇒ AWS.Request
Updates the content of an approval rule template.
- updateApprovalRuleTemplateDescription(params = {}, callback) ⇒ AWS.Request
Updates the description for a specified approval rule template.
.
- updateApprovalRuleTemplateName(params = {}, callback) ⇒ AWS.Request
Updates the name of a specified approval rule template.
.
- updateComment(params = {}, callback) ⇒ AWS.Request
Replaces the contents of a comment.
.
- updateDefaultBranch(params = {}, callback) ⇒ AWS.Request
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.- updatePullRequestApprovalRuleContent(params = {}, callback) ⇒ AWS.Request
Updates the structure of an approval rule created specifically for a pull request.
- updatePullRequestApprovalState(params = {}, callback) ⇒ AWS.Request
Updates the state of a user's approval on a pull request.
- updatePullRequestDescription(params = {}, callback) ⇒ AWS.Request
Replaces the contents of the description of a pull request.
.
- updatePullRequestStatus(params = {}, callback) ⇒ AWS.Request
Updates the status of a pull request.
- updatePullRequestTitle(params = {}, callback) ⇒ AWS.Request
Replaces the title of a pull request.
.
- updateRepositoryDescription(params = {}, callback) ⇒ AWS.Request
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.- updateRepositoryEncryptionKey(params = {}, callback) ⇒ AWS.Request
Updates the Key Management Service encryption key used to encrypt and decrypt a CodeCommit repository.
.
- updateRepositoryName(params = {}, callback) ⇒ AWS.Request
Renames a repository.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.CodeCommit(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
associateApprovalRuleTemplateWithRepository(params = {}, callback) ⇒ AWS.Request
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.
- createApprovalRuleTemplate(params = {}, callback) ⇒ AWS.Request