Amazon S3 Storage Lens 대시보드 나열
Amazon S3 Storage Lens 대시보드 나열
S3 Storage Lens 대시보드를 나열하려면 다음 단계를 따르세요.
본문
S3 Storage Lens 대시보드 나열
- AWS Management Console에 로그인하고 Amazon S3 콘솔(https://console.aws.amazon.com/s3/)을 엽니다.
- 왼쪽 탐색 창에서 Storage Lens 로 이동합니다.
- 대시보드(Dashboards) 를 선택합니다.
이제 AWS 계정의 대시보드를 볼 수 있어요.
예제
다음 예제 명령은 AWS 계정의 S3 Storage Lens 대시보드를 나열해요. 이 예제를 사용하려면 사용자 입력 자리 표시자를 자신의 정보로 교체하세요.
aws s3control list-storage-lens-configurations --account-id= 222222222222 --region= us-east-1 --next-token= abcdefghij1234
다음 예제는 next token 없이 S3 Storage Lens 구성을 나열해요. 이 예제를 사용하려면 사용자 입력 자리 표시자를 자신의 정보로 교체하세요.
aws s3control list-storage-lens-configurations --account-id= 222222222222 --region= us-east-1
예제: S3 Storage Lens 대시보드 구성 나열 – 다음 예제는 SDK for Java에서 S3 Storage Lens 구성을 나열하는 방법을 보여줘요. 이 예제를 사용하려면 사용자 입력 자리 표시자를 자신의 정보로 교체하세요.
package aws.example.s3control;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.SdkClientException;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.services.s3control.AWSS3Control;
import com.amazonaws.services.s3control.AWSS3ControlClient;
import com.amazonaws.services.s3control.model.ListStorageLensConfigurationEntry;
import com.amazonaws.services.s3control.model.ListStorageLensConfigurationsRequest;
import java.util.List;
import static com.amazonaws.regions.Regions. US_WEST_2 ;
public class ListDashboard {
public static void main(String[] args) {
String sourceAccountId = " 111122223333 ";
String nextToken = " nextToken ";
try {
AWSS3Control s3ControlClient = AWSS3ControlClient.builder()
.withCredentials(new ProfileCredentialsProvider())
.withRegion( US_WEST_2 )
.build();
final List<ListStorageLensConfigurationEntry> configurations =
s3ControlClient.listStorageLensConfigurations(new ListStorageLensConfigurationsRequest()
.withAccountId(sourceAccountId)
.withNextToken(nextToken)
).getStorageLensConfigurationList();
System.out.println(configurations.toString());
} catch (AmazonServiceException e) {
// The call was transmitted successfully, but Amazon S3 couldn't process
// it and returned an error response.
e.printStackTrace();
} catch (SdkClientException e) {
// Amazon S3 couldn't be contacted for a response, or the client
// couldn't parse the response from Amazon S3.
e.printStackTrace();
}
}
}