CmdID

CmdID / aws / aws accessanalyzer

aws accessanalyzer get-access-preview

Retrieves information about an access preview for the specified analyzer. AWS CLI reference

1 example 2 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To retrieves information about an access preview for the specified analyzer

The following get-access-preview example retrieves information about an access preview for the specified analyzer in your AWS account.

aws accessanalyzer get-access-preview --access-preview-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 --analyzer-arn arn:aws:access-analyzer:us-west-2:123456789012:analyzer/ConsoleAnalyzer-accountIdentify
--access-preview-idThe unique ID for the access preview.
--analyzer-arnThe ARN of the analyzer used to generate the access preview.
Its output
{
    "accessPreview": {
        "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "analyzerArn": "arn:aws:access-analyzer:us-west-2:123456789012:analyzer/ConsoleAnalyzer-account",
        "configurations": {
            "arn:aws:s3:::amzn-s3-demo-bucket": {
                "s3Bucket": {
                    "bucketPolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"arn:aws:iam::123456789012:root\"]},\"Action\":[\"s3:PutObject\",\"s3:PutObjectAcl\"],\"Resource\":\"arn:aws:s3:::amzn-s3-demo-bucket/*\"}]}",
                    "bucketAclGrants": [
                        {
                            "permission": "READ",
                            "grantee": {
                                "id": "79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be"
                            }
                        }
                    ],
                    "bucketPublicAccessBlock": {
                        "ignorePublicAcls": true,
                        "restrictPublicBuckets": true
                    }
                }
            }
        },
        "createdAt": "2024-02-17T00:18:44+00:00",
        "status": "COMPLETED"
    }
}

For more information, see Previewing access with IAM Access Analyzer APIs in the AWS IAM User Guide.

Options

2 in the AWS CLI reference
--access-preview-idThe unique ID for the access preview.
--analyzer-arnThe ARN of the analyzer used to generate the access preview.