CodeCommit.Client.create_commit(**kwargs)¶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
CodeCommit.Client.exceptions.RepositoryNameRequiredExceptionCodeCommit.Client.exceptions.InvalidRepositoryNameExceptionCodeCommit.Client.exceptions.RepositoryDoesNotExistExceptionCodeCommit.Client.exceptions.ParentCommitIdRequiredExceptionCodeCommit.Client.exceptions.InvalidParentCommitIdExceptionCodeCommit.Client.exceptions.ParentCommitDoesNotExistExceptionCodeCommit.Client.exceptions.ParentCommitIdOutdatedExceptionCodeCommit.Client.exceptions.BranchNameRequiredExceptionCodeCommit.Client.exceptions.InvalidBranchNameExceptionCodeCommit.Client.exceptions.BranchDoesNotExistExceptionCodeCommit.Client.exceptions.BranchNameIsTagNameExceptionCodeCommit.Client.exceptions.FileEntryRequiredExceptionCodeCommit.Client.exceptions.MaximumFileEntriesExceededExceptionCodeCommit.Client.exceptions.PutFileEntryConflictExceptionCodeCommit.Client.exceptions.SourceFileOrContentRequiredExceptionCodeCommit.Client.exceptions.FileContentAndSourceFileSpecifiedExceptionCodeCommit.Client.exceptions.PathRequiredExceptionCodeCommit.Client.exceptions.InvalidPathExceptionCodeCommit.Client.exceptions.SamePathRequestExceptionCodeCommit.Client.exceptions.FileDoesNotExistExceptionCodeCommit.Client.exceptions.FileContentSizeLimitExceededExceptionCodeCommit.Client.exceptions.FolderContentSizeLimitExceededExceptionCodeCommit.Client.exceptions.InvalidDeletionParameterExceptionCodeCommit.Client.exceptions.RestrictedSourceFileExceptionCodeCommit.Client.exceptions.FileModeRequiredExceptionCodeCommit.Client.exceptions.InvalidFileModeExceptionCodeCommit.Client.exceptions.NameLengthExceededExceptionCodeCommit.Client.exceptions.InvalidEmailExceptionCodeCommit.Client.exceptions.CommitMessageLengthExceededExceptionCodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedExceptionCodeCommit.Client.exceptions.EncryptionKeyAccessDeniedExceptionCodeCommit.Client.exceptions.EncryptionKeyDisabledExceptionCodeCommit.Client.exceptions.EncryptionKeyNotFoundExceptionCodeCommit.Client.exceptions.EncryptionKeyUnavailableExceptionCodeCommit.Client.exceptions.NoChangeExceptionCodeCommit.Client.exceptions.FileNameConflictsWithDirectoryNameExceptionCodeCommit.Client.exceptions.DirectoryNameConflictsWithFileNameExceptionCodeCommit.Client.exceptions.FilePathConflictsWithSubmodulePathException