Updated on 2025-11-06 GMT+08:00

Obtaining Access Preview Details

Function

This API is used to obtain access preview details.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

AccessAnalyzer:analyzer:getPreview

Read

analyzer *

g:ResourceTag/<tag-key>

-

-

URI

GET /v5/analyzers/{analyzer_id}/access-previews/{access_preview_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

analyzer_id

Yes

String

Unique identifier of an analyzer

Minimum: 1

Maximum: 36

access_preview_id

Yes

String

Unique identifier of an access preview.

Minimum: 1

Maximum: 36

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

access_preview

AccessPreview object

An access preview.

Table 3 AccessPreview

Parameter

Type

Description

access_preview_id

String

Unique identifier of an access preview.

analyzer_id

String

Unique identifier of an analyzer

configurations

Configuration object

Preview access settings.

created_at

String

Time when the access preview is created.

status

String

Status of an access preview.

  • creating: The preview is being created.

  • completed: The preview is created.

  • failed: Failed to create the preview.

status_reason

PreviewStatusReason object

More details about the status of an access preview.

Table 4 Configuration

Parameter

Type

Description

iam_agency

IAMAgency object

IAM trust agency.

obs_bucket

OBSBucket object

OBS bucket.

kms_cmk

KMSCmk object

KMS key.

Table 5 IAMAgency

Parameter

Type

Description

trust_policy

String

JSON policy document.

Table 6 OBSBucket

Parameter

Type

Description

bucket_acl

String

String format of the bucket ACL XML file.

bucket_policy

String

JSON policy document.

Table 7 KMSCmk

Parameter

Type

Description

grants

String

Used to authorize encryption keys.

Table 8 PreviewStatusReason

Parameter

Type

Description

code

String

Reason for the status of an access preview.

Example Requests

Obtaining access preview details

GET https://{hostname}/v5/analyzers/{analyzer_id}/access-previews/{access_preview_id}

Example Responses

Status code: 200

OK

{
  "access_preview" : {
    "analyzer_id" : "{analyzer_id}",
    "configurations" : {
      "iam_agency" : {
        "trust_policy" : "{\"Version\":\"5.0\",\"Statement\":[{\"Condition\":{\"StringMatch\":{\"g:PrincipalOrgId\":[\"org_id\"]}},\"Action\":[\"sts:agencies:assume\",\"sts::tagSession\",\"sts::setSourceIdentity\"],\"Effect\":\"Allow\",\"Principal\":{\"IAM\":[\"dd...\"]}}]}"
      }
    },
    "created_at" : "2023-09-07T07:26:23.440Z",
    "access_preview_id" : "{access_preview_id}",
    "status" : "completed"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.