- 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.
ValidateSecurityProfileBehaviorsCommand
Validates a Device Defender security profile behaviors specification.
Requires permission to access the ValidateSecurityProfileBehaviors action.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTClient, ValidateSecurityProfileBehaviorsCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, ValidateSecurityProfileBehaviorsCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // ValidateSecurityProfileBehaviorsRequest
behaviors: [ // Behaviors // required
{ // Behavior
name: "STRING_VALUE", // required
metric: "STRING_VALUE",
metricDimension: { // MetricDimension
dimensionName: "STRING_VALUE", // required
operator: "IN" || "NOT_IN",
},
criteria: { // BehaviorCriteria
comparisonOperator: "less-than" || "less-than-equals" || "greater-than" || "greater-than-equals" || "in-cidr-set" || "not-in-cidr-set" || "in-port-set" || "not-in-port-set" || "in-set" || "not-in-set",
value: { // MetricValue
count: Number("long"),
cidrs: [ // Cidrs
"STRING_VALUE",
],
ports: [ // Ports
Number("int"),
],
number: Number("double"),
numbers: [ // NumberList
Number("double"),
],
strings: [ // StringList
"STRING_VALUE",
],
},
durationSeconds: Number("int"),
consecutiveDatapointsToAlarm: Number("int"),
consecutiveDatapointsToClear: Number("int"),
statisticalThreshold: { // StatisticalThreshold
statistic: "STRING_VALUE",
},
mlDetectionConfig: { // MachineLearningDetectionConfig
confidenceLevel: "LOW" || "MEDIUM" || "HIGH", // required
},
},
suppressAlerts: true || false,
exportMetric: true || false,
},
],
};
const command = new ValidateSecurityProfileBehaviorsCommand(input);
const response = await client.send(command);
// { // ValidateSecurityProfileBehaviorsResponse
// valid: true || false,
// validationErrors: [ // ValidationErrors
// { // ValidationError
// errorMessage: "STRING_VALUE",
// },
// ],
// };
ValidateSecurityProfileBehaviorsCommand Input
See ValidateSecurityProfileBehaviorsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
behaviors Required | Behavior[] | undefined | Specifies the behaviors that, when violated by a device (thing), cause an alert. |
ValidateSecurityProfileBehaviorsCommand Output
See ValidateSecurityProfileBehaviorsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
valid | boolean | undefined | True if the behaviors were valid. |
validationErrors | ValidationError[] | undefined | The list of any errors found in the behaviors. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalFailureException | server | An unexpected error has occurred. |
InvalidRequestException | client | The request is not valid. |
ThrottlingException | client | The rate exceeds the limit. |
IoTServiceException | Base exception class for all service exceptions from IoT service. |