libZSservicesZSamazonka-codecommitZSamazonka-codecommit
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CodeCommit.PutFile

Description

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

Creating a Request

data PutFile Source #

See: newPutFile smart constructor.

Constructors

PutFile' 

Fields

  • email :: Maybe Text

    An email address for the person adding or updating the file.

  • fileMode :: Maybe FileModeTypeEnum

    The file mode permissions of the blob. Valid file mode permissions are listed here.

  • parentCommitId :: Maybe Text

    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.

  • name :: Maybe Text

    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.

  • commitMessage :: Maybe Text

    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.

  • repositoryName :: Text

    The name of the repository where you want to add or update the file.

  • branchName :: Text

    The name of the branch where you want to add or update the file. If this is an empty repository, this branch is created.

  • fileContent :: Base64

    The content of the file, in binary object format.

  • filePath :: Text

    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.

Instances

Instances details
Eq PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Methods

(==) :: PutFile -> PutFile -> Bool #

(/=) :: PutFile -> PutFile -> Bool #

Read PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Show PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Generic PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Associated Types

type Rep PutFile :: Type -> Type #

Methods

from :: PutFile -> Rep PutFile x #

to :: Rep PutFile x -> PutFile #

NFData PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Methods

rnf :: PutFile -> () #

Hashable PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Methods

hashWithSalt :: Int -> PutFile -> Int #

hash :: PutFile -> Int #

ToJSON PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

AWSRequest PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Associated Types

type AWSResponse PutFile #

ToHeaders PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Methods

toHeaders :: PutFile -> [Header] #

ToPath PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Methods

toPath :: PutFile -> ByteString #

ToQuery PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

type Rep PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

type AWSResponse PutFile Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

newPutFile Source #

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.

Constructors

PutFileResponse' 

Fields

  • httpStatus :: Int

    The response's http status code.

  • commitId :: Text

    The full SHA ID of the commit that contains this file change.

  • blobId :: Text

    The ID of the blob, which is its SHA-1 pointer.

  • treeId :: Text

    The full SHA-1 pointer of the tree information for the commit that contains this file change.

Instances

Instances details
Eq PutFileResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Read PutFileResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Show PutFileResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Generic PutFileResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Associated Types

type Rep PutFileResponse :: Type -> Type #

NFData PutFileResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

Methods

rnf :: PutFileResponse -> () #

type Rep PutFileResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.PutFile

type Rep PutFileResponse = D1 ('MetaData "PutFileResponse" "Amazonka.CodeCommit.PutFile" "libZSservicesZSamazonka-codecommitZSamazonka-codecommit" 'False) (C1 ('MetaCons "PutFileResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "commitId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "blobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "treeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newPutFileResponse Source #

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.