import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateOrganizationRequest, CreateOrganizationResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link CreateOrganizationCommand}. */ export interface CreateOrganizationCommandInput extends CreateOrganizationRequest { } /** * @public * * The output of {@link CreateOrganizationCommand}. */ export interface CreateOrganizationCommandOutput extends CreateOrganizationResponse, __MetadataBearer { } declare const CreateOrganizationCommand_base: { new (input: CreateOrganizationCommandInput): import("@smithy/core/client").CommandImpl; new (...[input]: [] | [CreateOrganizationCommandInput]): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Creates an Amazon Web Services organization. The account whose user is calling the * CreateOrganization operation automatically becomes the management account of the new organization.

*

This operation must be called using credentials from the account that is to become the * new organization's management account. The principal must also have the relevant IAM * permissions.

*

By default (or if you set the FeatureSet parameter to ALL), * the new organization is created with all features enabled and service control policies * automatically enabled in the root. If you instead choose to create the organization * supporting only the consolidated billing features by setting the FeatureSet * parameter to CONSOLIDATED_BILLING, no policy types are enabled by default * and you can't use organization policies.

*

The AccountJoinedOrganization event is logged in CloudTrail and * is available only in the management account's event history. This event includes * joinedMethod:INVITED and joinedTime fields to provide * context on how and when the account joined the organization.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { OrganizationsClient, CreateOrganizationCommand } from "@aws-sdk/client-organizations"; // ES Modules import * // const { OrganizationsClient, CreateOrganizationCommand } = require("@aws-sdk/client-organizations"); // CommonJS import * // import type { OrganizationsClientConfig } from "@aws-sdk/client-organizations"; * const config = {}; // type is OrganizationsClientConfig * const client = new OrganizationsClient(config); * const input = { // CreateOrganizationRequest * FeatureSet: "ALL" || "CONSOLIDATED_BILLING", * }; * const command = new CreateOrganizationCommand(input); * const response = await client.send(command); * // { // CreateOrganizationResponse * // Organization: { // Organization * // Id: "STRING_VALUE", * // Arn: "STRING_VALUE", * // FeatureSet: "ALL" || "CONSOLIDATED_BILLING", * // MasterAccountArn: "STRING_VALUE", * // MasterAccountId: "STRING_VALUE", * // MasterAccountEmail: "STRING_VALUE", * // AvailablePolicyTypes: [ // PolicyTypes * // { // PolicyTypeSummary * // Type: "SERVICE_CONTROL_POLICY" || "RESOURCE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY" || "DECLARATIVE_POLICY_EC2" || "SECURITYHUB_POLICY" || "INSPECTOR_POLICY" || "UPGRADE_ROLLOUT_POLICY" || "BEDROCK_POLICY" || "S3_POLICY" || "NETWORK_SECURITY_DIRECTOR_POLICY", * // Status: "ENABLED" || "PENDING_ENABLE" || "PENDING_DISABLE", * // }, * // ], * // }, * // }; * * ``` * * @param CreateOrganizationCommandInput - {@link CreateOrganizationCommandInput} * @returns {@link CreateOrganizationCommandOutput} * @see {@link CreateOrganizationCommandInput} for command's `input` shape. * @see {@link CreateOrganizationCommandOutput} for command's `response` shape. * @see {@link OrganizationsClientResolvedConfig | config} for OrganizationsClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

You don't have permissions to perform the requested operation. The user or role that * is making the request must have at least one IAM permissions policy attached that * grants the required permissions. For more information, see Access Management in the * IAM User Guide.

* * @throws {@link AccessDeniedForDependencyException} (client fault) *

The operation that you attempted requires you to have the * iam:CreateServiceLinkedRole for * organizations.amazonaws.com permission so that Organizations can create the * required service-linked role. You don't have that permission.

* * @throws {@link AlreadyInOrganizationException} (client fault) *

This account is already a member of an organization. An account can belong to only one * organization at a time.

* * @throws {@link ConcurrentModificationException} (client fault) *

The target of the operation is currently being modified by a different request. Try * again later.

* * @throws {@link ConstraintViolationException} (client fault) *

Performing this operation violates a minimum or maximum value limit. For example, * attempting to remove the last service control policy (SCP) from an OU or root, inviting * or creating too many accounts to the organization, or attaching too many policies to an * account, OU, or root. This exception includes a reason that contains additional * information about the violated limit:

* *

Some of the reasons in the following list might not be applicable to this specific * API or operation.

*
* * * @throws {@link InvalidInputException} (client fault) *

The requested operation failed because you provided invalid values for one or more of * the request parameters. This exception includes a reason that contains additional * information about the violated limit:

* *

Some of the reasons in the following list might not be applicable to this specific * API or operation.

*
* * * @throws {@link ServiceException} (server fault) *

Organizations can't complete your request because of an internal service error. Try again * later.

* * @throws {@link TooManyRequestsException} (client fault) *

You have sent too many requests in too short a period of time. The quota helps protect * against denial-of-service attacks. Try again later.

*

For information about quotas that affect Organizations, see Quotas for Organizations in the * Organizations User Guide.

* * @throws {@link OrganizationsServiceException} *

Base exception class for all service exceptions from Organizations service.

* * * @example To create a new organization with all features enabled * ```javascript * // Bill wants to create an organization using credentials from account 111111111111. The following example shows that the account becomes the master account in the new organization. Because he does not specify a feature set, the new organization defaults to all features enabled and service control policies enabled on the root: * * * const input = { /* empty *\/ }; * const command = new CreateOrganizationCommand(input); * const response = await client.send(command); * /* response is * { * Organization: { * Arn: "arn:aws:organizations::111111111111:organization/o-exampleorgid", * AvailablePolicyTypes: [ * { * Status: "ENABLED", * Type: "SERVICE_CONTROL_POLICY" * } * ], * FeatureSet: "ALL", * Id: "o-exampleorgid", * MasterAccountArn: "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111", * MasterAccountEmail: "bill@example.com", * MasterAccountId: "111111111111" * } * } * *\/ * ``` * * @example To create a new organization with consolidated billing features only * ```javascript * // In the following example, Bill creates an organization using credentials from account 111111111111, and configures the organization to support only the consolidated billing feature set: * * * const input = { * FeatureSet: "CONSOLIDATED_BILLING" * }; * const command = new CreateOrganizationCommand(input); * const response = await client.send(command); * /* response is * { * Organization: { * Arn: "arn:aws:organizations::111111111111:organization/o-exampleorgid", * AvailablePolicyTypes: [], * FeatureSet: "CONSOLIDATED_BILLING", * Id: "o-exampleorgid", * MasterAccountArn: "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111", * MasterAccountEmail: "bill@example.com", * MasterAccountId: "111111111111" * } * } * *\/ * ``` * * @public */ export declare class CreateOrganizationCommand extends CreateOrganizationCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateOrganizationRequest; output: CreateOrganizationResponse; }; sdk: { input: CreateOrganizationCommandInput; output: CreateOrganizationCommandOutput; }; }; }