import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { EnablePolicyTypeRequest, EnablePolicyTypeResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link EnablePolicyTypeCommand}. */ export interface EnablePolicyTypeCommandInput extends EnablePolicyTypeRequest { } /** * @public * * The output of {@link EnablePolicyTypeCommand}. */ export interface EnablePolicyTypeCommandOutput extends EnablePolicyTypeResponse, __MetadataBearer { } declare const EnablePolicyTypeCommand_base: { new (input: EnablePolicyTypeCommandInput): import("@smithy/core/client").CommandImpl; new (input: EnablePolicyTypeCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Enables a policy type in a root. After you enable a policy type in a root, you can * attach policies of that type to the root, any organizational unit (OU), or account in * that root. You can undo this by using the DisablePolicyType * operation.

*

This is an asynchronous request that Amazon Web Services performs in the background. Amazon Web Services * recommends that you first use ListRoots to see the status of policy * types for a specified root, and then use this operation.

*

You can only call this operation from the management account or a member account that is a delegated administrator.

*

You can enable a policy type in a root only if that policy type is available in the * organization. To view the status of available policy types in the organization, use * ListRoots.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { OrganizationsClient, EnablePolicyTypeCommand } from "@aws-sdk/client-organizations"; // ES Modules import * // const { OrganizationsClient, EnablePolicyTypeCommand } = 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 = { // EnablePolicyTypeRequest * RootId: "STRING_VALUE", // required * PolicyType: "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", // required * }; * const command = new EnablePolicyTypeCommand(input); * const response = await client.send(command); * // { // EnablePolicyTypeResponse * // Root: { // Root * // Id: "STRING_VALUE", * // Arn: "STRING_VALUE", * // Name: "STRING_VALUE", * // PolicyTypes: [ // 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 EnablePolicyTypeCommandInput - {@link EnablePolicyTypeCommandInput} * @returns {@link EnablePolicyTypeCommandOutput} * @see {@link EnablePolicyTypeCommandInput} for command's `input` shape. * @see {@link EnablePolicyTypeCommandOutput} 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 AWSOrganizationsNotInUseException} (client fault) *

Your account isn't a member of an organization. To make this request, you must use the * credentials of an account that belongs to an organization.

* * @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 PolicyChangesInProgressException} (client fault) *

Changes to the effective policy are in progress, and its contents can't be returned. * Try the operation again later.

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

The specified policy type is already enabled in the specified root.

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

You can't use the specified policy type with the feature set currently enabled for * this organization. For example, you can enable SCPs only after you enable all features * in the organization. For more information, see Managing * Organizations policiesin the Organizations User Guide.

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

We can't find a root with the RootId that you specified.

* * @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 UnsupportedAPIEndpointException} (client fault) *

This action isn't available in the current Amazon Web Services Region.

* * @throws {@link OrganizationsServiceException} *

Base exception class for all service exceptions from Organizations service.

* * * @example To enable a policy type in a root * ```javascript * // The following example shows how to enable the service control policy (SCP) policy type in a root. The output shows a root object with a PolicyTypes response element showing that SCPs are now enabled:/n/n * const input = { * PolicyType: "SERVICE_CONTROL_POLICY", * RootId: "r-examplerootid111" * }; * const command = new EnablePolicyTypeCommand(input); * const response = await client.send(command); * /* response is * { * Root: { * Arn: "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111", * Id: "r-examplerootid111", * Name: "Root", * PolicyTypes: [ * { * Status: "ENABLED", * Type: "SERVICE_CONTROL_POLICY" * } * ] * } * } * *\/ * ``` * * @public */ export declare class EnablePolicyTypeCommand extends EnablePolicyTypeCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: EnablePolicyTypeRequest; output: EnablePolicyTypeResponse; }; sdk: { input: EnablePolicyTypeCommandInput; output: EnablePolicyTypeCommandOutput; }; }; }