Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Adds or updates a file in a branch in an AWS CodeCommit repository, and generates a commit for the addition in the specified branch.
Synopsis
- data PutFile = PutFile' {
- email :: Maybe Text
- fileMode :: Maybe FileModeTypeEnum
- parentCommitId :: Maybe Text
- name :: Maybe Text
- commitMessage :: Maybe Text
- repositoryName :: Text
- branchName :: Text
- fileContent :: Base64
- filePath :: Text
- newPutFile :: Text -> Text -> ByteString -> Text -> PutFile
- putFile_email :: Lens' PutFile (Maybe Text)
- putFile_fileMode :: Lens' PutFile (Maybe FileModeTypeEnum)
- putFile_parentCommitId :: Lens' PutFile (Maybe Text)
- putFile_name :: Lens' PutFile (Maybe Text)
- putFile_commitMessage :: Lens' PutFile (Maybe Text)
- putFile_repositoryName :: Lens' PutFile Text
- putFile_branchName :: Lens' PutFile Text
- putFile_fileContent :: Lens' PutFile ByteString
- putFile_filePath :: Lens' PutFile Text
- data PutFileResponse = PutFileResponse' {}
- newPutFileResponse :: Int -> Text -> Text -> Text -> PutFileResponse
- putFileResponse_httpStatus :: Lens' PutFileResponse Int
- putFileResponse_commitId :: Lens' PutFileResponse Text
- putFileResponse_blobId :: Lens' PutFileResponse Text
- putFileResponse_treeId :: Lens' PutFileResponse Text
Creating a Request
See: newPutFile
smart constructor.
PutFile' | |
|
Instances
:: Text | |
-> Text | |
-> ByteString | |
-> Text | |
-> PutFile |
Create a value of PutFile
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:email:PutFile'
, putFile_email
- An email address for the person adding or updating the file.
$sel:fileMode:PutFile'
, putFile_fileMode
- The file mode permissions of the blob. Valid file mode permissions are
listed here.
$sel:parentCommitId:PutFile'
, putFile_parentCommitId
- The full commit ID of the head commit in the branch where you want to
add or update the file. If this is an empty repository, no commit ID is
required. If this is not an empty repository, a commit ID is required.
The commit ID must match the ID of the head commit at the time of the operation. Otherwise, an error occurs, and the file is not added or updated.
$sel:name:PutFile'
, putFile_name
- The name of the person adding or updating the file. Although it is
optional, a name makes the commit history for your repository more
useful.
$sel:commitMessage:PutFile'
, putFile_commitMessage
- A message about why this file was added or updated. Although it is
optional, a message makes the commit history for your repository more
useful.
$sel:repositoryName:PutFile'
, putFile_repositoryName
- The name of the repository where you want to add or update the file.
$sel:branchName:PutFile'
, putFile_branchName
- The name of the branch where you want to add or update the file. If this
is an empty repository, this branch is created.
$sel:fileContent:PutFile'
, putFile_fileContent
- The content of the file, in binary object format.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
$sel:filePath:PutFile'
, putFile_filePath
- The name of the file you want to add or update, including the relative
path to the file in the repository.
If the path does not currently exist in the repository, the path is created as part of adding the file.
Request Lenses
putFile_email :: Lens' PutFile (Maybe Text) Source #
An email address for the person adding or updating the file.
putFile_fileMode :: Lens' PutFile (Maybe FileModeTypeEnum) Source #
The file mode permissions of the blob. Valid file mode permissions are listed here.
putFile_parentCommitId :: Lens' PutFile (Maybe Text) Source #
The full commit ID of the head commit in the branch where you want to add or update the file. If this is an empty repository, no commit ID is required. If this is not an empty repository, a commit ID is required.
The commit ID must match the ID of the head commit at the time of the operation. Otherwise, an error occurs, and the file is not added or updated.
putFile_name :: Lens' PutFile (Maybe Text) Source #
The name of the person adding or updating the file. Although it is optional, a name makes the commit history for your repository more useful.
putFile_commitMessage :: Lens' PutFile (Maybe Text) Source #
A message about why this file was added or updated. Although it is optional, a message makes the commit history for your repository more useful.
putFile_repositoryName :: Lens' PutFile Text Source #
The name of the repository where you want to add or update the file.
putFile_branchName :: Lens' PutFile Text Source #
The name of the branch where you want to add or update the file. If this is an empty repository, this branch is created.
putFile_fileContent :: Lens' PutFile ByteString Source #
The content of the file, in binary object format.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
putFile_filePath :: Lens' PutFile Text Source #
The name of the file you want to add or update, including the relative path to the file in the repository.
If the path does not currently exist in the repository, the path is created as part of adding the file.
Destructuring the Response
data PutFileResponse Source #
See: newPutFileResponse
smart constructor.
Instances
:: Int | |
-> Text | |
-> Text | |
-> Text | |
-> PutFileResponse |
Create a value of PutFileResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:PutFileResponse'
, putFileResponse_httpStatus
- The response's http status code.
$sel:commitId:PutFileResponse'
, putFileResponse_commitId
- The full SHA ID of the commit that contains this file change.
$sel:blobId:PutFileResponse'
, putFileResponse_blobId
- The ID of the blob, which is its SHA-1 pointer.
$sel:treeId:PutFileResponse'
, putFileResponse_treeId
- The full SHA-1 pointer of the tree information for the commit that
contains this file change.
Response Lenses
putFileResponse_httpStatus :: Lens' PutFileResponse Int Source #
The response's http status code.
putFileResponse_commitId :: Lens' PutFileResponse Text Source #
The full SHA ID of the commit that contains this file change.
putFileResponse_blobId :: Lens' PutFileResponse Text Source #
The ID of the blob, which is its SHA-1 pointer.
putFileResponse_treeId :: Lens' PutFileResponse Text Source #
The full SHA-1 pointer of the tree information for the commit that contains this file change.