getAwsOrganizationsOuId
getAwsOrganizationsOuId(
ouNamePath: string,
provider?: Provider,
): Output<string>Resolves a leaf AWS Organizations organisational-unit ID from its slash-delimited name path.
Remarks
The path may begin with /, such as /Workloads/Core/Prod. Every path segment matches an OU name exactly and is trimmed of surrounding whitespace. When provider is omitted, the lookup uses the default AWS provider. Its credentials must be able to call AWS Organizations DescribeOrganization, ListAccounts, ListAWSServiceAccessForOrganization, ListRoots, and ListOrganizationalUnitsForParent. The organisation lookup must return root information, which is not available when the provider's returnOrganizationOnly option is enabled.
Parameters
ouNamePath(string) — Slash-delimited organisational-unit name path that identifies a leaf OU.provider(Provider, optional) — Optional AWS provider used for the lookup.
Returns
Output<string>— The leaf organisational-unit ID as a Pulumi output.
Example
CODE
import { getAwsOrganizationsOuId } from '@jobcloud/pulumi-helpers';
const workloadsCoreProdOuId = getAwsOrganizationsOuId('/Workloads/Core/Prod'); // ou-xxx