Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AttachPolicyCommand

Attaches a policy to a root, an organizational unit (OU), or an individual account. How the policy affects accounts depends on the type of policy. Refer to the Organizations User Guide for information about each policy type:

This operation can be called only from the organization's management account.

example

Use a bare-bones client and the command you need to make an API call.

import { OrganizationsClient, AttachPolicyCommand } from "@aws-sdk/client-organizations"; // ES Modules import
// const { OrganizationsClient, AttachPolicyCommand } = require("@aws-sdk/client-organizations"); // CommonJS import
const client = new OrganizationsClient(config);
const command = new AttachPolicyCommand(input);
const response = await client.send(command);
see

AttachPolicyCommandInput for command's input shape.

see

AttachPolicyCommandOutput for command's response shape.

see

config for OrganizationsClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: AttachPolicyCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<AttachPolicyCommandInput, AttachPolicyCommandOutput>

Methods

Static getEndpointParameterInstructions