@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
134 lines (133 loc) • 5.03 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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.
*
* ## Example Usage
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const config = new pulumi.Config();
* const organizationRootId = config.require("organizationRootId");
* const testTemplateOU = new aws_native.organizations.OrganizationalUnit("testTemplateOU", {
* name: "TestTemplateOU",
* parentId: organizationRootId,
* });
*
* ```
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const config = new pulumi.Config();
* const organizationRootId = config.require("organizationRootId");
* const testTemplateOU = new aws_native.organizations.OrganizationalUnit("testTemplateOU", {
* name: "TestTemplateOU",
* parentId: organizationRootId,
* });
*
* ```
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const config = new pulumi.Config();
* const organizationRootId = config.require("organizationRootId");
* const parentOU = new aws_native.organizations.OrganizationalUnit("parentOU", {
* name: "ParentOU",
* parentId: organizationRootId,
* });
* const childOU = new aws_native.organizations.OrganizationalUnit("childOU", {
* name: "ChildOU",
* parentId: parentOU.id,
* });
*
* ```
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const config = new pulumi.Config();
* const organizationRootId = config.require("organizationRootId");
* const parentOU = new aws_native.organizations.OrganizationalUnit("parentOU", {
* name: "ParentOU",
* parentId: organizationRootId,
* });
* const childOU = new aws_native.organizations.OrganizationalUnit("childOU", {
* name: "ChildOU",
* parentId: parentOU.id,
* });
*
* ```
*/
export declare class OrganizationalUnit extends pulumi.CustomResource {
/**
* Get an existing OrganizationalUnit resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): OrganizationalUnit;
/**
* Returns true if the given object is an instance of OrganizationalUnit. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is OrganizationalUnit;
/**
* The Amazon Resource Name (ARN) of this OU.
*/
readonly arn: pulumi.Output<string>;
/**
* The unique identifier (ID) associated with this OU.
*/
readonly awsId: pulumi.Output<string>;
/**
* The friendly name of this OU.
*/
readonly name: pulumi.Output<string>;
/**
* The unique identifier (ID) of the parent root or OU that you want to create the new OU in.
*/
readonly parentId: pulumi.Output<string>;
/**
* A list of tags that you want to attach to the newly created OU.
*/
readonly tags: pulumi.Output<outputs.Tag[] | undefined>;
/**
* Create a OrganizationalUnit resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: OrganizationalUnitArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a OrganizationalUnit resource.
*/
export interface OrganizationalUnitArgs {
/**
* The friendly name of this OU.
*/
name?: pulumi.Input<string>;
/**
* The unique identifier (ID) of the parent root or OU that you want to create the new OU in.
*/
parentId: pulumi.Input<string>;
/**
* A list of tags that you want to attach to the newly created OU.
*/
tags?: pulumi.Input<pulumi.Input<inputs.TagArgs>[]>;
}