View a markdown version of this page

Daftar dasbor Lensa Penyimpanan Amazon S3 - Amazon Simple Storage Service

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

Daftar dasbor Lensa Penyimpanan Amazon S3

Untuk mencantumkan dasbor S3 Storage Lens
  1. Masuk ke Konsol Manajemen AWS dan buka konsol Amazon S3 di https://console.aws.amazon.com/s3/.

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

  3. Pilih Dasbor. Anda sekarang dapat melihat dasbor di halaman Anda Akun AWS.

contoh

Contoh perintah berikut mencantumkan dasbor S3 Storage Lens di Anda Akun AWS. Untuk menggunakan contoh ini, ganti user input placeholders dengan informasi Anda sendiri.

aws s3control list-storage-lens-configurations --account-id=222222222222 --region=us-east-1 --next-token=abcdefghij1234
contoh

Contoh berikut mencantumkan konfigurasi S3 Storage Lens tanpa token berikutnya. Untuk menggunakan contoh ini, ganti user input placeholders dengan informasi Anda sendiri.

aws s3control list-storage-lens-configurations --account-id=222222222222 --region=us-east-1
contoh— Daftar konfigurasi dasbor S3 Storage Lens

Contoh berikut menunjukkan cara membuat daftar konfigurasi S3 Storage Lens di SDK untuk Java. Untuk menggunakan contoh ini, ganti user input placeholders dengan informasi Anda sendiri.” untuk setiap deskripsi contoh.

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