Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
Adds or updates a file in an AWS CodeCommit repository.
Synopsis
- putFile :: Text -> Text -> ByteString -> Text -> PutFile
- data PutFile
- pfEmail :: Lens' PutFile (Maybe Text)
- pfFileMode :: Lens' PutFile (Maybe FileModeTypeEnum)
- pfParentCommitId :: Lens' PutFile (Maybe Text)
- pfName :: Lens' PutFile (Maybe Text)
- pfCommitMessage :: Lens' PutFile (Maybe Text)
- pfRepositoryName :: Lens' PutFile Text
- pfBranchName :: Lens' PutFile Text
- pfFileContent :: Lens' PutFile ByteString
- pfFilePath :: Lens' PutFile Text
- putFileResponse :: Int -> Text -> Text -> Text -> PutFileResponse
- data PutFileResponse
- pfrsResponseStatus :: Lens' PutFileResponse Int
- pfrsCommitId :: Lens' PutFileResponse Text
- pfrsBlobId :: Lens' PutFileResponse Text
- pfrsTreeId :: Lens' PutFileResponse Text
Creating a Request
Creates a value of PutFile
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
pfEmail
- An email address for the person adding or updating the file.pfFileMode
- The file mode permissions of the blob. Valid file mode permissions are listed below.pfParentCommitId
- 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.pfName
- 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.pfCommitMessage
- 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.pfRepositoryName
- The name of the repository where you want to add or update the file.pfBranchName
- The name of the branch where you want to add or update the file.pfFileContent
- The content of the file, in binary object format. -- Note: ThisLens
automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLens
accepts and returns only raw unencoded data.pfFilePath
- The name of the file you want to add or update, including the relative path to the file in the repository.
See: putFile
smart constructor.
Instances
Request Lenses
pfEmail :: Lens' PutFile (Maybe Text) Source #
An email address for the person adding or updating the file.
pfFileMode :: Lens' PutFile (Maybe FileModeTypeEnum) Source #
The file mode permissions of the blob. Valid file mode permissions are listed below.
pfParentCommitId :: 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 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.
pfName :: Lens' PutFile (Maybe Text) Source #
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.
pfCommitMessage :: Lens' PutFile (Maybe Text) Source #
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.
pfRepositoryName :: Lens' PutFile Text Source #
The name of the repository where you want to add or update the file.
pfBranchName :: Lens' PutFile Text Source #
The name of the branch where you want to add or update the file.
pfFileContent :: 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.
pfFilePath :: 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.
Destructuring the Response
Creates a value of PutFileResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
pfrsResponseStatus
- -- | The response status code.pfrsCommitId
- The full SHA of the commit that contains this file change.pfrsBlobId
- The ID of the blob, which is its SHA-1 pointer.pfrsTreeId
- Tree information for the commit that contains this file change.
data PutFileResponse Source #
See: putFileResponse
smart constructor.
Instances
Response Lenses
pfrsResponseStatus :: Lens' PutFileResponse Int Source #
- - | The response status code.
pfrsCommitId :: Lens' PutFileResponse Text Source #
The full SHA of the commit that contains this file change.
pfrsBlobId :: Lens' PutFileResponse Text Source #
The ID of the blob, which is its SHA-1 pointer.
pfrsTreeId :: Lens' PutFileResponse Text Source #
Tree information for the commit that contains this file change.