Amazon S3 ストレージレンズダッシュボード設定の詳細を表示する - Amazon Simple Storage Service

Amazon S3 ストレージレンズダッシュボード設定の詳細を表示する

Amazon S3 ストレージレンズダッシュボードは、Amazon S3 コンソール、AWS CLI、および SDK for Java で表示できます。

S3 ストレージレンズダッシュボード設定の詳細を表示するには
  1. AWS Management Console にサインインし、Amazon S3 コンソール https://console.aws.amazon.com/s3/ を開きます。

  2. 左側のナビゲーションペインで、[ストレージレンズ] に移動します。

  3. [ダッシュボード] を選択します。

  4. [ダッシュボード] リストで、表示するダッシュボードをクリックします。これで、ストレージレンズダッシュボードの詳細を確認できます。

次の例では、設定の詳細を表示できるように S3 ストレージレンズ設定を取得します。これらの例を実行するには、user input placeholders をユーザー自身の情報に置き換えます。

aws s3control get-storage-lens-configuration --account-id=222222222222 --config-id=your-configuration-id --region=us-east-1
例 – S3 ストレージレンズ設定を取得して表示する

次の例は、SDK for Java で S3 ストレージレンズ設定を取得して、設定の詳細を表示できるようにする方法を示しています。この例を実行するには、user input placeholders をユーザー自身の情報に置き換えます。

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.GetStorageLensConfigurationRequest; import com.amazonaws.services.s3control.model.GetStorageLensConfigurationResult; import com.amazonaws.services.s3control.model.StorageLensConfiguration; import static com.amazonaws.regions.Regions.US_WEST_2; public class GetDashboard { public static void main(String[] args) { String configurationId = "ConfigurationId"; String sourceAccountId = "111122223333"; try { AWSS3Control s3ControlClient = AWSS3ControlClient.builder() .withCredentials(new ProfileCredentialsProvider()) .withRegion(US_WEST_2) .build(); final StorageLensConfiguration configuration = s3ControlClient.getStorageLensConfiguration(new GetStorageLensConfigurationRequest() .withAccountId(sourceAccountId) .withConfigId(configurationId) ).getStorageLensConfiguration(); System.out.println(configuration.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(); } } }