import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { DisablePolicyTypeRequest, DisablePolicyTypeResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link DisablePolicyTypeCommand}. */ export interface DisablePolicyTypeCommandInput extends DisablePolicyTypeRequest { } /** * @public * * The output of {@link DisablePolicyTypeCommand}. */ export interface DisablePolicyTypeCommandOutput extends DisablePolicyTypeResponse, __MetadataBearer { } declare const DisablePolicyTypeCommand_base: { new (input: DisablePolicyTypeCommandInput): import("@smithy/core/client").CommandImpl; new (input: DisablePolicyTypeCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Disables an organizational policy type in a root. A policy of a certain type can be * attached to entities in a root only if that type is enabled in the root. After you * perform this operation, you no longer can attach policies of the specified type to that * root or to any organizational unit (OU) or account in that root. You can undo this by * using the EnablePolicyType operation.

*

This is an asynchronous request that Amazon Web Services performs in the background. If you disable * a policy type for a root, it still appears enabled for the organization if all features are enabled for the organization. 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.

*

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, DisablePolicyTypeCommand } from "@aws-sdk/client-organizations"; // ES Modules import * // const { OrganizationsClient, DisablePolicyTypeCommand } = 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 = { // DisablePolicyTypeRequest * 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 DisablePolicyTypeCommand(input); * const response = await client.send(command); * // { // DisablePolicyTypeResponse * // 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 DisablePolicyTypeCommandInput - {@link DisablePolicyTypeCommandInput} * @returns {@link DisablePolicyTypeCommandOutput} * @see {@link DisablePolicyTypeCommandInput} for command's `input` shape. * @see {@link DisablePolicyTypeCommandOutput} 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 PolicyTypeNotEnabledException} (client fault) *

The specified policy type isn't currently enabled in this root. You can't attach * policies of the specified type to entities in a root until you enable that type in the * root. For more information, see Enabling all features * in your organization in 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 disable a policy type in a root * ```javascript * // The following example shows how to disable the service control policy (SCP) policy type in a root. The response shows that the PolicyTypes response element no longer includes SERVICE_CONTROL_POLICY:/n/n * const input = { * PolicyType: "SERVICE_CONTROL_POLICY", * RootId: "r-examplerootid111" * }; * const command = new DisablePolicyTypeCommand(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: [] * } * } * *\/ * ``` * * @public */ export declare class DisablePolicyTypeCommand extends DisablePolicyTypeCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: DisablePolicyTypeRequest; output: DisablePolicyTypeResponse; }; sdk: { input: DisablePolicyTypeCommandInput; output: DisablePolicyTypeCommandOutput; }; }; }