getAwsOrganizationsRootId

getAwsOrganizationsRootId(provider?: Provider): Output<string>

Resolves the AWS Organizations root ID for an AWS provider.

Remarks

The AWS Organizations root is not an organisational unit, but its ID is required as the parent identifier for root-level organisational-unit and account operations. When provider is omitted, the lookup uses the default AWS provider. Its credentials must be able to call AWS Organizations DescribeOrganization, ListAccounts, ListAWSServiceAccessForOrganization, and ListRoots.

Parameters

  • provider (Provider, optional) — Optional AWS provider used for the lookup.

Returns

  • Output<string> — The AWS Organizations root ID as a Pulumi output.

Example

CODE
import { getAwsOrganizationsRootId } from '@jobcloud/pulumi-helpers';

const rootId = getAwsOrganizationsRootId(); // r-xxxx