Melihat detail konfigurasi dasbor Amazon S3 Storage Lens - Amazon Simple Storage Service

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Melihat detail konfigurasi dasbor Amazon S3 Storage Lens

Anda dapat melihat dasbor Amazon S3 Storage Lens dari konsol Amazon S3 AWS CLI, dan SDK for Java.

Untuk melihat detail konfigurasi dasbor Lensa Penyimpanan S3
  1. Masuk ke AWS Management Console dan buka konsol Amazon S3 di. https://console.aws.amazon.com/s3/

  2. Di panel navigasi kiri, navigasikan ke Storage Lens.

  3. Pilih Dasbor.

  4. Dari daftar Dasbor, klik dasbor yang ingin Anda lihat. Anda sekarang dapat melihat detail dasbor Lensa Penyimpanan Anda.

Contoh berikut mengambil konfigurasi S3 Storage Lens sehingga Anda dapat melihat detail konfigurasi. Untuk menggunakan contoh ini, ganti user input placeholders dengan informasi Anda sendiri.

aws s3control get-storage-lens-configuration --account-id=222222222222 --config-id=your-configuration-id --region=us-east-1
contoh — Mengambil dan melihat konfigurasi Lensa Penyimpanan S3

Contoh berikut menunjukkan cara mengambil konfigurasi S3 Storage Lens di SDK for Java sehingga Anda dapat melihat detail konfigurasi. Untuk menggunakan contoh ini, ganti user input placeholdersdengan informasi Anda sendiri.

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(); } } }