AWSDocAWS SDKGitHub サンプルリポジトリには、さらに多くの SDK サンプルがあります
翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
AWSSDK を使用して組織のOrganizations 単位を削除する
次のコード例は、組織のOrganizations 単位を削除する方法を示しています。
- .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 AWS Organizations organizational unit. /// This example was created using the AWS SDK for .NET version 3.7 and /// .NET Core 5.0. /// </summary> public class DeleteOrganizationalUnit { /// <summary> /// Initializes the Organizations client object and calls /// DeleteOrganizationalUnitAsync to delete the organizational unit /// with the selected ID. /// </summary> public static async Task Main() { // Create the client object using the default account. IAmazonOrganizations client = new AmazonOrganizationsClient(); var orgUnitId = "ou-0000-00000000"; var request = new DeleteOrganizationalUnitRequest { OrganizationalUnitId = orgUnitId, }; var response = await client.DeleteOrganizationalUnitAsync(request); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { Console.WriteLine($"Successfully deleted the organizational unit with ID: {orgUnitId}."); } else { Console.WriteLine($"Could not delete the organizational unit with ID: {orgUnitId}."); } } }
-
API の詳細については、AWS SDK for .NETAPI DeleteOrganizationalUnitリファレンスのを参照してください。
-
組織の削除
ポリシーを説明してください