paws.management (version 0.1.0)

organizations_delete_organizational_unit: Deletes an organizational unit (OU) from a root or another OU

Description

Deletes an organizational unit (OU) from a root or another OU. You must first remove all accounts and child OUs from the OU that you want to delete.

Usage

organizations_delete_organizational_unit(OrganizationalUnitId)

Arguments

OrganizationalUnitId

[required] The unique identifier (ID) of the organizational unit that you want to delete. You can get the ID from the ListOrganizationalUnitsForParent operation.

The regex pattern for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.

Request syntax

svc$delete_organizational_unit(
  OrganizationalUnitId = "string"
)

Details

This operation can be called only from the organization's master account.

Examples

Run this code
# NOT RUN {
# The following example shows how to delete an OU. The example assumes
# that you previously removed all accounts and other OUs from the OU:
# 
# 
# }
# NOT RUN {
svc$delete_organizational_unit(
  OrganizationalUnitId = "ou-examplerootid111-exampleouid111"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace