または DeleteOrganizationAWS SDKで を使用する CLI - AWS SDK CLI コードの例

AWS Doc SDK Examples GitHub リポジトリには他にも AWS SDK例があります。

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

または DeleteOrganizationAWS SDKで を使用する CLI

以下のコード例は、DeleteOrganization の使用方法を示しています。

.NET
AWS SDK for .NET
注記

については、「」を参照してください GitHub。AWS コード例リポジトリ で全く同じ例を見つけて、設定と実行の方法を確認してください。

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."); } } }
  • API 詳細については、「 リファレンスDeleteOrganization」の「」を参照してください。 AWS SDK for .NET API

CLI
AWS CLI

組織を削除するには

次の例は、組織を削除する方法を示しています。この操作を実行するには、組織のマスターアカウントの管理者である必要があります。この例では、以前に組織からすべてのメンバーアカウント、OUs、およびポリシーを削除したことを前提としています。

aws organizations delete-organization
  • API 詳細については、「 コマンドリファレンスDeleteOrganization」の「」を参照してください。 AWS CLI