EnableOrganizationAdminAccountCommand

Designates an Amazon Web Services account within the organization as your GuardDuty delegated administrator. Only the organization's management account can run this API operation.

Example Syntax

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

import { GuardDutyClient, EnableOrganizationAdminAccountCommand } from "@aws-sdk/client-guardduty"; // ES Modules import
// const { GuardDutyClient, EnableOrganizationAdminAccountCommand } = require("@aws-sdk/client-guardduty"); // CommonJS import
const client = new GuardDutyClient(config);
const input = { // EnableOrganizationAdminAccountRequest
  AdminAccountId: "STRING_VALUE", // required
};
const command = new EnableOrganizationAdminAccountCommand(input);
const response = await client.send(command);
// {};

EnableOrganizationAdminAccountCommand Input

Parameter
Type
Description
AdminAccountId
Required
string | undefined

The Amazon Web Services account ID for the organization account to be enabled as a GuardDuty delegated administrator.

EnableOrganizationAdminAccountCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
BadRequestException
client

A bad request exception object.

InternalServerErrorException
server

An internal server error exception object.

GuardDutyServiceException
Base exception class for all service exceptions from GuardDuty service.