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