| 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 |
Network.AWS.CodeCommit.PutFile
Description
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
Arguments
| :: Text | |
| -> Text | |
| -> ByteString | |
| -> Text | |
| -> PutFile |
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: ThisLensautomatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLensaccepts 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
pfFileMode :: Lens' PutFile (Maybe FileModeTypeEnum) #
The file mode permissions of the blob. Valid file mode permissions are listed below.
pfParentCommitId :: Lens' PutFile (Maybe Text) #
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) #
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) #
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 #
The name of the repository where you want to add or update the file.
pfBranchName :: Lens' PutFile Text #
The name of the branch where you want to add or update the file.
pfFileContent :: Lens' PutFile ByteString #
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 #
The name of the file you want to add or update, including the relative path to the file in the repository.
Destructuring the Response
Arguments
| :: Int | |
| -> Text | |
| -> Text | |
| -> Text | |
| -> PutFileResponse |
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 #
See: putFileResponse smart constructor.
Instances
Response Lenses
pfrsResponseStatus :: Lens' PutFileResponse Int #
- - | The response status code.
pfrsCommitId :: Lens' PutFileResponse Text #
The full SHA of the commit that contains this file change.
pfrsBlobId :: Lens' PutFileResponse Text #
The ID of the blob, which is its SHA-1 pointer.
pfrsTreeId :: Lens' PutFileResponse Text #
Tree information for the commit that contains this file change.