« blib/lib/Paws/Transfer/UpdateServerResponse.pm
↑ Summary
blib/lib/Paws/Transfer/UpdateUserResponse.pm »
| 1 | |||
| 2 | package Paws::Transfer::UpdateUser; | ||
| 3 | use Moose; | ||
| 4 | has HomeDirectory => (is => 'ro', isa => 'Str'); | ||
| 5 | has HomeDirectoryMappings => (is => 'ro', isa => 'ArrayRef[Paws::Transfer::HomeDirectoryMapEntry]'); | ||
| 6 | has HomeDirectoryType => (is => 'ro', isa => 'Str'); | ||
| 7 | has Policy => (is => 'ro', isa => 'Str'); | ||
| 8 | has PosixProfile => (is => 'ro', isa => 'Paws::Transfer::PosixProfile'); | ||
| 9 | has Role => (is => 'ro', isa => 'Str'); | ||
| 10 | has ServerId => (is => 'ro', isa => 'Str', required => 1); | ||
| 11 | has UserName => (is => 'ro', isa => 'Str', required => 1); | ||
| 12 | |||
| 13 | use MooseX::ClassAttribute; | ||
| 14 | |||
| 15 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'UpdateUser'); | ||
| 16 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Transfer::UpdateUserResponse'); | ||
| 17 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 18 | 1; | ||
| 19 | |||
| 20 | ### main pod documentation begin ### | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Paws::Transfer::UpdateUser - Arguments for method UpdateUser on L<Paws::Transfer> | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | This class represents the parameters used for calling the method UpdateUser on the | ||
| 29 | L<AWS Transfer Family|Paws::Transfer> service. Use the attributes of this class | ||
| 30 | as arguments to method UpdateUser. | ||
| 31 | |||
| 32 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to UpdateUser. | ||
| 33 | |||
| 34 | =head1 SYNOPSIS | ||
| 35 | |||
| 36 | my $transfer = Paws->service('Transfer'); | ||
| 37 | my $UpdateUserResponse = $transfer->UpdateUser( | ||
| 38 | ServerId => 'MyServerId', | ||
| 39 | UserName => 'MyUserName', | ||
| 40 | HomeDirectory => 'MyHomeDirectory', # OPTIONAL | ||
| 41 | HomeDirectoryMappings => [ | ||
| 42 | { | ||
| 43 | Entry => 'MyMapEntry', # max: 1024 | ||
| 44 | Target => 'MyMapTarget', # max: 1024 | ||
| 45 | |||
| 46 | }, | ||
| 47 | ... | ||
| 48 | ], # OPTIONAL | ||
| 49 | HomeDirectoryType => 'PATH', # OPTIONAL | ||
| 50 | Policy => 'MyPolicy', # OPTIONAL | ||
| 51 | PosixProfile => { | ||
| 52 | Gid => 1, # max: 4294967295 | ||
| 53 | Uid => 1, # max: 4294967295 | ||
| 54 | SecondaryGids => [ | ||
| 55 | 1, ... # max: 4294967295 | ||
| 56 | ], # max: 16; OPTIONAL | ||
| 57 | }, # OPTIONAL | ||
| 58 | Role => 'MyRole', # OPTIONAL | ||
| 59 | ); | ||
| 60 | |||
| 61 | # Results: | ||
| 62 | my $ServerId = $UpdateUserResponse->ServerId; | ||
| 63 | my $UserName = $UpdateUserResponse->UserName; | ||
| 64 | |||
| 65 | # Returns a L<Paws::Transfer::UpdateUserResponse> object. | ||
| 66 | |||
| 67 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 68 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/transfer/UpdateUser> | ||
| 69 | |||
| 70 | =head1 ATTRIBUTES | ||
| 71 | |||
| 72 | |||
| 73 | =head2 HomeDirectory => Str | ||
| 74 | |||
| 75 | The landing directory (folder) for a user when they log in to the | ||
| 76 | server using the client. | ||
| 77 | |||
| 78 | A C<HomeDirectory> example is C</bucket_name/home/mydirectory>. | ||
| 79 | |||
| 80 | |||
| 81 | |||
| 82 | =head2 HomeDirectoryMappings => ArrayRef[L<Paws::Transfer::HomeDirectoryMapEntry>] | ||
| 83 | |||
| 84 | Logical directory mappings that specify what Amazon S3 or Amazon EFS | ||
| 85 | paths and keys should be visible to your user and how you want to make | ||
| 86 | them visible. You must specify the C<Entry> and C<Target> pair, where | ||
| 87 | C<Entry> shows how the path is made visible and C<Target> is the actual | ||
| 88 | Amazon S3 or Amazon EFS path. If you only specify a target, it is | ||
| 89 | displayed as is. You also must ensure that your Amazon Web Services | ||
| 90 | Identity and Access Management (IAM) role provides access to paths in | ||
| 91 | C<Target>. This value can only be set when C<HomeDirectoryType> is set | ||
| 92 | to I<LOGICAL>. | ||
| 93 | |||
| 94 | The following is an C<Entry> and C<Target> pair example. | ||
| 95 | |||
| 96 | C<[ { "Entry": "your-personal-report.pdf", "Target": | ||
| 97 | "/bucket3/customized-reports/${transfer:UserName}.pdf" } ]> | ||
| 98 | |||
| 99 | In most cases, you can use this value instead of the scope-down policy | ||
| 100 | to lock down your user to the designated home directory ("C<chroot>"). | ||
| 101 | To do this, you can set C<Entry> to '/' and set C<Target> to the | ||
| 102 | HomeDirectory parameter value. | ||
| 103 | |||
| 104 | The following is an C<Entry> and C<Target> pair example for C<chroot>. | ||
| 105 | |||
| 106 | C<[ { "Entry:": "/", "Target": "/bucket_name/home/mydirectory" } ]> | ||
| 107 | |||
| 108 | If the target of a logical directory entry does not exist in Amazon S3 | ||
| 109 | or EFS, the entry is ignored. As a workaround, you can use the Amazon | ||
| 110 | S3 API or EFS API to create 0 byte objects as place holders for your | ||
| 111 | directory. If using the CLI, use the C<s3api> or C<efsapi> call instead | ||
| 112 | of C<s3> or C<efs> so you can use the put-object operation. For | ||
| 113 | example, you use the following: C<aws s3api put-object --bucket | ||
| 114 | bucketname --key path/to/folder/>. Make sure that the end of the key | ||
| 115 | name ends in a C</> for it to be considered a folder. | ||
| 116 | |||
| 117 | |||
| 118 | |||
| 119 | =head2 HomeDirectoryType => Str | ||
| 120 | |||
| 121 | The type of landing directory (folder) you want your users' home | ||
| 122 | directory to be when they log into the server. If you set it to | ||
| 123 | C<PATH>, the user will see the absolute Amazon S3 bucket or EFS paths | ||
| 124 | as is in their file transfer protocol clients. If you set it | ||
| 125 | C<LOGICAL>, you will need to provide mappings in the | ||
| 126 | C<HomeDirectoryMappings> for how you want to make Amazon S3 or EFS | ||
| 127 | paths visible to your users. | ||
| 128 | |||
| 129 | Valid values are: C<"PATH">, C<"LOGICAL"> | ||
| 130 | |||
| 131 | =head2 Policy => Str | ||
| 132 | |||
| 133 | A scope-down policy for your user so that you can use the same IAM role | ||
| 134 | across multiple users. This policy scopes down user access to portions | ||
| 135 | of their Amazon S3 bucket. Variables that you can use inside this | ||
| 136 | policy include C<${Transfer:UserName}>, C<${Transfer:HomeDirectory}>, | ||
| 137 | and C<${Transfer:HomeBucket}>. | ||
| 138 | |||
| 139 | This only applies when domain of C<ServerId> is S3. Amazon EFS does not | ||
| 140 | use scope-down policies. | ||
| 141 | |||
| 142 | For scope-down policies, Amazon Web ServicesTransfer Family stores the | ||
| 143 | policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the | ||
| 144 | policy. You save the policy as a JSON blob and pass it in the C<Policy> | ||
| 145 | argument. | ||
| 146 | |||
| 147 | For an example of a scope-down policy, see Creating a scope-down policy | ||
| 148 | (https://docs.aws.amazon.com/transfer/latest/userguide/users.html#users-policies-scope-down). | ||
| 149 | |||
| 150 | For more information, see AssumeRole | ||
| 151 | (https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) | ||
| 152 | in the I<Amazon Web Services Security Token Service API Reference>. | ||
| 153 | |||
| 154 | |||
| 155 | |||
| 156 | =head2 PosixProfile => L<Paws::Transfer::PosixProfile> | ||
| 157 | |||
| 158 | Specifies the full POSIX identity, including user ID (C<Uid>), group ID | ||
| 159 | (C<Gid>), and any secondary groups IDs (C<SecondaryGids>), that | ||
| 160 | controls your users' access to your Amazon Elastic File Systems (Amazon | ||
| 161 | EFS). The POSIX permissions that are set on files and directories in | ||
| 162 | your file system determines the level of access your users get when | ||
| 163 | transferring files into and out of your Amazon EFS file systems. | ||
| 164 | |||
| 165 | |||
| 166 | |||
| 167 | =head2 Role => Str | ||
| 168 | |||
| 169 | Specifies the Amazon Resource Name (ARN) of the IAM role that controls | ||
| 170 | your users' access to your Amazon S3 bucket or EFS file system. The | ||
| 171 | policies attached to this role determine the level of access that you | ||
| 172 | want to provide your users when transferring files into and out of your | ||
| 173 | Amazon S3 bucket or EFS file system. The IAM role should also contain a | ||
| 174 | trust relationship that allows the server to access your resources when | ||
| 175 | servicing your users' transfer requests. | ||
| 176 | |||
| 177 | |||
| 178 | |||
| 179 | =head2 B<REQUIRED> ServerId => Str | ||
| 180 | |||
| 181 | A system-assigned unique identifier for a server instance that the user | ||
| 182 | account is assigned to. | ||
| 183 | |||
| 184 | |||
| 185 | |||
| 186 | =head2 B<REQUIRED> UserName => Str | ||
| 187 | |||
| 188 | A unique string that identifies a user and is associated with a server | ||
| 189 | as specified by the C<ServerId>. This user name must be a minimum of 3 | ||
| 190 | and a maximum of 100 characters long. The following are valid | ||
| 191 | characters: a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and | ||
| 192 | at sign '@'. The user name can't start with a hyphen, period, or at | ||
| 193 | sign. | ||
| 194 | |||
| 195 | |||
| 196 | |||
| 197 | |||
| 198 | =head1 SEE ALSO | ||
| 199 | |||
| 200 | This class forms part of L<Paws>, documenting arguments for method UpdateUser in L<Paws::Transfer> | ||
| 201 | |||
| 202 | =head1 BUGS and CONTRIBUTIONS | ||
| 203 | |||
| 204 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 205 | |||
| 206 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 207 | |||
| 208 | =cut | ||
| 209 |