- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetEnabledStandardsCommand
Returns a list of the standards that are currently enabled.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SecurityHubClient, GetEnabledStandardsCommand } from "@aws-sdk/client-securityhub"; // ES Modules import
// const { SecurityHubClient, GetEnabledStandardsCommand } = require("@aws-sdk/client-securityhub"); // CommonJS import
const client = new SecurityHubClient(config);
const input = { // GetEnabledStandardsRequest
StandardsSubscriptionArns: [ // StandardsSubscriptionArns
"STRING_VALUE",
],
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new GetEnabledStandardsCommand(input);
const response = await client.send(command);
// { // GetEnabledStandardsResponse
// 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
// },
// },
// ],
// NextToken: "STRING_VALUE",
// };
Example Usage
GetEnabledStandardsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | The maximum number of results to return in the response. |
NextToken | string | undefined | The token that is required for pagination. On your first call to the For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response. |
StandardsSubscriptionArns | string[] | undefined | The list of the standards subscription ARNs for the standards to retrieve. |
GetEnabledStandardsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextToken | string | undefined | The pagination token to use to request the next page of results. |
StandardsSubscriptions | StandardsSubscription[] | undefined | The list of |
Throws
Name | Fault | Details |
---|
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. |