Ansehen von Konfigurationsdetails von Amazon-S3-Storage-Lens-Dashboards - Amazon Simple Storage Service

Ansehen von Konfigurationsdetails von Amazon-S3-Storage-Lens-Dashboards

Sie können ein Amazon-S3-Storage-Lens-Dashboard über die Amazon-S3-Konsole, AWS CLI und das SDK für Java ansehen.

So sehen Sie die Konfigurationsdetails eines S3-Storage-Lens-Dashboards an
  1. Melden Sie sich bei der AWS Management Console an und öffnen Sie die Amazon-S3-Konsole unter https://console.aws.amazon.com/s3/.

  2. Klicken Sie im linken Navigationsbereich auf Storage Lens.

  3. Wählen Sie Dashboards aus.

  4. Klicken Sie in der Liste Dashboards auf das Dashboard, das Sie ansehen möchten. Jetzt können Sie die Details Ihres Storage-Lens-Dashboards ansehen.

Im folgenden Beispiel wird eine S3-Storage-Lens-Konfiguration abgerufen, sodass Sie die Konfigurationsdetails ansehen können. Wenn Sie diese Beispiele verwenden möchten, ersetzen Sie die user input placeholders durch Ihre Informationen.

aws s3control get-storage-lens-configuration --account-id=222222222222 --config-id=your-configuration-id --region=us-east-1
Beispiel – Abrufen und Anzeigen einer S3-Storage-Lens-Konfiguration

Das folgende Beispiel zeigt Ihnen, wie Sie eine S3-Storage-Lens-Konfiguration im SDK für Java abrufen, sodass Sie die Konfigurationsdetails ansehen können. Wenn Sie dieses Beispiel verwenden möchten, ersetzen Sie user input placeholders durch Ihre Informationen.

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