We recommend new projects start with resources from the AWS provider.
aws-native.organizations.getOrganizationalUnit
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
You can use organizational units (OUs) to group accounts together to administer as a single unit. This greatly simplifies the management of your accounts. For example, you can attach a policy-based control to an OU, and all accounts within the OU automatically inherit the policy. You can create multiple OUs within a single organization, and you can create OUs within other OUs. Each OU can contain multiple accounts, and you can move accounts from one OU to another. However, OU names must be unique within a parent OU or root.
Using getOrganizationalUnit
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getOrganizationalUnit(args: GetOrganizationalUnitArgs, opts?: InvokeOptions): Promise<GetOrganizationalUnitResult>
function getOrganizationalUnitOutput(args: GetOrganizationalUnitOutputArgs, opts?: InvokeOptions): Output<GetOrganizationalUnitResult>
def get_organizational_unit(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetOrganizationalUnitResult
def get_organizational_unit_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationalUnitResult]
func LookupOrganizationalUnit(ctx *Context, args *LookupOrganizationalUnitArgs, opts ...InvokeOption) (*LookupOrganizationalUnitResult, error)
func LookupOrganizationalUnitOutput(ctx *Context, args *LookupOrganizationalUnitOutputArgs, opts ...InvokeOption) LookupOrganizationalUnitResultOutput
> Note: This function is named LookupOrganizationalUnit
in the Go SDK.
public static class GetOrganizationalUnit
{
public static Task<GetOrganizationalUnitResult> InvokeAsync(GetOrganizationalUnitArgs args, InvokeOptions? opts = null)
public static Output<GetOrganizationalUnitResult> Invoke(GetOrganizationalUnitInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOrganizationalUnitResult> getOrganizationalUnit(GetOrganizationalUnitArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws-native:organizations:getOrganizationalUnit
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The unique identifier (ID) associated with this OU.
- Id string
- The unique identifier (ID) associated with this OU.
- id String
- The unique identifier (ID) associated with this OU.
- id string
- The unique identifier (ID) associated with this OU.
- id str
- The unique identifier (ID) associated with this OU.
- id String
- The unique identifier (ID) associated with this OU.
getOrganizationalUnit Result
The following output properties are available:
- Arn string
- The Amazon Resource Name (ARN) of this OU.
- Id string
- The unique identifier (ID) associated with this OU.
- Name string
- The friendly name of this OU.
- List<Pulumi.
Aws Native. Outputs. Tag> - A list of tags that you want to attach to the newly created OU.
- arn str
- The Amazon Resource Name (ARN) of this OU.
- id str
- The unique identifier (ID) associated with this OU.
- name str
- The friendly name of this OU.
- Sequence[root_Tag]
- A list of tags that you want to attach to the newly created OU.
- arn String
- The Amazon Resource Name (ARN) of this OU.
- id String
- The unique identifier (ID) associated with this OU.
- name String
- The friendly name of this OU.
- List<Property Map>
- A list of tags that you want to attach to the newly created OU.
Supporting Types
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.