2018/02/21 - AWS CodeCommit - 1 new api methods
Changes This release adds an API for adding a file directly to an AWS CodeCommit repository without requiring a Git client.
Adds or updates a file in an AWS CodeCommit repository.
See also: AWS API Documentation
Request Syntax
client.put_file( repositoryName='string', branchName='string', fileContent=b'bytes', filePath='string', fileMode='EXECUTABLE'|'NORMAL'|'SYMLINK', parentCommitId='string', commitMessage='string', name='string', email='string' )
string
[REQUIRED]
The name of the repository where you want to add or update the file.
string
[REQUIRED]
The name of the branch where you want to add or update the file.
bytes
[REQUIRED]
The content of the file, in binary object format.
string
[REQUIRED]
The name of the file you want to add or update, including the relative path to the file in the repository.
Note
If the path does not currently exist in the repository, the path will be created as part of adding the file.
string
The file mode permissions of the blob. Valid file mode permissions are listed below.
string
The full commit ID of the head commit in the branch where you want to add or update the file. If the commit ID does not match the ID of the head commit at the time of the operation, an error will occur, and the file will not be added or updated.
string
A message about why this file was added or updated. While optional, adding a message is strongly encouraged in order to provide a more useful commit history for your repository.
string
The name of the person adding or updating the file. While optional, adding a name is strongly encouraged in order to provide a more useful commit history for your repository.
string
An email address for the person adding or updating the file.
dict
Response Syntax
{ 'commitId': 'string', 'blobId': 'string', 'treeId': 'string' }
Response Structure
(dict) --
commitId (string) --
The full SHA of the commit that contains this file change.
blobId (string) --
The ID of the blob, which is its SHA-1 pointer.
treeId (string) --
Tree information for the commit that contains this file change.