CodeCommit class

This is the AWS CodeCommit API Reference. This reference provides descriptions of the operations and data types for AWS CodeCommit API along with usage examples.

Constructors

CodeCommit({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

associateApprovalRuleTemplateWithRepository({required String approvalRuleTemplateName, required String repositoryName}) Future<void>
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.
batchAssociateApprovalRuleTemplateWithRepositories({required String approvalRuleTemplateName, required List<String> repositoryNames}) Future<BatchAssociateApprovalRuleTemplateWithRepositoriesOutput>
Creates an association between an approval rule template and one or more specified repositories.
batchDescribeMergeConflicts({required String destinationCommitSpecifier, required MergeOptionTypeEnum mergeOption, required String repositoryName, required String sourceCommitSpecifier, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy, List<String>? filePaths, int? maxConflictFiles, int? maxMergeHunks, String? nextToken}) Future<BatchDescribeMergeConflictsOutput>
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({required String approvalRuleTemplateName, required List<String> repositoryNames}) Future<BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput>
Removes the association between an approval rule template and one or more specified repositories.
batchGetCommits({required List<String> commitIds, required String repositoryName}) Future<BatchGetCommitsOutput>
Returns information about the contents of one or more commits in a repository.
batchGetRepositories({required List<String> repositoryNames}) Future<BatchGetRepositoriesOutput>
Returns information about one or more repositories.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createApprovalRuleTemplate({required String approvalRuleTemplateContent, required String approvalRuleTemplateName, String? approvalRuleTemplateDescription}) Future<CreateApprovalRuleTemplateOutput>
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.
createBranch({required String branchName, required String commitId, required String repositoryName}) Future<void>
Creates a branch in a repository and points the branch to a commit.
createCommit({required String branchName, required String repositoryName, String? authorName, String? commitMessage, List<DeleteFileEntry>? deleteFiles, String? email, bool? keepEmptyFolders, String? parentCommitId, List<PutFileEntry>? putFiles, List<SetFileModeEntry>? setFileModes}) Future<CreateCommitOutput>
Creates a commit for a repository on the tip of a specified branch.
createPullRequest({required List<Target> targets, required String title, String? clientRequestToken, String? description}) Future<CreatePullRequestOutput>
Creates a pull request in the specified repository.
createPullRequestApprovalRule({required String approvalRuleContent, required String approvalRuleName, required String pullRequestId}) Future<CreatePullRequestApprovalRuleOutput>
Creates an approval rule for a pull request.
createRepository({required String repositoryName, String? repositoryDescription, Map<String, String>? tags}) Future<CreateRepositoryOutput>
Creates a new, empty repository.
createUnreferencedMergeCommit({required String destinationCommitSpecifier, required MergeOptionTypeEnum mergeOption, required String repositoryName, required String sourceCommitSpecifier, String? authorName, String? commitMessage, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolution? conflictResolution, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy, String? email, bool? keepEmptyFolders}) Future<CreateUnreferencedMergeCommitOutput>
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.
deleteApprovalRuleTemplate({required String approvalRuleTemplateName}) Future<DeleteApprovalRuleTemplateOutput>
Deletes a specified approval rule template. Deleting a template does not remove approval rules on pull requests already created with the template.
deleteBranch({required String branchName, required String repositoryName}) Future<DeleteBranchOutput>
Deletes a branch from a repository, unless that branch is the default branch for the repository.
deleteCommentContent({required String commentId}) Future<DeleteCommentContentOutput>
Deletes the content of a comment made on a change, file, or commit in a repository.
deleteFile({required String branchName, required String filePath, required String parentCommitId, required String repositoryName, String? commitMessage, String? email, bool? keepEmptyFolders, String? name}) Future<DeleteFileOutput>
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.
deletePullRequestApprovalRule({required String approvalRuleName, required String pullRequestId}) Future<DeletePullRequestApprovalRuleOutput>
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.
deleteRepository({required String repositoryName}) Future<DeleteRepositoryOutput>
Deletes a repository. If a specified repository was already deleted, a null repository ID is returned.
describeMergeConflicts({required String destinationCommitSpecifier, required String filePath, required MergeOptionTypeEnum mergeOption, required String repositoryName, required String sourceCommitSpecifier, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy, int? maxMergeHunks, String? nextToken}) Future<DescribeMergeConflictsOutput>
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.
describePullRequestEvents({required String pullRequestId, String? actorArn, int? maxResults, String? nextToken, PullRequestEventType? pullRequestEventType}) Future<DescribePullRequestEventsOutput>
Returns information about one or more pull request events.
disassociateApprovalRuleTemplateFromRepository({required String approvalRuleTemplateName, required String repositoryName}) Future<void>
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.
evaluatePullRequestApprovalRules({required String pullRequestId, required String revisionId}) Future<EvaluatePullRequestApprovalRulesOutput>
Evaluates whether a pull request has met all the conditions specified in its associated approval rules.
getApprovalRuleTemplate({required String approvalRuleTemplateName}) Future<GetApprovalRuleTemplateOutput>
Returns information about a specified approval rule template.
getBlob({required String blobId, required String repositoryName}) Future<GetBlobOutput>
Returns the base-64 encoded content of an individual blob in a repository.
getBranch({String? branchName, String? repositoryName}) Future<GetBranchOutput>
Returns information about a repository branch, including its name and the last commit ID.
getComment({required String commentId}) Future<GetCommentOutput>
Returns the content of a comment made on a change, file, or commit in a repository.
getCommentReactions({required String commentId, int? maxResults, String? nextToken, String? reactionUserArn}) Future<GetCommentReactionsOutput>
Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.
getCommentsForComparedCommit({required String afterCommitId, required String repositoryName, String? beforeCommitId, int? maxResults, String? nextToken}) Future<GetCommentsForComparedCommitOutput>
Returns information about comments made on the comparison between two commits.
getCommentsForPullRequest({required String pullRequestId, String? afterCommitId, String? beforeCommitId, int? maxResults, String? nextToken, String? repositoryName}) Future<GetCommentsForPullRequestOutput>
Returns comments made on a pull request.
getCommit({required String commitId, required String repositoryName}) Future<GetCommitOutput>
Returns information about a commit, including commit message and committer information.
getDifferences({required String afterCommitSpecifier, required String repositoryName, int? maxResults, String? nextToken, String? afterPath, String? beforeCommitSpecifier, String? beforePath}) Future<GetDifferencesOutput>
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.
getFile({required String filePath, required String repositoryName, String? commitSpecifier}) Future<GetFileOutput>
Returns the base-64 encoded contents of a specified file and its metadata.
getFolder({required String folderPath, required String repositoryName, String? commitSpecifier}) Future<GetFolderOutput>
Returns the contents of a specified folder in a repository.
getMergeCommit({required String destinationCommitSpecifier, required String repositoryName, required String sourceCommitSpecifier, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy}) Future<GetMergeCommitOutput>
Returns information about a specified merge commit.
getMergeConflicts({required String destinationCommitSpecifier, required MergeOptionTypeEnum mergeOption, required String repositoryName, required String sourceCommitSpecifier, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy, int? maxConflictFiles, String? nextToken}) Future<GetMergeConflictsOutput>
Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
getMergeOptions({required String destinationCommitSpecifier, required String repositoryName, required String sourceCommitSpecifier, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy}) Future<GetMergeOptionsOutput>
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.
getPullRequest({required String pullRequestId}) Future<GetPullRequestOutput>
Gets information about a pull request in a specified repository.
getPullRequestApprovalStates({required String pullRequestId, required String revisionId}) Future<GetPullRequestApprovalStatesOutput>
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.
getPullRequestOverrideState({required String pullRequestId, required String revisionId}) Future<GetPullRequestOverrideStateOutput>
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({required String repositoryName}) Future<GetRepositoryOutput>
Returns information about a repository.
getRepositoryTriggers({required String repositoryName}) Future<GetRepositoryTriggersOutput>
Gets information about triggers configured for a repository.
listApprovalRuleTemplates({int? maxResults, String? nextToken}) Future<ListApprovalRuleTemplatesOutput>
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.
listAssociatedApprovalRuleTemplatesForRepository({required String repositoryName, int? maxResults, String? nextToken}) Future<ListAssociatedApprovalRuleTemplatesForRepositoryOutput>
Lists all approval rule templates that are associated with a specified repository.
listBranches({required String repositoryName, String? nextToken}) Future<ListBranchesOutput>
Gets information about one or more branches in a repository.
listPullRequests({required String repositoryName, String? authorArn, int? maxResults, String? nextToken, PullRequestStatusEnum? pullRequestStatus}) Future<ListPullRequestsOutput>
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.
listRepositories({String? nextToken, OrderEnum? order, SortByEnum? sortBy}) Future<ListRepositoriesOutput>
Gets information about one or more repositories.
listRepositoriesForApprovalRuleTemplate({required String approvalRuleTemplateName, int? maxResults, String? nextToken}) Future<ListRepositoriesForApprovalRuleTemplateOutput>
Lists all repositories associated with the specified approval rule template.
listTagsForResource({required String resourceArn, String? nextToken}) Future<ListTagsForResourceOutput>
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.
mergeBranchesByFastForward({required String destinationCommitSpecifier, required String repositoryName, required String sourceCommitSpecifier, String? targetBranch}) Future<MergeBranchesByFastForwardOutput>
Merges two branches using the fast-forward merge strategy.
mergeBranchesBySquash({required String destinationCommitSpecifier, required String repositoryName, required String sourceCommitSpecifier, String? authorName, String? commitMessage, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolution? conflictResolution, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy, String? email, bool? keepEmptyFolders, String? targetBranch}) Future<MergeBranchesBySquashOutput>
Merges two branches using the squash merge strategy.
mergeBranchesByThreeWay({required String destinationCommitSpecifier, required String repositoryName, required String sourceCommitSpecifier, String? authorName, String? commitMessage, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolution? conflictResolution, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy, String? email, bool? keepEmptyFolders, String? targetBranch}) Future<MergeBranchesByThreeWayOutput>
Merges two specified branches using the three-way merge strategy.
mergePullRequestByFastForward({required String pullRequestId, required String repositoryName, String? sourceCommitId}) Future<MergePullRequestByFastForwardOutput>
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.
mergePullRequestBySquash({required String pullRequestId, required String repositoryName, String? authorName, String? commitMessage, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolution? conflictResolution, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy, String? email, bool? keepEmptyFolders, String? sourceCommitId}) Future<MergePullRequestBySquashOutput>
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.
mergePullRequestByThreeWay({required String pullRequestId, required String repositoryName, String? authorName, String? commitMessage, ConflictDetailLevelTypeEnum? conflictDetailLevel, ConflictResolution? conflictResolution, ConflictResolutionStrategyTypeEnum? conflictResolutionStrategy, String? email, bool? keepEmptyFolders, String? sourceCommitId}) Future<MergePullRequestByThreeWayOutput>
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overridePullRequestApprovalRules({required OverrideStatus overrideStatus, required String pullRequestId, required String revisionId}) Future<void>
Sets aside (overrides) all approval rule requirements for a specified pull request.
postCommentForComparedCommit({required String afterCommitId, required String content, required String repositoryName, String? beforeCommitId, String? clientRequestToken, Location? location}) Future<PostCommentForComparedCommitOutput>
Posts a comment on the comparison between two commits.
postCommentForPullRequest({required String afterCommitId, required String beforeCommitId, required String content, required String pullRequestId, required String repositoryName, String? clientRequestToken, Location? location}) Future<PostCommentForPullRequestOutput>
Posts a comment on a pull request.
postCommentReply({required String content, required String inReplyTo, String? clientRequestToken}) Future<PostCommentReplyOutput>
Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
putCommentReaction({required String commentId, required String reactionValue}) Future<void>
Adds or updates a reaction to a specified comment for the user whose identity is used to make the request. You can only add or update a reaction for yourself. You cannot add, modify, or delete a reaction for another user.
putFile({required String branchName, required Uint8List fileContent, required String filePath, required String repositoryName, String? commitMessage, String? email, FileModeTypeEnum? fileMode, String? name, String? parentCommitId}) Future<PutFileOutput>
Adds or updates a file in a branch in an AWS CodeCommit repository, and generates a commit for the addition in the specified branch.
putRepositoryTriggers({required String repositoryName, required List<RepositoryTrigger> triggers}) Future<PutRepositoryTriggersOutput>
Replaces all triggers for a repository. Used to create or delete triggers.
tagResource({required String resourceArn, required Map<String, String> tags}) Future<void>
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.
testRepositoryTriggers({required String repositoryName, required List<RepositoryTrigger> triggers}) Future<TestRepositoryTriggersOutput>
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.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
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.
updateApprovalRuleTemplateContent({required String approvalRuleTemplateName, required String newRuleContent, String? existingRuleContentSha256}) Future<UpdateApprovalRuleTemplateContentOutput>
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.
updateApprovalRuleTemplateDescription({required String approvalRuleTemplateDescription, required String approvalRuleTemplateName}) Future<UpdateApprovalRuleTemplateDescriptionOutput>
Updates the description for a specified approval rule template.
updateApprovalRuleTemplateName({required String newApprovalRuleTemplateName, required String oldApprovalRuleTemplateName}) Future<UpdateApprovalRuleTemplateNameOutput>
Updates the name of a specified approval rule template.
updateComment({required String commentId, required String content}) Future<UpdateCommentOutput>
Replaces the contents of a comment.
updateDefaultBranch({required String defaultBranchName, required String repositoryName}) Future<void>
Sets or changes the default branch name for the specified repository.
updatePullRequestApprovalRuleContent({required String approvalRuleName, required String newRuleContent, required String pullRequestId, String? existingRuleContentSha256}) Future<UpdatePullRequestApprovalRuleContentOutput>
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.
updatePullRequestApprovalState({required ApprovalState approvalState, required String pullRequestId, required String revisionId}) Future<void>
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.
updatePullRequestDescription({required String description, required String pullRequestId}) Future<UpdatePullRequestDescriptionOutput>
Replaces the contents of the description of a pull request.
updatePullRequestStatus({required String pullRequestId, required PullRequestStatusEnum pullRequestStatus}) Future<UpdatePullRequestStatusOutput>
Updates the status of a pull request.
updatePullRequestTitle({required String pullRequestId, required String title}) Future<UpdatePullRequestTitleOutput>
Replaces the title of a pull request.
updateRepositoryDescription({required String repositoryName, String? repositoryDescription}) Future<void>
Sets or changes the comment or description for a repository.
updateRepositoryName({required String newName, required String oldName}) Future<void>
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.

Operators

operator ==(Object other) bool
The equality operator.
inherited