AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

PutFileInput

import "github.com/aws/aws-sdk-go/service/codecommit"

type PutFileInput struct { BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` CommitMessage *string `locationName:"commitMessage" type:"string"` Email *string `locationName:"email" type:"string"` FileContent []byte `locationName:"fileContent" type:"blob" required:"true"` FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"` FilePath *string `locationName:"filePath" type:"string" required:"true"` Name *string `locationName:"name" type:"string"` ParentCommitId *string `locationName:"parentCommitId" type:"string"` RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` }

BranchName

Type: *string

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

BranchName is a required field

CommitMessage

Type: *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.

Email

Type: *string

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

FileContent

Type: []byte

The content of the file, in binary object format.

FileContent is automatically base64 encoded/decoded by the SDK.

FileContent is a required field

FileMode

Type: *string

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

FilePath

Type: *string

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 will be created as part of adding the file.

FilePath is a required field

Name

Type: *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.

ParentCommitId

Type: *string

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, or an error will occur, and the file will not be added or updated.

RepositoryName

Type: *string

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

RepositoryName is a required field

Method

GoString

func (s PutFileInput) GoString() string

GoString returns the string representation

SetBranchName

func (s *PutFileInput) SetBranchName(v string) *PutFileInput

SetBranchName sets the BranchName field's value.

SetCommitMessage

func (s *PutFileInput) SetCommitMessage(v string) *PutFileInput

SetCommitMessage sets the CommitMessage field's value.

SetEmail

func (s *PutFileInput) SetEmail(v string) *PutFileInput

SetEmail sets the Email field's value.

SetFileContent

func (s *PutFileInput) SetFileContent(v []byte) *PutFileInput

SetFileContent sets the FileContent field's value.

SetFileMode

func (s *PutFileInput) SetFileMode(v string) *PutFileInput

SetFileMode sets the FileMode field's value.

SetFilePath

func (s *PutFileInput) SetFilePath(v string) *PutFileInput

SetFilePath sets the FilePath field's value.

SetName

func (s *PutFileInput) SetName(v string) *PutFileInput

SetName sets the Name field's value.

SetParentCommitId

func (s *PutFileInput) SetParentCommitId(v string) *PutFileInput

SetParentCommitId sets the ParentCommitId field's value.

SetRepositoryName

func (s *PutFileInput) SetRepositoryName(v string) *PutFileInput

SetRepositoryName sets the RepositoryName field's value.

String

func (s PutFileInput) String() string

String returns the string representation

Validate

func (s *PutFileInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: