BatchEnableStandardsCommand

Enables the standards specified by the provided StandardsArn. To obtain the ARN for a standard, use the DescribeStandards operation.

For more information, see the Security Standards  section of the Security Hub User Guide.

Example Syntax

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

import { SecurityHubClient, BatchEnableStandardsCommand } from "@aws-sdk/client-securityhub"; // ES Modules import
// const { SecurityHubClient, BatchEnableStandardsCommand } = require("@aws-sdk/client-securityhub"); // CommonJS import
const client = new SecurityHubClient(config);
const input = { // BatchEnableStandardsRequest
  StandardsSubscriptionRequests: [ // StandardsSubscriptionRequests // required
    { // StandardsSubscriptionRequest
      StandardsArn: "STRING_VALUE", // required
      StandardsInput: { // StandardsInputParameterMap
        "<keys>": "STRING_VALUE",
      },
    },
  ],
};
const command = new BatchEnableStandardsCommand(input);
const response = await client.send(command);
// { // BatchEnableStandardsResponse
//   StandardsSubscriptions: [ // StandardsSubscriptions
//     { // StandardsSubscription
//       StandardsSubscriptionArn: "STRING_VALUE", // required
//       StandardsArn: "STRING_VALUE", // required
//       StandardsInput: { // StandardsInputParameterMap // required
//         "<keys>": "STRING_VALUE",
//       },
//       StandardsStatus: "PENDING" || "READY" || "FAILED" || "DELETING" || "INCOMPLETE", // required
//       StandardsControlsUpdatable: "READY_FOR_UPDATES" || "NOT_READY_FOR_UPDATES",
//       StandardsStatusReason: { // StandardsStatusReason
//         StatusReasonCode: "NO_AVAILABLE_CONFIGURATION_RECORDER" || "MAXIMUM_NUMBER_OF_CONFIG_RULES_EXCEEDED" || "INTERNAL_ERROR", // required
//       },
//     },
//   ],
// };

Example Usage

 There was an error loading the code editor. Retry

BatchEnableStandardsCommand Input

Parameter
Type
Description
StandardsSubscriptionRequests
Required
StandardsSubscriptionRequest[] | undefined

The list of standards checks to enable.

BatchEnableStandardsCommand Output

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

The details of the standards subscriptions that were enabled.

Throws

Name
Fault
Details
AccessDeniedException
client

You don't have permission to perform the action specified in the request.

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.