

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
<a name="storage_lens_viewing"></a>

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

## Menggunakan AWS CLI
<a name="S3ListStorageLensConfigurationsCLI"></a>

**Example**  
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}}
```

## Menggunakan AWS SDK for Java
<a name="S3GetStorageLensConfigurationJava"></a>

**Example — 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 placeholders}}`dengan 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();
        }
    }
}
```