등록된 위치의 세부 정보 보기

등록된 위치의 세부 정보 보기

S3 Access Grants 인스턴스에 등록된 위치의 세부 정보를 Amazon S3 콘솔, AWS Command Line Interface(AWS CLI), Amazon S3 REST API, AWS SDK를 사용해 가져올 수 있어요.

S3 Access Grants 인스턴스에 등록된 위치를 보려면

  1. AWS Management Console에 로그인하고 Amazon S3 콘솔을 https://console.aws.amazon.com/s3/에서 엽니다.
  2. 왼쪽 탐색 창에서 Access Grants를 선택합니다.
  3. S3 Access Grants 페이지에서 작업하려는 S3 Access Grants 인스턴스가 들어 있는 리전을 선택합니다.
  4. 인스턴스의 View details를 선택합니다.
  5. 인스턴스 세부 정보 페이지에서 Locations 탭을 선택합니다.
  6. 보려는 등록 위치를 찾습니다. 등록 위치 목록을 필터링하려면 검색 상자를 사용하세요.

AWS CLI를 설치하려면 AWS Command Line Interface 사용자 가이드의 AWS CLI 설치를 참고하세요. 다음 예제 명령을 사용할 때는 사용자 입력 자리 표시자를 자신의 정보로 바꾸세요.

예제 – 등록된 위치의 세부 정보 가져오기

aws s3control get-access-grants-location \
--account-id 111122223333 \
--access-grants-location-id default

응답:

{
  "CreatedAt": "2023-05-31T18:23:48.107000+00:00",
  "AccessGrantsLocationId": "default",
  "AccessGrantsLocationArn": "arn:aws:s3:us-east-2:111122223333:access-grants/default/location/default",
  "IAMRoleArn": "arn:aws:iam::111122223333:role/accessGrantsTestRole"
}

예제 – S3 Access Grants 인스턴스에 등록된 모든 위치 나열

결과를 S3 접두사나 버킷으로 제한하려면 선택적으로 --location-scope s3://bucket-and-or-prefix 매개 변수를 사용할 수 있어요.

aws s3control list-access-grants-locations \
--account-id 111122223333 \
--region us-east-2

응답:

{
  "AccessGrantsLocationsList": [
    {
      "CreatedAt": "2023-05-31T18:23:48.107000+00:00",
      "AccessGrantsLocationId": "default",
      "AccessGrantsLocationArn": "arn:aws:s3:us-east-2:111122223333:access-grants/default/location/default",
      "LocationScope": "s3://"
      "IAMRoleArn": "arn:aws:iam::111122223333:role/accessGrantsTestRole"
    },
    {
      "CreatedAt": "2023-05-31T18:23:48.107000+00:00",
      "AccessGrantsLocationId": "635f1139-1af2-4e43-8131-a4de006eb456",
      "AccessGrantsLocationArn": "arn:aws:s3:us-east-2:111122223333:access-grants/default/location/635f1139-1af2-4e43-8131-a4de006eb888",
      "LocationScope": "s3://amzn-s3-demo-bucket/prefixA*",
      "IAMRoleArn": "arn:aws:iam::111122223333:role/accessGrantsTestRole"
    }
  ]
}

등록된 위치의 세부 정보를 가져오거나 S3 Access Grants 인스턴스에 등록된 모든 위치를 나열하는 Amazon S3 REST API 지원에 대한 자세한 내용은 Amazon Simple Storage Service API Reference의 다음 섹션을 참고하세요.

  • GetAccessGrantsLocation
  • ListAccessGrantsLocations

이 섹션은 AWS SDK를 사용해 등록된 위치의 세부 정보를 가져오거나 S3 Access Grants 인스턴스의 모든 등록 위치를 나열하는 예제를 제공해요. 다음 예제를 사용할 때는 사용자 입력 자리 표시자를 자신의 정보로 바꾸세요.

Java

예제 – 등록된 위치의 세부 정보 가져오기

public void getAccessGrantsLocation() {
    GetAccessGrantsLocationRequest getAccessGrantsLocationRequest = GetAccessGrantsLocationRequest.builder()
        .accountId("111122223333")
        .accessGrantsLocationId("default")
        .build();
    GetAccessGrantsLocationResponse getAccessGrantsLocationResponse = s3Control.getAccessGrantsLocation(getAccessGrantsLocationRequest);
    LOGGER.info("GetAccessGrantsLocationResponse: " + getAccessGrantsLocationResponse);
}

응답:

GetAccessGrantsLocationResponse(
    CreatedAt=2023-06-07T04:35:10.027Z,
    AccessGrantsLocationId=default,
    AccessGrantsLocationArn=arn:aws:s3:us-east-2:111122223333:access-grants/default/location/default,
    LocationScope= s3://,
    IAMRoleArn=arn:aws:iam::111122223333:role/accessGrantsTestRole
)

예제 – S3 Access Grants 인스턴스의 모든 등록 위치 나열

결과를 S3 접두사나 버킷으로 제한하려면 LocationScope 매개 변수에 s3://bucket-and-or-prefix 같은 S3 URI를 선택적으로 전달할 수 있어요.

public void listAccessGrantsLocations() {

    ListAccessGrantsLocationsRequest listRequest =   ListAccessGrantsLocationsRequest.builder()
        .accountId("111122223333")
        .build();

    ListAccessGrantsLocationsResponse listResponse = s3Control.listAccessGrantsLocations(listRequest);
    LOGGER.info("ListAccessGrantsLocationsResponse: " + listResponse);
}

응답:

ListAccessGrantsLocationsResponse(
    AccessGrantsLocationsList=[
        ListAccessGrantsLocationsEntry(
            CreatedAt=2023-06-07T04:35:11.027Z,
            AccessGrantsLocationId=default,
            AccessGrantsLocationArn=arn:aws:s3:us-east-2:111122223333:access-grants/default/location/default,
            LocationScope=s3://,
            IAMRoleArn=arn:aws:iam::111122223333:role/accessGrantsTestRole
        ),
        ListAccessGrantsLocationsEntry(
            CreatedAt=2023-06-07T04:35:10.027Z,
            AccessGrantsLocationId=635f1139-1af2-4e43-8131-a4de006eb456,
            AccessGrantsLocationArn=arn:aws:s3:us-east-2:111122223333:access-grants/default/location/635f1139-1af2-4e43-8131-a4de006eb888,
            LocationScope=s3://amzn-s3-demo-bucket/prefixA*,
            IAMRoleArn=arn:aws:iam::111122223333:role/accessGrantsTestRole
        )
    ]
)

출처: 문서

본문

View the details of a registered location (등록된 위치의 세부 정보 보기)

등록된 위치의 세부 정보를 보는 방법은 위 안내를 따라 하면 돼요.

더 알아보기 (Learn more)