BatchGetSecurityControlsCommand

Provides details about a batch of security controls for the current Amazon Web Services account and Amazon Web Services Region.

Example Syntax

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

import { SecurityHubClient, BatchGetSecurityControlsCommand } from "@aws-sdk/client-securityhub"; // ES Modules import
// const { SecurityHubClient, BatchGetSecurityControlsCommand } = require("@aws-sdk/client-securityhub"); // CommonJS import
const client = new SecurityHubClient(config);
const input = { // BatchGetSecurityControlsRequest
  SecurityControlIds: [ // StringList // required
    "STRING_VALUE",
  ],
};
const command = new BatchGetSecurityControlsCommand(input);
const response = await client.send(command);
// { // BatchGetSecurityControlsResponse
//   SecurityControls: [ // SecurityControls // required
//     { // SecurityControl
//       SecurityControlId: "STRING_VALUE", // required
//       SecurityControlArn: "STRING_VALUE", // required
//       Title: "STRING_VALUE", // required
//       Description: "STRING_VALUE", // required
//       RemediationUrl: "STRING_VALUE", // required
//       SeverityRating: "LOW" || "MEDIUM" || "HIGH" || "CRITICAL", // required
//       SecurityControlStatus: "ENABLED" || "DISABLED", // required
//       UpdateStatus: "READY" || "UPDATING",
//       Parameters: { // Parameters
//         "<keys>": { // ParameterConfiguration
//           ValueType: "DEFAULT" || "CUSTOM", // required
//           Value: { // ParameterValue Union: only one key present
//             Integer: Number("int"),
//             IntegerList: [ // IntegerList
//               Number("int"),
//             ],
//             Double: Number("double"),
//             String: "STRING_VALUE",
//             StringList: [ // StringList
//               "STRING_VALUE",
//             ],
//             Boolean: true || false,
//             Enum: "STRING_VALUE",
//             EnumList: [
//               "STRING_VALUE",
//             ],
//           },
//         },
//       },
//       LastUpdateReason: "STRING_VALUE",
//     },
//   ],
//   UnprocessedIds: [ // UnprocessedSecurityControls
//     { // UnprocessedSecurityControl
//       SecurityControlId: "STRING_VALUE", // required
//       ErrorCode: "INVALID_INPUT" || "ACCESS_DENIED" || "NOT_FOUND" || "LIMIT_EXCEEDED", // required
//       ErrorReason: "STRING_VALUE",
//     },
//   ],
// };

Example Usage

 Loading code editor

BatchGetSecurityControlsCommand Input

Parameter
Type
Description
SecurityControlIds
Required
string[] | undefined

A list of security controls (identified with SecurityControlId, SecurityControlArn, or a mix of both parameters). The security control ID or Amazon Resource Name (ARN) is the same across standards.

BatchGetSecurityControlsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
SecurityControls
Required
SecurityControl[] | undefined

An array that returns the identifier, Amazon Resource Name (ARN), and other details about a security control. The same information is returned whether the request includes SecurityControlId or SecurityControlArn.

UnprocessedIds
UnprocessedSecurityControl[] | undefined

A security control (identified with SecurityControlId, SecurityControlArn, or a mix of both parameters) for which details cannot be returned.

Throws

Name
Fault
Details
InternalException
server

Internal server error.

InvalidAccessException
client

The account doesn't have permission to perform this action.

InvalidInputException
client

The request was rejected because you supplied an invalid or out-of-range value for an input parameter.

LimitExceededException
client

The request was rejected because it attempted to create resources beyond the current Amazon Web Services account or throttling limits. The error code describes the limit exceeded.

SecurityHubServiceException
Base exception class for all service exceptions from SecurityHub service.