access_previews
Creates, updates, deletes, gets or lists an access_previews resource.
Overview
| Name | access_previews |
| Type | Resource |
| Id | aws.accessanalyzer.access_previews |
Fields
The following fields are returned by SELECT queries:
- get_access_preview
- list_access_previews
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID for the access preview. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
analyzer_arn | string | The ARN of the analyzer used to generate the access preview. (pattern: <code>[^:]:[^:]:[^:]:[^:]:[^:]*:analyzer/.{1,255}</code>) |
configurations | object | A map of resource ARNs for the proposed resource configuration. |
created_at | string (date-time) | The time at which the access preview was created. |
status | string | The status of the access preview. Creating - The access preview creation is in progress. Completed - The access preview is complete. You can preview findings for external access to the resource. Failed - The access preview creation has failed. (COMPLETED, CREATING, FAILED) |
status_reason | object | Provides more details about the current status of the access preview. For example, if the creation of the access preview fails, a Failed status is returned. This failure can be due to an internal issue with the analysis or due to an invalid proposed resource configuration. |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID for the access preview. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>) |
analyzer_arn | string | The ARN of the analyzer used to generate the access preview. (pattern: <code>[^:]:[^:]:[^:]:[^:]:[^:]*:analyzer/.{1,255}</code>) |
created_at | string (date-time) | The time at which the access preview was created. |
status | string | The status of the access preview. Creating - The access preview creation is in progress. Completed - The access preview is complete and previews the findings for external access to the resource. Failed - The access preview creation has failed. (COMPLETED, CREATING, FAILED) |
status_reason | object | Provides more details about the current status of the access preview. For example, if the creation of the access preview fails, a Failed status is returned. This failure can be due to an internal issue with the analysis or due to an invalid proposed resource configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_access_preview | select | access_preview_id, analyzerArn, region | Retrieves information about an access preview for the specified analyzer. | |
list_access_previews | select | analyzerArn, region | nextToken, maxResults | Retrieves a list of access previews for the specified analyzer. |
create_access_preview | insert | region, analyzerArn, configurations | Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions. |
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 |
|---|---|---|
access_preview_id | string | The unique ID for the access preview. |
analyzerArn | string | The ARN of the analyzer used to generate the access preview. |
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. |
SELECT examples
- get_access_preview
- list_access_previews
Retrieves information about an access preview for the specified analyzer.
SELECT
id,
analyzer_arn,
configurations,
created_at,
status,
status_reason
FROM aws.accessanalyzer.access_previews
WHERE access_preview_id = '{{ access_preview_id }}' -- required
AND analyzerArn = '{{ analyzerArn }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves a list of access previews for the specified analyzer.
SELECT
id,
analyzer_arn,
created_at,
status,
status_reason
FROM aws.accessanalyzer.access_previews
WHERE analyzerArn = '{{ analyzerArn }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_access_preview
- Manifest
Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.
INSERT INTO aws.accessanalyzer.access_previews (
analyzerArn,
configurations,
clientToken,
region
)
SELECT
'{{ analyzerArn }}' /* required */,
'{{ configurations }}' /* required */,
'{{ clientToken }}',
'{{ region }}'
RETURNING
id
;
# Description fields are for documentation purposes
- name: access_previews
props:
- name: region
value: "{{ region }}"
description: Required parameter for the access_previews resource.
- name: analyzerArn
value: "{{ analyzerArn }}"
- name: configurations
value: "{{ configurations }}"
- name: clientToken
value: "{{ clientToken }}"