Skip to main content

commits

Creates, updates, deletes, gets or lists a commits resource.

Overview​

Namecommits
TypeResource
Idaws.codecommit.commits

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
commitsarrayAn array of commit data type objects, each of which contains information about a specified commit.
errorsarrayReturns any commit IDs for which information could not be found. For example, if one of the commit IDs was a shortened SHA ID or that commit was not found in the specified repository, the ID returns an error object with more information.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_commitsselectregionReturns information about the contents of one or more commits in a repository.
get_commitselectregionReturns information about a commit, including commit message and committer information.
create_commitinsertregion, repositoryName, branchNameCreates a commit for a repository on the tip of a specified branch.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples​

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

SELECT
commits,
errors
FROM aws.codecommit.commits
WHERE region = '{{ region }}' -- required
;

INSERT examples​

Creates a commit for a repository on the tip of a specified branch.

INSERT INTO aws.codecommit.commits (
repositoryName,
branchName,
parentCommitId,
authorName,
email,
commitMessage,
keepEmptyFolders,
putFiles,
deleteFiles,
setFileModes,
region
)
SELECT
'{{ repositoryName }}' /* required */,
'{{ branchName }}' /* required */,
'{{ parentCommitId }}',
'{{ authorName }}',
'{{ email }}',
'{{ commitMessage }}',
{{ keepEmptyFolders }},
'{{ putFiles }}',
'{{ deleteFiles }}',
'{{ setFileModes }}',
'{{ region }}'
RETURNING
commit_id,
files_added,
files_deleted,
files_updated,
tree_id
;