[ aws . accessanalyzer ]
Starts the policy generation request.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
start-policy-generation
[--client-token <value>]
[--cloud-trail-details <value>]
--policy-generation-details <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--client-token
(string)
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect.
If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.
--cloud-trail-details
(structure)
A
CloudTrailDetails
object that contains details about aTrail
that you want to analyze to generate policies.accessRole -> (string)
The ARN of the service role that IAM Access Analyzer uses to access your CloudTrail trail and service last accessed information.
endTime -> (timestamp)
The end of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp after this time are not considered to generate a policy. If this is not included in the request, the default value is the current time.
startTime -> (timestamp)
The start of the time range for which IAM Access Analyzer reviews your CloudTrail events. Events with a timestamp before this time are not considered to generate a policy.
trails -> (list)
A
Trail
object that contains settings for a trail.(structure)
Contains details about the CloudTrail trail being analyzed to generate a policy.
allRegions -> (boolean)
Possible values are
true
orfalse
. If set totrue
, IAM Access Analyzer retrieves CloudTrail data from all regions to analyze and generate a policy.cloudTrailArn -> (string)
Specifies the ARN of the trail. The format of a trail ARN is
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
.regions -> (list)
A list of regions to get CloudTrail data from and analyze to generate a policy.
(string)
JSON Syntax:
{
"accessRole": "string",
"endTime": timestamp,
"startTime": timestamp,
"trails": [
{
"allRegions": true|false,
"cloudTrailArn": "string",
"regions": ["string", ...]
}
...
]
}
--policy-generation-details
(structure)
Contains the ARN of the IAM entity (user or role) for which you are generating a policy.
principalArn -> (string)
The ARN of the IAM entity (user or role) for which you are generating a policy.
Shorthand Syntax:
principalArn=string
JSON Syntax:
{
"principalArn": "string"
}
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
See ‘aws help’ for descriptions of global parameters.
jobId -> (string)
The
JobId
that is returned by theStartPolicyGeneration
operation. TheJobId
can be used withGetGeneratedPolicy
to retrieve the generated policies or used withCancelPolicyGeneration
to cancel the policy generation request.