import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { DescribeEffectivePolicyRequest, DescribeEffectivePolicyResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link DescribeEffectivePolicyCommand}. */ export interface DescribeEffectivePolicyCommandInput extends DescribeEffectivePolicyRequest { } /** * @public * * The output of {@link DescribeEffectivePolicyCommand}. */ export interface DescribeEffectivePolicyCommandOutput extends DescribeEffectivePolicyResponse, __MetadataBearer { } declare const DescribeEffectivePolicyCommand_base: { new (input: DescribeEffectivePolicyCommandInput): import("@smithy/core/client").CommandImpl; new (input: DescribeEffectivePolicyCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Returns the contents of the effective policy for specified policy type and account. * The effective policy is the aggregation of any policies of the specified type that the * account inherits, plus any policy of that type that is directly attached to the * account.

*

This operation applies only to management policies. It does not apply to authorization * policies: service control policies (SCPs) and resource control policies (RCPs).

*

For more information about policy inheritance, see Understanding * management policy inheritance in the * Organizations User Guide.

*

You can call this operation from any account in a organization.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { OrganizationsClient, DescribeEffectivePolicyCommand } from "@aws-sdk/client-organizations"; // ES Modules import * // const { OrganizationsClient, DescribeEffectivePolicyCommand } = 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 = { // DescribeEffectivePolicyRequest * PolicyType: "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 * TargetId: "STRING_VALUE", * }; * const command = new DescribeEffectivePolicyCommand(input); * const response = await client.send(command); * // { // DescribeEffectivePolicyResponse * // EffectivePolicy: { // EffectivePolicy * // PolicyContent: "STRING_VALUE", * // LastUpdatedTimestamp: new Date("TIMESTAMP"), * // TargetId: "STRING_VALUE", * // PolicyType: "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", * // }, * // }; * * ``` * * @param DescribeEffectivePolicyCommandInput - {@link DescribeEffectivePolicyCommandInput} * @returns {@link DescribeEffectivePolicyCommandOutput} * @see {@link DescribeEffectivePolicyCommandInput} for command's `input` shape. * @see {@link DescribeEffectivePolicyCommandOutput} 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 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 EffectivePolicyNotFoundException} (client fault) *

If you ran this action on the management account, this policy type is not enabled. If * you ran the action on a member account, the account doesn't have an effective policy of * this type. Contact the administrator of your organization about attaching a policy of * this type to the account.

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

We can't find a root, OU, account, or policy with the TargetId that you * specified.

* * @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.

* * * @public */ export declare class DescribeEffectivePolicyCommand extends DescribeEffectivePolicyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: DescribeEffectivePolicyRequest; output: DescribeEffectivePolicyResponse; }; sdk: { input: DescribeEffectivePolicyCommandInput; output: DescribeEffectivePolicyCommandOutput; }; }; }