Auflisten von Amazon-S3-Storage-Lens-Dashboards
So listen Sie ein S3-Storage-Lens-Dashboard auf
Melden Sie sich bei der AWS Management Console an und öffnen Sie die Amazon-S3-Konsole unter https://console.aws.amazon.com/s3/
. -
Navigieren Sie im linken Navigationsbereich zu Storage Lens.
-
Wählen Sie Dashboards aus. Sie können jetzt die Dashboards in Ihrem AWS-Konto anzeigen.
Der folgende Beispielbefehl listet die S3-Storage-Lens-Dashboards in Ihrem AWS-Konto auf. Wenn Sie diese Beispiele verwenden möchten, ersetzen Sie die
durch Ihre Informationen.user input placeholders
aws s3control list-storage-lens-configurations --account-id=
222222222222
--region=us-east-1
--next-token=abcdefghij1234
Das folgende Beispiel listet S3-Storage-Lens-Konfigurationen ohne das nächste Token auf. Wenn Sie diese Beispiele verwenden möchten, ersetzen Sie die
durch Ihre Informationen.user input placeholders
aws s3control list-storage-lens-configurations --account-id=
222222222222
--region=us-east-1
Beispiel – Auflisten von Konfigurationen des S3-Storage-Lens-Dashboards
In den folgenden Beispielen wird gezeigt, wie S3-Storage-Lens-Konfigurationen im SDK für Java aufgelistet werden. Wenn Sie dieses Beispiel verwenden möchten, ersetzen Sie
durch Ihre Informationen. zu jeder Beispielbeschreibung.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.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(); } } }