blib/lib/Paws/Transfer/CreateUser.pm untested

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