AWS SDK 또는 CLI와 DeleteOrganization 함께 사용 - AWS Organizations

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

AWS SDK 또는 CLI와 DeleteOrganization 함께 사용

다음 코드 예제는 DeleteOrganization의 사용 방법을 보여 줍니다.

.NET
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 세부 정보는 AWS SDK for .NET API 참조DeleteOrganization을 참조하세요.

CLI
AWS CLI

조직을 삭제하는 방법

다음 예시에서는 조직을 삭제하는 방법을 보여줍니다. 이 작업을 수행하려면 조직의 마스터 계정 관리자여야 합니다. 이 예시에서는 이전에 조직에서 모든 멤버 계정, OU 및 정책을 제거했다고 가정합니다.

aws organizations delete-organization

AWS SDK 개발자 안내서 및 코드 예제의 전체 목록은 섹션을 참조하세요AWS SDK AWS Organizations 에서 사용. 이 주제에는 시작하기에 대한 정보와 이전 SDK 버전에 대한 세부 정보도 포함되어 있습니다.