blib/lib/Paws/IAM/SimulateCustomPolicy.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::IAM::SimulateCustomPolicy;
3 use Moose;
4 has ActionNames => (is => 'ro', isa => 'ArrayRef[Str|Undef]', required => 1);
5 has CallerArn => (is => 'ro', isa => 'Str');
6 has ContextEntries => (is => 'ro', isa => 'ArrayRef[Paws::IAM::ContextEntry]');
7 has Marker => (is => 'ro', isa => 'Str');
8 has MaxItems => (is => 'ro', isa => 'Int');
9 has PermissionsBoundaryPolicyInputList => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
10 has PolicyInputList => (is => 'ro', isa => 'ArrayRef[Str|Undef]', required => 1);
11 has ResourceArns => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
12 has ResourceHandlingOption => (is => 'ro', isa => 'Str');
13 has ResourceOwner => (is => 'ro', isa => 'Str');
14 has ResourcePolicy => (is => 'ro', isa => 'Str');
15  
16 use MooseX::ClassAttribute;
17  
18 class_has _api_call => (isa => 'Str', is => 'ro', default => 'SimulateCustomPolicy');
19 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::IAM::SimulatePolicyResponse');
20 class_has _result_key => (isa => 'Str', is => 'ro', default => 'SimulateCustomPolicyResult');
21 1;
22  
23 ### main pod documentation begin ###
24  
25 =head1 NAME
26  
27 Paws::IAM::SimulateCustomPolicy - Arguments for method SimulateCustomPolicy on L<Paws::IAM>
28  
29 =head1 DESCRIPTION
30  
31 This class represents the parameters used for calling the method SimulateCustomPolicy on the
32 L<AWS Identity and Access Management|Paws::IAM> service. Use the attributes of this class
33 as arguments to method SimulateCustomPolicy.
34  
35 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to SimulateCustomPolicy.
36  
37 =head1 SYNOPSIS
38  
39 my $iam = Paws->service('IAM');
40 my $SimulatePolicyResponse = $iam->SimulateCustomPolicy(
41 ActionNames => [
42 'MyActionNameType', ... # min: 3, max: 128
43 ],
44 PolicyInputList => [
45 'MypolicyDocumentType', ... # min: 1, max: 131072
46 ],
47 CallerArn => 'MyResourceNameType', # OPTIONAL
48 ContextEntries => [
49 {
50 ContextKeyName => 'MyContextKeyNameType', # min: 5, max: 256; OPTIONAL
51 ContextKeyType => 'string'
52 , # values: string, stringList, numeric, numericList, boolean, booleanList, ip, ipList, binary, binaryList, date, dateList; OPTIONAL
53 ContextKeyValues => [ 'MyContextKeyValueType', ... ], # OPTIONAL
54 },
55 ...
56 ], # OPTIONAL
57 Marker => 'MymarkerType', # OPTIONAL
58 MaxItems => 1, # OPTIONAL
59 PermissionsBoundaryPolicyInputList => [
60 'MypolicyDocumentType', ... # min: 1, max: 131072
61 ], # OPTIONAL
62 ResourceArns => [
63 'MyResourceNameType', ... # min: 1, max: 2048
64 ], # OPTIONAL
65 ResourceHandlingOption => 'MyResourceHandlingOptionType', # OPTIONAL
66 ResourceOwner => 'MyResourceNameType', # OPTIONAL
67 ResourcePolicy => 'MypolicyDocumentType', # OPTIONAL
68 );
69  
70 # Results:
71 my $EvaluationResults = $SimulatePolicyResponse->EvaluationResults;
72 my $IsTruncated = $SimulatePolicyResponse->IsTruncated;
73 my $Marker = $SimulatePolicyResponse->Marker;
74  
75 # Returns a L<Paws::IAM::SimulatePolicyResponse> object.
76  
77 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.
78 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iam/SimulateCustomPolicy>
79  
80 =head1 ATTRIBUTES
81  
82  
83 =head2 B<REQUIRED> ActionNames => ArrayRef[Str|Undef]
84  
85 A list of names of API operations to evaluate in the simulation. Each
86 operation is evaluated against each resource. Each operation must
87 include the service identifier, such as C<iam:CreateUser>. This
88 operation does not support using wildcards (*) in an action name.
89  
90  
91  
92 =head2 CallerArn => Str
93  
94 The ARN of the IAM user that you want to use as the simulated caller of
95 the API operations. C<CallerArn> is required if you include a
96 C<ResourcePolicy> so that the policy's C<Principal> element has a value
97 to use in evaluating the policy.
98  
99 You can specify only the ARN of an IAM user. You cannot specify the ARN
100 of an assumed role, federated user, or a service principal.
101  
102  
103  
104 =head2 ContextEntries => ArrayRef[L<Paws::IAM::ContextEntry>]
105  
106 A list of context keys and corresponding values for the simulation to
107 use. Whenever a context key is evaluated in one of the simulated IAM
108 permissions policies, the corresponding value is supplied.
109  
110  
111  
112 =head2 Marker => Str
113  
114 Use this parameter only when paginating results and only after you
115 receive a response indicating that the results are truncated. Set it to
116 the value of the C<Marker> element in the response that you received to
117 indicate where the next call should start.
118  
119  
120  
121 =head2 MaxItems => Int
122  
123 Use this only when paginating results to indicate the maximum number of
124 items you want in the response. If additional items exist beyond the
125 maximum you specify, the C<IsTruncated> response element is C<true>.
126  
127 If you do not include this parameter, the number of items defaults to
128 100. Note that IAM might return fewer results, even when there are more
129 results available. In that case, the C<IsTruncated> response element
130 returns C<true>, and C<Marker> contains a value to include in the
131 subsequent call that tells the service where to continue from.
132  
133  
134  
135 =head2 PermissionsBoundaryPolicyInputList => ArrayRef[Str|Undef]
136  
137 The IAM permissions boundary policy to simulate. The permissions
138 boundary sets the maximum permissions that an IAM entity can have. You
139 can input only one permissions boundary when you pass a policy to this
140 operation. For more information about permissions boundaries, see
141 Permissions boundaries for IAM entities
142 (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html)
143 in the I<IAM User Guide>. The policy input is specified as a string
144 that contains the complete, valid JSON text of a permissions boundary
145 policy.
146  
147 The regex pattern (http://wikipedia.org/wiki/regex) used to validate
148 this parameter is a string of characters consisting of the following:
149  
150 =over
151  
152 =item *
153  
154 Any printable ASCII character ranging from the space character
155 (C<\u0020>) through the end of the ASCII character range
156  
157 =item *
158  
159 The printable characters in the Basic Latin and Latin-1 Supplement
160 character set (through C<\u00FF>)
161  
162 =item *
163  
164 The special characters tab (C<\u0009>), line feed (C<\u000A>), and
165 carriage return (C<\u000D>)
166  
167 =back
168  
169  
170  
171  
172 =head2 B<REQUIRED> PolicyInputList => ArrayRef[Str|Undef]
173  
174 A list of policy documents to include in the simulation. Each document
175 is specified as a string containing the complete, valid JSON text of an
176 IAM policy. Do not include any resource-based policies in this
177 parameter. Any resource-based policy must be submitted with the
178 C<ResourcePolicy> parameter. The policies cannot be "scope-down"
179 policies, such as you could include in a call to GetFederationToken
180 (https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetFederationToken.html)
181 or one of the AssumeRole
182 (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AssumeRole.html)
183 API operations. In other words, do not use policies designed to
184 restrict what a user can do while using the temporary credentials.
185  
186 The regex pattern (http://wikipedia.org/wiki/regex) used to validate
187 this parameter is a string of characters consisting of the following:
188  
189 =over
190  
191 =item *
192  
193 Any printable ASCII character ranging from the space character
194 (C<\u0020>) through the end of the ASCII character range
195  
196 =item *
197  
198 The printable characters in the Basic Latin and Latin-1 Supplement
199 character set (through C<\u00FF>)
200  
201 =item *
202  
203 The special characters tab (C<\u0009>), line feed (C<\u000A>), and
204 carriage return (C<\u000D>)
205  
206 =back
207  
208  
209  
210  
211 =head2 ResourceArns => ArrayRef[Str|Undef]
212  
213 A list of ARNs of AWS resources to include in the simulation. If this
214 parameter is not provided, then the value defaults to C<*> (all
215 resources). Each API in the C<ActionNames> parameter is evaluated for
216 each resource in this list. The simulation determines the access result
217 (allowed or denied) of each combination and reports it in the response.
218 You can simulate resources that don't exist in your account.
219  
220 The simulation does not automatically retrieve policies for the
221 specified resources. If you want to include a resource policy in the
222 simulation, then you must include the policy as a string in the
223 C<ResourcePolicy> parameter.
224  
225 If you include a C<ResourcePolicy>, then it must be applicable to all
226 of the resources included in the simulation or you receive an invalid
227 input error.
228  
229 For more information about ARNs, see Amazon Resource Names (ARNs)
230 (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
231 in the I<AWS General Reference>.
232  
233  
234  
235 =head2 ResourceHandlingOption => Str
236  
237 Specifies the type of simulation to run. Different API operations that
238 support resource-based policies require different combinations of
239 resources. By specifying the type of simulation to run, you enable the
240 policy simulator to enforce the presence of the required resources to
241 ensure reliable simulation results. If your simulation does not match
242 one of the following scenarios, then you can omit this parameter. The
243 following list shows each of the supported scenario values and the
244 resources that you must define to run the simulation.
245  
246 Each of the EC2 scenarios requires that you specify instance, image,
247 and security-group resources. If your scenario includes an EBS volume,
248 then you must specify that volume as a resource. If the EC2 scenario
249 includes VPC, then you must supply the network-interface resource. If
250 it includes an IP subnet, then you must specify the subnet resource.
251 For more information on the EC2 scenario options, see Supported
252 platforms
253 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html)
254 in the I<Amazon EC2 User Guide>.
255  
256 =over
257  
258 =item *
259  
260 B<EC2-Classic-InstanceStore>
261  
262 instance, image, security-group
263  
264 =item *
265  
266 B<EC2-Classic-EBS>
267  
268 instance, image, security-group, volume
269  
270 =item *
271  
272 B<EC2-VPC-InstanceStore>
273  
274 instance, image, security-group, network-interface
275  
276 =item *
277  
278 B<EC2-VPC-InstanceStore-Subnet>
279  
280 instance, image, security-group, network-interface, subnet
281  
282 =item *
283  
284 B<EC2-VPC-EBS>
285  
286 instance, image, security-group, network-interface, volume
287  
288 =item *
289  
290 B<EC2-VPC-EBS-Subnet>
291  
292 instance, image, security-group, network-interface, subnet, volume
293  
294 =back
295  
296  
297  
298  
299 =head2 ResourceOwner => Str
300  
301 An ARN representing the AWS account ID that specifies the owner of any
302 simulated resource that does not identify its owner in the resource
303 ARN. Examples of resource ARNs include an S3 bucket or object. If
304 C<ResourceOwner> is specified, it is also used as the account owner of
305 any C<ResourcePolicy> included in the simulation. If the
306 C<ResourceOwner> parameter is not specified, then the owner of the
307 resources and the resource policy defaults to the account of the
308 identity provided in C<CallerArn>. This parameter is required only if
309 you specify a resource-based policy and account that owns the resource
310 is different from the account that owns the simulated calling user
311 C<CallerArn>.
312  
313 The ARN for an account uses the following syntax:
314 C<arn:aws:iam::I<AWS-account-ID>:root>. For example, to represent the
315 account with the 112233445566 ID, use the following ARN:
316 C<arn:aws:iam::112233445566-ID:root>.
317  
318  
319  
320 =head2 ResourcePolicy => Str
321  
322 A resource-based policy to include in the simulation provided as a
323 string. Each resource in the simulation is treated as if it had this
324 policy attached. You can include only one resource-based policy in a
325 simulation.
326  
327 The regex pattern (http://wikipedia.org/wiki/regex) used to validate
328 this parameter is a string of characters consisting of the following:
329  
330 =over
331  
332 =item *
333  
334 Any printable ASCII character ranging from the space character
335 (C<\u0020>) through the end of the ASCII character range
336  
337 =item *
338  
339 The printable characters in the Basic Latin and Latin-1 Supplement
340 character set (through C<\u00FF>)
341  
342 =item *
343  
344 The special characters tab (C<\u0009>), line feed (C<\u000A>), and
345 carriage return (C<\u000D>)
346  
347 =back
348  
349  
350  
351  
352  
353 =head1 SEE ALSO
354  
355 This class forms part of L<Paws>, documenting arguments for method SimulateCustomPolicy in L<Paws::IAM>
356  
357 =head1 BUGS and CONTRIBUTIONS
358  
359 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
360  
361 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
362  
363 =cut
364