Weitere AWS-SDK-Beispiele sind im GitHub-Repository Beispiele für AWS Doc SDKs
Verwendung von DeleteOrganization mit einem AWS-SDK oder CLI
Die folgenden Code-Beispiele zeigen, wie DeleteOrganization verwendet wird.
- .NET
-
- SDK für .NET
-
Anmerkung
Auf GitHub finden Sie noch mehr. Hier finden Sie das vollständige Beispiel und erfahren, wie Sie das AWS-Code-Beispiel-
einrichten und ausführen. using System; using System.Threading.Tasks; using Amazon.Organizations; using Amazon.Organizations.Model; /// <summary> /// Shows how to delete an existing organization using the AWS /// Organizations Service. /// </summary> public class DeleteOrganization { /// <summary> /// Initializes the Organizations client and then calls /// DeleteOrganizationAsync to delete the organization. /// </summary> public static async Task Main() { // Create the client object using the default account. IAmazonOrganizations client = new AmazonOrganizationsClient(); var response = await client.DeleteOrganizationAsync(new DeleteOrganizationRequest()); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { Console.WriteLine("Successfully deleted organization."); } else { Console.WriteLine("Could not delete organization."); } } }-
Weitere API-Informationen finden Sie unter DeleteOrganization in der AWS SDK für .NET-API-Referenz.
-
- CLI
-
- AWS CLI
-
So löschen Sie eine Organisation
Im folgenden Beispiel wird gezeigt, wie eine Organisation gelöscht wird. Um diesen Vorgang ausführen zu können, müssen Sie Administrator des Hauptkontos in der Organisation sein. Im Beispiel wird davon ausgegangen, dass Sie zuvor alle Mitgliedskonten, Organisationseinheiten und Richtlinien aus der Organisation entfernt haben:
aws organizations delete-organization-
Weitere API-Informationen finden Sie unter DeleteOrganization
in der AWS CLI-Befehlsreferenz.
-