Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.
Wenn Sie eines oder mehrere der Codebeispiele in diesem Abschnitt ausgeführt haben, empfehlen wir Ihnen, eines der folgenden Beispiele zu verwenden, um die durch diese Codebeispiele erstellten AWS AppConfig Ressourcen zu finden und zu löschen. Die Beispiele in diesem Abschnitt lauten wie folgt APIs:
/*
This sample provides cleanup code that deletes all the AWS AppConfig resources created in the samples above.
WARNING: this code will permanently delete the given application and all of its sub-resources, including
configuration profiles, hosted configuration versions, and environments. DO NOT run this code against
an application that you may need in the future.
*/
public void cleanUpDemoResources() {
AppConfigClient appconfig = AppConfigClient.create();
// The name of the application to delete
// IMPORTANT: verify this name corresponds to the application you wish to delete
String applicationToDelete = "MyDemoApp";
appconfig.listApplicationsPaginator(ListApplicationsRequest.builder().build()).items().forEach(app -> {
if (app.name().equals(applicationToDelete)) {
System.out.println("Deleting App: " + app);
appconfig.listConfigurationProfilesPaginator(req -> req.applicationId(app.id())).items().forEach(cp -> {
System.out.println("Deleting Profile: " + cp);
appconfig
.listHostedConfigurationVersionsPaginator(req -> req
.applicationId(app.id())
.configurationProfileId(cp.id()))
.items()
.forEach(hcv -> {
System.out.println("Deleting HCV: " + hcv);
appconfig.deleteHostedConfigurationVersion(req -> req
.applicationId(app.id())
.configurationProfileId(cp.id())
.versionNumber(hcv.versionNumber()));
});
appconfig.deleteConfigurationProfile(req -> req
.applicationId(app.id())
.configurationProfileId(cp.id()));
});
appconfig.listEnvironmentsPaginator(req->req.applicationId(app.id())).items().forEach(env -> {
System.out.println("Deleting Environment: " + env);
appconfig.deleteEnvironment(req->req.applicationId(app.id()).environmentId(env.id()));
});
appconfig.deleteApplication(req -> req.applicationId(app.id()));
}
});
}