Skip to main content

access_previews

Creates, updates, deletes, gets or lists an access_previews resource.

Overview​

Nameaccess_previews
TypeResource
Idaws.accessanalyzer.access_previews

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe 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_arnstringThe ARN of the analyzer used to generate the access preview. (pattern: <code>[^:]:[^:]:[^:]:[^:]:[^:]*:analyzer/.{1,255}</code>)
configurationsobjectA map of resource ARNs for the proposed resource configuration.
created_atstring (date-time)The time at which the access preview was created.
statusstringThe 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_reasonobjectProvides 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_access_previewselectaccess_preview_id, analyzerArn, regionRetrieves information about an access preview for the specified analyzer.
list_access_previewsselectanalyzerArn, regionnextToken, maxResultsRetrieves a list of access previews for the specified analyzer.
create_access_previewinsertregion, analyzerArn, configurationsCreates 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.

NameDatatypeDescription
access_preview_idstringThe unique ID for the access preview.
analyzerArnstringThe ARN of the analyzer used to generate the access preview.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return in the response.
nextTokenstringA token used for pagination of results returned.

SELECT examples​

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
;

INSERT examples​

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
;