AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Test-IAMCustomPolicy-ActionName <String[]>-CallerArn <String>-ContextEntry <ContextEntry[]>-PermissionsBoundaryPolicyInputList <String[]>-PolicyInputList <String[]>-ResourceArn <String[]>-ResourceHandlingOption <String>-ResourceOwner <String>-ResourcePolicy <String>-Marker <String>-MaxItem <Int32>-Select <String>-NoAutoIteration <SwitchParameter>
Condition
element of an IAM policy to evaluate context keys. To get the list of context keys that the policies require for correct simulation, use GetContextKeysForCustomPolicy.
If the output is long, you can use MaxItems
and Marker
parameters to paginate the results.
For more information about using the policy simulator, see Testing IAM policies with the IAM policy simulator in the IAM User Guide. iam:CreateUser
. This operation does not support using wildcards (*) in an action name. Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ActionNames |
CallerArn
is required if you include a ResourcePolicy
so that the policy's Principal
element has a value to use in evaluating the policy.You can specify only the ARN of an IAM user. You cannot specify the ARN of an assumed role, federated user, or a service principal. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ContextEntries |
Marker
element in the response that you received to indicate where the next call should start.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | NextToken |
IsTruncated
response element is true
.If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated
response element returns true
, and Marker
contains a value to include in the subsequent call that tells the service where to continue from.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | MaxItems |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
\u0020
) through the end of the ASCII character range\u00FF
)\u0009
), line feed (\u000A
), and carriage return (\u000D
)Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
ResourcePolicy
parameter. The policies cannot be "scope-down" policies, such as you could include in a call to GetFederationToken or one of the AssumeRole API operations. In other words, do not use policies designed to restrict what a user can do while using the temporary credentials.The maximum length of the policy document that you can pass in this operation, including whitespace, is listed below. To view the maximum character counts of a managed policy with no whitespaces, see IAM and STS character quotas.The regex pattern used to validate this parameter is a string of characters consisting of the following:\u0020
) through the end of the ASCII character range\u00FF
)\u0009
), line feed (\u000A
), and carriage return (\u000D
)Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
*
(all resources). Each API in the ActionNames
parameter is evaluated for each resource in this list. The simulation determines the access result (allowed or denied) of each combination and reports it in the response. You can simulate resources that don't exist in your account.The simulation does not automatically retrieve policies for the specified resources. If you want to include a resource policy in the simulation, then you must include the policy as a string in the ResourcePolicy
parameter.If you include a ResourcePolicy
, then it must be applicable to all of the resources included in the simulation or you receive an invalid input error.For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ResourceArns |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
ResourceOwner
is specified, it is also used as the account owner of any ResourcePolicy
included in the simulation. If the ResourceOwner
parameter is not specified, then the owner of the resources and the resource policy defaults to the account of the identity provided in CallerArn
. This parameter is required only if you specify a resource-based policy and account that owns the resource is different from the account that owns the simulated calling user CallerArn
.The ARN for an account uses the following syntax: arn:aws:iam::AWS-account-ID:root
. For example, to represent the account with the 112233445566 ID, use the following ARN: arn:aws:iam::112233445566-ID:root
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
\u0020
) through the end of the ASCII character range\u00FF
)\u0009
), line feed (\u000A
), and carriage return (\u000D
)Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
AWS Tools for PowerShell: 2.x.y.z