CfnSecurityProfileProps Struct
Properties for defining a CfnSecurityProfile.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const cfnSecurityProfileProps: iot.CfnSecurityProfileProps = {
additionalMetricsToRetainV2: [{
metric: 'metric',
// the properties below are optional
exportMetric: false,
metricDimension: {
dimensionName: 'dimensionName',
// the properties below are optional
operator: 'operator',
},
}],
alertTargets: {
alertTargetsKey: {
alertTargetArn: 'alertTargetArn',
roleArn: 'roleArn',
},
},
behaviors: [{
name: 'name',
// the properties below are optional
criteria: {
comparisonOperator: 'comparisonOperator',
consecutiveDatapointsToAlarm: 123,
consecutiveDatapointsToClear: 123,
durationSeconds: 123,
mlDetectionConfig: {
confidenceLevel: 'confidenceLevel',
},
statisticalThreshold: {
statistic: 'statistic',
},
value: {
cidrs: ['cidrs'],
count: 'count',
number: 123,
numbers: [123],
ports: [123],
strings: ['strings'],
},
},
exportMetric: false,
metric: 'metric',
metricDimension: {
dimensionName: 'dimensionName',
// the properties below are optional
operator: 'operator',
},
suppressAlerts: false,
}],
metricsExportConfig: {
mqttTopic: 'mqttTopic',
roleArn: 'roleArn',
},
securityProfileDescription: 'securityProfileDescription',
securityProfileName: 'securityProfileName',
tags: [{
key: 'key',
value: 'value',
}],
targetArns: ['targetArns'],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot
cfn_security_profile_props = iot.CfnSecurityProfileProps(
additional_metrics_to_retain_v2=[iot.CfnSecurityProfile.MetricToRetainProperty(
metric="metric",
# the properties below are optional
export_metric=False,
metric_dimension=iot.CfnSecurityProfile.MetricDimensionProperty(
dimension_name="dimensionName",
# the properties below are optional
operator="operator"
)
)],
alert_targets={
"alert_targets_key": iot.CfnSecurityProfile.AlertTargetProperty(
alert_target_arn="alertTargetArn",
role_arn="roleArn"
)
},
behaviors=[iot.CfnSecurityProfile.BehaviorProperty(
name="name",
# the properties below are optional
criteria=iot.CfnSecurityProfile.BehaviorCriteriaProperty(
comparison_operator="comparisonOperator",
consecutive_datapoints_to_alarm=123,
consecutive_datapoints_to_clear=123,
duration_seconds=123,
ml_detection_config=iot.CfnSecurityProfile.MachineLearningDetectionConfigProperty(
confidence_level="confidenceLevel"
),
statistical_threshold=iot.CfnSecurityProfile.StatisticalThresholdProperty(
statistic="statistic"
),
value=iot.CfnSecurityProfile.MetricValueProperty(
cidrs=["cidrs"],
count="count",
number=123,
numbers=[123],
ports=[123],
strings=["strings"]
)
),
export_metric=False,
metric="metric",
metric_dimension=iot.CfnSecurityProfile.MetricDimensionProperty(
dimension_name="dimensionName",
# the properties below are optional
operator="operator"
),
suppress_alerts=False
)],
metrics_export_config=iot.CfnSecurityProfile.MetricsExportConfigProperty(
mqtt_topic="mqttTopic",
role_arn="roleArn"
),
security_profile_description="securityProfileDescription",
security_profile_name="securityProfileName",
tags=[CfnTag(
key="key",
value="value"
)],
target_arns=["targetArns"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;
CfnSecurityProfileProps cfnSecurityProfileProps = CfnSecurityProfileProps.builder()
.additionalMetricsToRetainV2(List.of(MetricToRetainProperty.builder()
.metric("metric")
// the properties below are optional
.exportMetric(false)
.metricDimension(MetricDimensionProperty.builder()
.dimensionName("dimensionName")
// the properties below are optional
.operator("operator")
.build())
.build()))
.alertTargets(Map.of(
"alertTargetsKey", AlertTargetProperty.builder()
.alertTargetArn("alertTargetArn")
.roleArn("roleArn")
.build()))
.behaviors(List.of(BehaviorProperty.builder()
.name("name")
// the properties below are optional
.criteria(BehaviorCriteriaProperty.builder()
.comparisonOperator("comparisonOperator")
.consecutiveDatapointsToAlarm(123)
.consecutiveDatapointsToClear(123)
.durationSeconds(123)
.mlDetectionConfig(MachineLearningDetectionConfigProperty.builder()
.confidenceLevel("confidenceLevel")
.build())
.statisticalThreshold(StatisticalThresholdProperty.builder()
.statistic("statistic")
.build())
.value(MetricValueProperty.builder()
.cidrs(List.of("cidrs"))
.count("count")
.number(123)
.numbers(List.of(123))
.ports(List.of(123))
.strings(List.of("strings"))
.build())
.build())
.exportMetric(false)
.metric("metric")
.metricDimension(MetricDimensionProperty.builder()
.dimensionName("dimensionName")
// the properties below are optional
.operator("operator")
.build())
.suppressAlerts(false)
.build()))
.metricsExportConfig(MetricsExportConfigProperty.builder()
.mqttTopic("mqttTopic")
.roleArn("roleArn")
.build())
.securityProfileDescription("securityProfileDescription")
.securityProfileName("securityProfileName")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.targetArns(List.of("targetArns"))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;
var cfnSecurityProfileProps = new CfnSecurityProfileProps {
AdditionalMetricsToRetainV2 = new [] { new MetricToRetainProperty {
Metric = "metric",
// the properties below are optional
ExportMetric = false,
MetricDimension = new MetricDimensionProperty {
DimensionName = "dimensionName",
// the properties below are optional
Operator = "operator"
}
} },
AlertTargets = new Dictionary<string, object> {
{ "alertTargetsKey", new AlertTargetProperty {
AlertTargetArn = "alertTargetArn",
RoleArn = "roleArn"
} }
},
Behaviors = new [] { new BehaviorProperty {
Name = "name",
// the properties below are optional
Criteria = new BehaviorCriteriaProperty {
ComparisonOperator = "comparisonOperator",
ConsecutiveDatapointsToAlarm = 123,
ConsecutiveDatapointsToClear = 123,
DurationSeconds = 123,
MlDetectionConfig = new MachineLearningDetectionConfigProperty {
ConfidenceLevel = "confidenceLevel"
},
StatisticalThreshold = new StatisticalThresholdProperty {
Statistic = "statistic"
},
Value = new MetricValueProperty {
Cidrs = new [] { "cidrs" },
Count = "count",
Number = 123,
Numbers = new [] { 123 },
Ports = new [] { 123 },
Strings = new [] { "strings" }
}
},
ExportMetric = false,
Metric = "metric",
MetricDimension = new MetricDimensionProperty {
DimensionName = "dimensionName",
// the properties below are optional
Operator = "operator"
},
SuppressAlerts = false
} },
MetricsExportConfig = new MetricsExportConfigProperty {
MqttTopic = "mqttTopic",
RoleArn = "roleArn"
},
SecurityProfileDescription = "securityProfileDescription",
SecurityProfileName = "securityProfileName",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TargetArns = new [] { "targetArns" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnSecurityProfileProps := &CfnSecurityProfileProps{
AdditionalMetricsToRetainV2: []interface{}{
&MetricToRetainProperty{
Metric: jsii.String("metric"),
// the properties below are optional
ExportMetric: jsii.Boolean(false),
MetricDimension: &MetricDimensionProperty{
DimensionName: jsii.String("dimensionName"),
// the properties below are optional
Operator: jsii.String("operator"),
},
},
},
AlertTargets: map[string]interface{}{
"alertTargetsKey": &AlertTargetProperty{
"alertTargetArn": jsii.String("alertTargetArn"),
"roleArn": jsii.String("roleArn"),
},
},
Behaviors: []interface{}{
&BehaviorProperty{
Name: jsii.String("name"),
// the properties below are optional
Criteria: &BehaviorCriteriaProperty{
ComparisonOperator: jsii.String("comparisonOperator"),
ConsecutiveDatapointsToAlarm: jsii.Number(123),
ConsecutiveDatapointsToClear: jsii.Number(123),
DurationSeconds: jsii.Number(123),
MlDetectionConfig: &MachineLearningDetectionConfigProperty{
ConfidenceLevel: jsii.String("confidenceLevel"),
},
StatisticalThreshold: &StatisticalThresholdProperty{
Statistic: jsii.String("statistic"),
},
Value: &MetricValueProperty{
Cidrs: []*string{
jsii.String("cidrs"),
},
Count: jsii.String("count"),
Number: jsii.Number(123),
Numbers: []interface{}{
jsii.Number(123),
},
Ports: []interface{}{
jsii.Number(123),
},
Strings: []*string{
jsii.String("strings"),
},
},
},
ExportMetric: jsii.Boolean(false),
Metric: jsii.String("metric"),
MetricDimension: &MetricDimensionProperty{
DimensionName: jsii.String("dimensionName"),
// the properties below are optional
Operator: jsii.String("operator"),
},
SuppressAlerts: jsii.Boolean(false),
},
},
MetricsExportConfig: &MetricsExportConfigProperty{
MqttTopic: jsii.String("mqttTopic"),
RoleArn: jsii.String("roleArn"),
},
SecurityProfileDescription: jsii.String("securityProfileDescription"),
SecurityProfileName: jsii.String("securityProfileName"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TargetArns: []*string{
jsii.String("targetArns"),
},
}
Properties
additionalMetricsToRetainV2optionalIResolvable | IResolvable | CfnSecurityProfile.additional_metrics_to_retain_v2optionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricToRetainProperty]]]additionalMetricsToRetainV2optionalIResolvableAdditionalMetricsToRetainV2optionalIResolvableAdditionalMetricsToRetainV2optionalinterface{} #A list of metrics whose data is retained (stored).
By default, data is retained for any metric used in the profile's behaviors , but it's also retained for any metric specified here. Can be used with custom metrics; can't be used with dimensions.
alertTargetsoptionalIResolvable | { [key: string]: IResolvable | CfnSecurityProfile.alert_targetsoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, AlertTargetProperty]]]alertTargetsoptionalIResolvableAlertTargetsoptionalIResolvableAlertTargetsoptionalinterface{} #Specifies the destinations to which alerts are sent.
(Alerts are always sent to the console.) Alerts are generated when a device (thing) violates a behavior.
behaviorsoptionalIResolvable | IResolvable | CfnSecurityProfile.behaviorsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, BehaviorProperty]]]behaviorsoptionalIResolvableBehaviorsoptionalIResolvableBehaviorsoptionalinterface{} #Specifies the behaviors that, when violated by a device (thing), cause an alert.
metricsExportConfigoptionalIResolvable | CfnSecurityProfile.metrics_export_configoptionaltyping.Union[IResolvable, MetricsExportConfigProperty]metricsExportConfigoptionalIResolvableMetricsExportConfigoptionalIResolvableMetricsExportConfigoptionalinterface{} #Specifies the MQTT topic and role ARN required for metric export.
securityProfileDescriptionoptionalstringsecurity_profile_descriptionoptionalstrsecurityProfileDescriptionoptionalStringSecurityProfileDescriptionoptionalstringSecurityProfileDescriptionoptional*string #A description of the security profile.
securityProfileNameoptionalstringsecurity_profile_nameoptionalstrsecurityProfileNameoptionalStringSecurityProfileNameoptionalstringSecurityProfileNameoptional*string #The name you gave to the security profile.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #Metadata that can be used to manage the security profile.
targetArnsoptionalstring[]target_arnsoptionaltyping.List[str]targetArnsoptionalList<String>TargetArnsoptionalstring[]TargetArnsoptional*[]*string #The ARN of the target (thing group) to which the security profile is attached.