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.

CreateUserInput

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

type CreateUserInput struct { HomeDirectory *string `type:"string"` Policy *string `type:"string"` Role *string `type:"string" required:"true"` ServerId *string `type:"string" required:"true"` SshPublicKeyBody *string `type:"string"` Tags []*Tag `min:"1" type:"list"` UserName *string `type:"string" required:"true"` }

HomeDirectory

Type: *string

The landing directory (folder) for a user when they log in to the server using their SFTP client. An example is /home/username.

Policy

Type: *string

A scope-down policy for your user so you can use the same IAM role across multiple users. This policy scopes down user access to portions of their Amazon S3 bucket. Variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

Role

Type: *string

The IAM role that controls your user’s access to your Amazon S3 bucket. The policies attached to this role will determine the level of access you want to provide your users when transferring files into and out of your Amazon S3 bucket or buckets. The IAM role should also contain a trust relationship that allows the SFTP server to access your resources when servicing your SFTP user’s transfer requests.

Role is a required field

ServerId

Type: *string

A system-assigned unique identifier for an SFTP server instance. This is the specific SFTP server that you added your user to.

ServerId is a required field

SshPublicKeyBody

Type: *string

The public portion of the Secure Shall (SSH) key used to authenticate the user to the SFTP server.

Tags

Creates a key-value pair for a specific resource. Tags are metadata that you can use to search for and group a resource for various purposes. You can apply tags to servers, users, and roles. A tag key can take more than one value. For example, to group servers for accounting purposes, you might create a tag called Group and assign the values Research and Accounting to that group.

UserName

Type: *string

A unique string that identifies a user and is associated with a server as specified by the ServerId.

UserName is a required field

Method

GoString

func (s CreateUserInput) GoString() string

GoString returns the string representation

SetHomeDirectory

func (s *CreateUserInput) SetHomeDirectory(v string) *CreateUserInput

SetHomeDirectory sets the HomeDirectory field's value.

SetPolicy

func (s *CreateUserInput) SetPolicy(v string) *CreateUserInput

SetPolicy sets the Policy field's value.

SetRole

func (s *CreateUserInput) SetRole(v string) *CreateUserInput

SetRole sets the Role field's value.

SetServerId

func (s *CreateUserInput) SetServerId(v string) *CreateUserInput

SetServerId sets the ServerId field's value.

SetSshPublicKeyBody

func (s *CreateUserInput) SetSshPublicKeyBody(v string) *CreateUserInput

SetSshPublicKeyBody sets the SshPublicKeyBody field's value.

SetTags

func (s *CreateUserInput) SetTags(v []*Tag) *CreateUserInput

SetTags sets the Tags field's value.

SetUserName

func (s *CreateUserInput) SetUserName(v string) *CreateUserInput

SetUserName sets the UserName field's value.

String

func (s CreateUserInput) String() string

String returns the string representation

Validate

func (s *CreateUserInput) Validate() error

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

On this page: