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.RepositoryNameRequiredException
CodeCommit.Client.exceptions.InvalidRepositoryNameException
CodeCommit.Client.exceptions.RepositoryDoesNotExistException
CodeCommit.Client.exceptions.ParentCommitIdRequiredException
CodeCommit.Client.exceptions.InvalidParentCommitIdException
CodeCommit.Client.exceptions.ParentCommitDoesNotExistException
CodeCommit.Client.exceptions.ParentCommitIdOutdatedException
CodeCommit.Client.exceptions.BranchNameRequiredException
CodeCommit.Client.exceptions.InvalidBranchNameException
CodeCommit.Client.exceptions.BranchDoesNotExistException
CodeCommit.Client.exceptions.BranchNameIsTagNameException
CodeCommit.Client.exceptions.FileEntryRequiredException
CodeCommit.Client.exceptions.MaximumFileEntriesExceededException
CodeCommit.Client.exceptions.PutFileEntryConflictException
CodeCommit.Client.exceptions.SourceFileOrContentRequiredException
CodeCommit.Client.exceptions.FileContentAndSourceFileSpecifiedException
CodeCommit.Client.exceptions.PathRequiredException
CodeCommit.Client.exceptions.InvalidPathException
CodeCommit.Client.exceptions.SamePathRequestException
CodeCommit.Client.exceptions.FileDoesNotExistException
CodeCommit.Client.exceptions.FileContentSizeLimitExceededException
CodeCommit.Client.exceptions.FolderContentSizeLimitExceededException
CodeCommit.Client.exceptions.InvalidDeletionParameterException
CodeCommit.Client.exceptions.RestrictedSourceFileException
CodeCommit.Client.exceptions.FileModeRequiredException
CodeCommit.Client.exceptions.InvalidFileModeException
CodeCommit.Client.exceptions.NameLengthExceededException
CodeCommit.Client.exceptions.InvalidEmailException
CodeCommit.Client.exceptions.CommitMessageLengthExceededException
CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException
CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException
CodeCommit.Client.exceptions.EncryptionKeyDisabledException
CodeCommit.Client.exceptions.EncryptionKeyNotFoundException
CodeCommit.Client.exceptions.EncryptionKeyUnavailableException
CodeCommit.Client.exceptions.NoChangeException
CodeCommit.Client.exceptions.FileNameConflictsWithDirectoryNameException
CodeCommit.Client.exceptions.DirectoryNameConflictsWithFileNameException
CodeCommit.Client.exceptions.FilePathConflictsWithSubmodulePathException