[ aws . accessanalyzer ]

get-generated-policy

Description

Retrieves the policy that was generated using StartPolicyGeneration .

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  get-generated-policy
[--include-resource-placeholders | --no-include-resource-placeholders]
[--include-service-level-template | --no-include-service-level-template]
--job-id <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--include-resource-placeholders | --no-include-resource-placeholders (boolean)

The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies.

For example, in the resource section of a policy, you can receive a placeholder such as "Resource":"arn:aws:s3:::${BucketName}" instead of "*" .

--include-service-level-template | --no-include-service-level-template (boolean)

The level of detail that you want to generate. You can specify whether to generate service-level policies.

IAM Access Analyzer uses iam:servicelastaccessed to identify services that have been used recently to create this service-level template.

--job-id (string)

The JobId that is returned by the StartPolicyGeneration operation. The JobId can be used with GetGeneratedPolicy to retrieve the generated policies or used with CancelPolicyGeneration to cancel the policy generation request.

--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.

See ‘aws help’ for descriptions of global parameters.

Output

generatedPolicyResult -> (structure)

A GeneratedPolicyResult object that contains the generated policies and associated details.

generatedPolicies -> (list)

The text to use as the content for the new policy. The policy is created using the CreatePolicy action.

(structure)

Contains the text for the generated policy.

policy -> (string)

The text to use as the content for the new policy. The policy is created using the CreatePolicy action.

properties -> (structure)

A GeneratedPolicyProperties object that contains properties of the generated policy.

cloudTrailProperties -> (structure)

Lists details about the Trail used to generated policy.

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.

trailProperties -> (list)

A TrailProperties object that contains settings for trail properties.

(structure)

Contains details about the CloudTrail trail being analyzed to generate a policy.

allRegions -> (boolean)

Possible values are true or false . If set to true , 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)

isComplete -> (boolean)

This value is set to true if the generated policy contains all possible actions for a service that IAM Access Analyzer identified from the CloudTrail trail that you specified, and false otherwise.

principalArn -> (string)

The ARN of the IAM entity (user or role) for which you are generating a policy.

jobDetails -> (structure)

A GeneratedPolicyDetails object that contains details about the generated policy.

completedOn -> (timestamp)

A timestamp of when the job was completed.

jobError -> (structure)

The job error for the policy generation request.

code -> (string)

The job error code.

message -> (string)

Specific information about the error. For example, which service quota was exceeded or which resource was not found.

jobId -> (string)

The JobId that is returned by the StartPolicyGeneration operation. The JobId can be used with GetGeneratedPolicy to retrieve the generated policies or used with CancelPolicyGeneration to cancel the policy generation request.

startedOn -> (timestamp)

A timestamp of when the job was started.

status -> (string)

The status of the job request.