Skip to content

CodeCommitClient#

Index > CodeCommit > CodeCommitClient

Auto-generated documentation for CodeCommit type annotations stubs module mypy-boto3-codecommit.

CodeCommitClient#

Type annotations and code completion for boto3.client("codecommit"). boto3 documentation

# CodeCommitClient usage example

from boto3.session import Session
from mypy_boto3_codecommit.client import CodeCommitClient

def get_codecommit_client() -> CodeCommitClient:
    return Session().client("codecommit")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("codecommit").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("codecommit")

try:
    do_something(client)
except (
    client.exceptions.ActorDoesNotExistException,
    client.exceptions.ApprovalRuleContentRequiredException,
    client.exceptions.ApprovalRuleDoesNotExistException,
    client.exceptions.ApprovalRuleNameAlreadyExistsException,
    client.exceptions.ApprovalRuleNameRequiredException,
    client.exceptions.ApprovalRuleTemplateContentRequiredException,
    client.exceptions.ApprovalRuleTemplateDoesNotExistException,
    client.exceptions.ApprovalRuleTemplateInUseException,
    client.exceptions.ApprovalRuleTemplateNameAlreadyExistsException,
    client.exceptions.ApprovalRuleTemplateNameRequiredException,
    client.exceptions.ApprovalStateRequiredException,
    client.exceptions.AuthorDoesNotExistException,
    client.exceptions.BeforeCommitIdAndAfterCommitIdAreSameException,
    client.exceptions.BlobIdDoesNotExistException,
    client.exceptions.BlobIdRequiredException,
    client.exceptions.BranchDoesNotExistException,
    client.exceptions.BranchNameExistsException,
    client.exceptions.BranchNameIsTagNameException,
    client.exceptions.BranchNameRequiredException,
    client.exceptions.CannotDeleteApprovalRuleFromTemplateException,
    client.exceptions.CannotModifyApprovalRuleFromTemplateException,
    client.exceptions.ClientError,
    client.exceptions.ClientRequestTokenRequiredException,
    client.exceptions.CommentContentRequiredException,
    client.exceptions.CommentContentSizeLimitExceededException,
    client.exceptions.CommentDeletedException,
    client.exceptions.CommentDoesNotExistException,
    client.exceptions.CommentIdRequiredException,
    client.exceptions.CommentNotCreatedByCallerException,
    client.exceptions.CommitDoesNotExistException,
    client.exceptions.CommitIdDoesNotExistException,
    client.exceptions.CommitIdRequiredException,
    client.exceptions.CommitIdsLimitExceededException,
    client.exceptions.CommitIdsListRequiredException,
    client.exceptions.CommitMessageLengthExceededException,
    client.exceptions.CommitRequiredException,
    client.exceptions.ConcurrentReferenceUpdateException,
    client.exceptions.DefaultBranchCannotBeDeletedException,
    client.exceptions.DirectoryNameConflictsWithFileNameException,
    client.exceptions.EncryptionIntegrityChecksFailedException,
    client.exceptions.EncryptionKeyAccessDeniedException,
    client.exceptions.EncryptionKeyDisabledException,
    client.exceptions.EncryptionKeyInvalidIdException,
    client.exceptions.EncryptionKeyInvalidUsageException,
    client.exceptions.EncryptionKeyNotFoundException,
    client.exceptions.EncryptionKeyRequiredException,
    client.exceptions.EncryptionKeyUnavailableException,
    client.exceptions.FileContentAndSourceFileSpecifiedException,
    client.exceptions.FileContentRequiredException,
    client.exceptions.FileContentSizeLimitExceededException,
    client.exceptions.FileDoesNotExistException,
    client.exceptions.FileEntryRequiredException,
    client.exceptions.FileModeRequiredException,
    client.exceptions.FileNameConflictsWithDirectoryNameException,
    client.exceptions.FilePathConflictsWithSubmodulePathException,
    client.exceptions.FileTooLargeException,
    client.exceptions.FolderContentSizeLimitExceededException,
    client.exceptions.FolderDoesNotExistException,
    client.exceptions.IdempotencyParameterMismatchException,
    client.exceptions.InvalidActorArnException,
    client.exceptions.InvalidApprovalRuleContentException,
    client.exceptions.InvalidApprovalRuleNameException,
    client.exceptions.InvalidApprovalRuleTemplateContentException,
    client.exceptions.InvalidApprovalRuleTemplateDescriptionException,
    client.exceptions.InvalidApprovalRuleTemplateNameException,
    client.exceptions.InvalidApprovalStateException,
    client.exceptions.InvalidAuthorArnException,
    client.exceptions.InvalidBlobIdException,
    client.exceptions.InvalidBranchNameException,
    client.exceptions.InvalidClientRequestTokenException,
    client.exceptions.InvalidCommentIdException,
    client.exceptions.InvalidCommitException,
    client.exceptions.InvalidCommitIdException,
    client.exceptions.InvalidConflictDetailLevelException,
    client.exceptions.InvalidConflictResolutionException,
    client.exceptions.InvalidConflictResolutionStrategyException,
    client.exceptions.InvalidContinuationTokenException,
    client.exceptions.InvalidDeletionParameterException,
    client.exceptions.InvalidDescriptionException,
    client.exceptions.InvalidDestinationCommitSpecifierException,
    client.exceptions.InvalidEmailException,
    client.exceptions.InvalidFileLocationException,
    client.exceptions.InvalidFileModeException,
    client.exceptions.InvalidFilePositionException,
    client.exceptions.InvalidMaxConflictFilesException,
    client.exceptions.InvalidMaxMergeHunksException,
    client.exceptions.InvalidMaxResultsException,
    client.exceptions.InvalidMergeOptionException,
    client.exceptions.InvalidOrderException,
    client.exceptions.InvalidOverrideStatusException,
    client.exceptions.InvalidParentCommitIdException,
    client.exceptions.InvalidPathException,
    client.exceptions.InvalidPullRequestEventTypeException,
    client.exceptions.InvalidPullRequestIdException,
    client.exceptions.InvalidPullRequestStatusException,
    client.exceptions.InvalidPullRequestStatusUpdateException,
    client.exceptions.InvalidReactionUserArnException,
    client.exceptions.InvalidReactionValueException,
    client.exceptions.InvalidReferenceNameException,
    client.exceptions.InvalidRelativeFileVersionEnumException,
    client.exceptions.InvalidReplacementContentException,
    client.exceptions.InvalidReplacementTypeException,
    client.exceptions.InvalidRepositoryDescriptionException,
    client.exceptions.InvalidRepositoryNameException,
    client.exceptions.InvalidRepositoryTriggerBranchNameException,
    client.exceptions.InvalidRepositoryTriggerCustomDataException,
    client.exceptions.InvalidRepositoryTriggerDestinationArnException,
    client.exceptions.InvalidRepositoryTriggerEventsException,
    client.exceptions.InvalidRepositoryTriggerNameException,
    client.exceptions.InvalidRepositoryTriggerRegionException,
    client.exceptions.InvalidResourceArnException,
    client.exceptions.InvalidRevisionIdException,
    client.exceptions.InvalidRuleContentSha256Exception,
    client.exceptions.InvalidSortByException,
    client.exceptions.InvalidSourceCommitSpecifierException,
    client.exceptions.InvalidSystemTagUsageException,
    client.exceptions.InvalidTagKeysListException,
    client.exceptions.InvalidTagsMapException,
    client.exceptions.InvalidTargetBranchException,
    client.exceptions.InvalidTargetException,
    client.exceptions.InvalidTargetsException,
    client.exceptions.InvalidTitleException,
    client.exceptions.ManualMergeRequiredException,
    client.exceptions.MaximumBranchesExceededException,
    client.exceptions.MaximumConflictResolutionEntriesExceededException,
    client.exceptions.MaximumFileContentToLoadExceededException,
    client.exceptions.MaximumFileEntriesExceededException,
    client.exceptions.MaximumItemsToCompareExceededException,
    client.exceptions.MaximumNumberOfApprovalsExceededException,
    client.exceptions.MaximumOpenPullRequestsExceededException,
    client.exceptions.MaximumRepositoryNamesExceededException,
    client.exceptions.MaximumRepositoryTriggersExceededException,
    client.exceptions.MaximumRuleTemplatesAssociatedWithRepositoryException,
    client.exceptions.MergeOptionRequiredException,
    client.exceptions.MultipleConflictResolutionEntriesException,
    client.exceptions.MultipleRepositoriesInPullRequestException,
    client.exceptions.NameLengthExceededException,
    client.exceptions.NoChangeException,
    client.exceptions.NumberOfRuleTemplatesExceededException,
    client.exceptions.NumberOfRulesExceededException,
    client.exceptions.OverrideAlreadySetException,
    client.exceptions.OverrideStatusRequiredException,
    client.exceptions.ParentCommitDoesNotExistException,
    client.exceptions.ParentCommitIdOutdatedException,
    client.exceptions.ParentCommitIdRequiredException,
    client.exceptions.PathDoesNotExistException,
    client.exceptions.PathRequiredException,
    client.exceptions.PullRequestAlreadyClosedException,
    client.exceptions.PullRequestApprovalRulesNotSatisfiedException,
    client.exceptions.PullRequestCannotBeApprovedByAuthorException,
    client.exceptions.PullRequestDoesNotExistException,
    client.exceptions.PullRequestIdRequiredException,
    client.exceptions.PullRequestStatusRequiredException,
    client.exceptions.PutFileEntryConflictException,
    client.exceptions.ReactionLimitExceededException,
    client.exceptions.ReactionValueRequiredException,
    client.exceptions.ReferenceDoesNotExistException,
    client.exceptions.ReferenceNameRequiredException,
    client.exceptions.ReferenceTypeNotSupportedException,
    client.exceptions.ReplacementContentRequiredException,
    client.exceptions.ReplacementTypeRequiredException,
    client.exceptions.RepositoryDoesNotExistException,
    client.exceptions.RepositoryLimitExceededException,
    client.exceptions.RepositoryNameExistsException,
    client.exceptions.RepositoryNameRequiredException,
    client.exceptions.RepositoryNamesRequiredException,
    client.exceptions.RepositoryNotAssociatedWithPullRequestException,
    client.exceptions.RepositoryTriggerBranchNameListRequiredException,
    client.exceptions.RepositoryTriggerDestinationArnRequiredException,
    client.exceptions.RepositoryTriggerEventsListRequiredException,
    client.exceptions.RepositoryTriggerNameRequiredException,
    client.exceptions.RepositoryTriggersListRequiredException,
    client.exceptions.ResourceArnRequiredException,
    client.exceptions.RestrictedSourceFileException,
    client.exceptions.RevisionIdRequiredException,
    client.exceptions.RevisionNotCurrentException,
    client.exceptions.SameFileContentException,
    client.exceptions.SamePathRequestException,
    client.exceptions.SourceAndDestinationAreSameException,
    client.exceptions.SourceFileOrContentRequiredException,
    client.exceptions.TagKeysListRequiredException,
    client.exceptions.TagPolicyException,
    client.exceptions.TagsMapRequiredException,
    client.exceptions.TargetRequiredException,
    client.exceptions.TargetsRequiredException,
    client.exceptions.TipOfSourceReferenceIsDifferentException,
    client.exceptions.TipsDivergenceExceededException,
    client.exceptions.TitleRequiredException,
    client.exceptions.TooManyTagsException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_codecommit.client import Exceptions

def handle_error(exc: Exceptions.ActorDoesNotExistException) -> None:
    ...

Methods#

associate_approval_rule_template_with_repository#

Creates an association between an approval rule template and a specified repository.

Type annotations and code completion for boto3.client("codecommit").associate_approval_rule_template_with_repository method. boto3 documentation

# associate_approval_rule_template_with_repository method definition

def associate_approval_rule_template_with_repository(
    self,
    *,
    approvalRuleTemplateName: str,
    repositoryName: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# associate_approval_rule_template_with_repository method usage example with argument unpacking

kwargs: AssociateApprovalRuleTemplateWithRepositoryInputRequestTypeDef = {  # (1)
    "approvalRuleTemplateName": ...,
    "repositoryName": ...,
}

parent.associate_approval_rule_template_with_repository(**kwargs)
  1. See AssociateApprovalRuleTemplateWithRepositoryInputRequestTypeDef

batch_associate_approval_rule_template_with_repositories#

Creates an association between an approval rule template and one or more specified repositories.

Type annotations and code completion for boto3.client("codecommit").batch_associate_approval_rule_template_with_repositories method. boto3 documentation

# batch_associate_approval_rule_template_with_repositories method definition

def batch_associate_approval_rule_template_with_repositories(
    self,
    *,
    approvalRuleTemplateName: str,
    repositoryNames: Sequence[str],
) -> BatchAssociateApprovalRuleTemplateWithRepositoriesOutputTypeDef:  # (1)
    ...
  1. See BatchAssociateApprovalRuleTemplateWithRepositoriesOutputTypeDef
# batch_associate_approval_rule_template_with_repositories method usage example with argument unpacking

kwargs: BatchAssociateApprovalRuleTemplateWithRepositoriesInputRequestTypeDef = {  # (1)
    "approvalRuleTemplateName": ...,
    "repositoryNames": ...,
}

parent.batch_associate_approval_rule_template_with_repositories(**kwargs)
  1. See BatchAssociateApprovalRuleTemplateWithRepositoriesInputRequestTypeDef

batch_describe_merge_conflicts#

Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.

Type annotations and code completion for boto3.client("codecommit").batch_describe_merge_conflicts method. boto3 documentation

# batch_describe_merge_conflicts method definition

def batch_describe_merge_conflicts(
    self,
    *,
    repositoryName: str,
    destinationCommitSpecifier: str,
    sourceCommitSpecifier: str,
    mergeOption: MergeOptionTypeEnumType,  # (1)
    maxMergeHunks: int = ...,
    maxConflictFiles: int = ...,
    filePaths: Sequence[str] = ...,
    conflictDetailLevel: ConflictDetailLevelTypeEnumType = ...,  # (2)
    conflictResolutionStrategy: ConflictResolutionStrategyTypeEnumType = ...,  # (3)
    nextToken: str = ...,
) -> BatchDescribeMergeConflictsOutputTypeDef:  # (4)
    ...
  1. See MergeOptionTypeEnumType
  2. See ConflictDetailLevelTypeEnumType
  3. See ConflictResolutionStrategyTypeEnumType
  4. See BatchDescribeMergeConflictsOutputTypeDef
# batch_describe_merge_conflicts method usage example with argument unpacking

kwargs: BatchDescribeMergeConflictsInputRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "destinationCommitSpecifier": ...,
    "sourceCommitSpecifier": ...,
    "mergeOption": ...,
}

parent.batch_describe_merge_conflicts(**kwargs)
  1. See BatchDescribeMergeConflictsInputRequestTypeDef

batch_disassociate_approval_rule_template_from_repositories#

Removes the association between an approval rule template and one or more specified repositories.

Type annotations and code completion for boto3.client("codecommit").batch_disassociate_approval_rule_template_from_repositories method. boto3 documentation

# batch_disassociate_approval_rule_template_from_repositories method definition

def batch_disassociate_approval_rule_template_from_repositories(
    self,
    *,
    approvalRuleTemplateName: str,
    repositoryNames: Sequence[str],
) -> BatchDisassociateApprovalRuleTemplateFromRepositoriesOutputTypeDef:  # (1)
    ...
  1. See BatchDisassociateApprovalRuleTemplateFromRepositoriesOutputTypeDef
# batch_disassociate_approval_rule_template_from_repositories method usage example with argument unpacking

kwargs: BatchDisassociateApprovalRuleTemplateFromRepositoriesInputRequestTypeDef = {  # (1)
    "approvalRuleTemplateName": ...,
    "repositoryNames": ...,
}

parent.batch_disassociate_approval_rule_template_from_repositories(**kwargs)
  1. See BatchDisassociateApprovalRuleTemplateFromRepositoriesInputRequestTypeDef

batch_get_commits#

Returns information about the contents of one or more commits in a repository.

Type annotations and code completion for boto3.client("codecommit").batch_get_commits method. boto3 documentation

# batch_get_commits method definition

def batch_get_commits(
    self,
    *,
    commitIds: Sequence[str],
    repositoryName: str,
) -> BatchGetCommitsOutputTypeDef:  # (1)
    ...
  1. See BatchGetCommitsOutputTypeDef
# batch_get_commits method usage example with argument unpacking

kwargs: BatchGetCommitsInputRequestTypeDef = {  # (1)
    "commitIds": ...,
    "repositoryName": ...,
}

parent.batch_get_commits(**kwargs)
  1. See BatchGetCommitsInputRequestTypeDef

batch_get_repositories#

Returns information about one or more repositories.

Type annotations and code completion for boto3.client("codecommit").batch_get_repositories method. boto3 documentation

# batch_get_repositories method definition

def batch_get_repositories(
    self,
    *,
    repositoryNames: Sequence[str],
) -> BatchGetRepositoriesOutputTypeDef:  # (1)
    ...
  1. See BatchGetRepositoriesOutputTypeDef
# batch_get_repositories method usage example with argument unpacking

kwargs: BatchGetRepositoriesInputRequestTypeDef = {  # (1)
    "repositoryNames": ...,
}

parent.batch_get_repositories(**kwargs)
  1. See BatchGetRepositoriesInputRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("codecommit").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("codecommit").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_approval_rule_template#