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

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