policy_generations
Creates, updates, deletes, gets or lists a policy_generations resource.
Overview
| Name | policy_generations |
| Type | Resource |
| Id | aws.accessanalyzer.policy_generations |
Fields
The following fields are returned by SELECT queries:
- list_policy_generations
| Name | Datatype | Description |
|---|---|---|
completed_on | string (date-time) | A timestamp of when the policy generation was completed. |
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. |
principal_arn | string | The ARN of the IAM entity (user or role) for which you are generating a policy. (pattern: <code>arn:[^:]:iam::[^:]:(role|user)/.{1,576}</code>) |
started_on | string (date-time) | A timestamp of when the policy generation started. |
status | string | The status of the policy generation request. (IN_PROGRESS, SUCCEEDED, FAILED, CANCELED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_policy_generations | select | region | principalArn, maxResults, nextToken | Lists all of the policy generations requested in the last seven days. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return in the response. |
nextToken | string | A token used for pagination of results returned. |
principalArn | string | The ARN of the IAM entity (user or role) for which you are generating a policy. Use this with ListGeneratedPolicies to filter the results to only include results for a specific principal. |
SELECT examples
- list_policy_generations
Lists all of the policy generations requested in the last seven days.
SELECT
completed_on,
job_id,
principal_arn,
started_on,
status
FROM aws.accessanalyzer.policy_generations
WHERE region = '{{ region }}' -- required
AND principalArn = '{{ principalArn }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;