Class CfnSecurityProfile
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.iot.CfnSecurityProfile
- All Implemented Interfaces:
IInspectable,ITaggable,ISecurityProfileRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:40.114Z")
@Stability(Stable)
public class CfnSecurityProfile
extends CfnResource
implements IInspectable, ISecurityProfileRef, ITaggable
Use the
AWS::IoT::SecurityProfile resource to create a Device Defender security profile.
For API reference, see CreateSecurityProfile and for general information, see Detect .
Example:
// 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.*;
CfnSecurityProfile cfnSecurityProfile = CfnSecurityProfile.Builder.create(this, "MyCfnSecurityProfile")
.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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA structure containing the alert target ARN and the role ARN.static interfaceThe criteria by which the behavior is determined to be normal.static interfaceA Device Defender security profile behavior.static final classA fluent builder forCfnSecurityProfile.static interfaceTheMachineLearningDetectionConfigproperty type controls confidence of the machine learning model.static interfaceThe dimension of the metric.static interfaceSpecifies the MQTT topic and role ARN required for metric export.static interfaceThe metric you want to retain.static interfaceThe value to be compared with themetric.static interfaceA statistical ranking (percentile) that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.iot.ISecurityProfileRef
ISecurityProfileRef.Jsii$Default, ISecurityProfileRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnSecurityProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnSecurityProfile(software.amazon.jsii.JsiiObjectRef objRef) CfnSecurityProfile(software.constructs.Construct scope, String id) CfnSecurityProfile(software.constructs.Construct scope, String id, CfnSecurityProfileProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic ISecurityProfileReffromSecurityProfileArn(software.constructs.Construct scope, String id, String arn) Creates a new ISecurityProfileRef from an ARN.static ISecurityProfileReffromSecurityProfileName(software.constructs.Construct scope, String id, String securityProfileName) Creates a new ISecurityProfileRef from a securityProfileName.A list of metrics whose data is retained (stored).Specifies the destinations to which alerts are sent.The Amazon Resource Name (ARN) of the security profile.Specifies the behaviors that, when violated by a device (thing), cause an alert.Specifies the MQTT topic and role ARN required for metric export.A description of the security profile.The name you gave to the security profile.A reference to a SecurityProfile resource.getTags()Tag Manager which manages the tags for this resource.Metadata that can be used to manage the security profile.The ARN of the target (thing group) to which the security profile is attached.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAdditionalMetricsToRetainV2(List<Object> value) A list of metrics whose data is retained (stored).voidA list of metrics whose data is retained (stored).voidsetAlertTargets(Map<String, Object> value) Specifies the destinations to which alerts are sent.voidsetAlertTargets(IResolvable value) Specifies the destinations to which alerts are sent.voidsetBehaviors(List<Object> value) Specifies the behaviors that, when violated by a device (thing), cause an alert.voidsetBehaviors(IResolvable value) Specifies the behaviors that, when violated by a device (thing), cause an alert.voidSpecifies the MQTT topic and role ARN required for metric export.voidSpecifies the MQTT topic and role ARN required for metric export.voidA description of the security profile.voidsetSecurityProfileName(String value) The name you gave to the security profile.voidsetTagsRaw(List<CfnTag> value) Metadata that can be used to manage the security profile.voidsetTargetArns(List<String> value) The ARN of the target (thing group) to which the security profile is attached.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnSecurityProfile
protected CfnSecurityProfile(software.amazon.jsii.JsiiObjectRef objRef) -
CfnSecurityProfile
protected CfnSecurityProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnSecurityProfile
@Stability(Stable) public CfnSecurityProfile(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnSecurityProfileProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
-
CfnSecurityProfile
@Stability(Stable) public CfnSecurityProfile(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
fromSecurityProfileArn
@Stability(Stable) @NotNull public static ISecurityProfileRef fromSecurityProfileArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new ISecurityProfileRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromSecurityProfileName
@Stability(Stable) @NotNull public static ISecurityProfileRef fromSecurityProfileName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String securityProfileName) Creates a new ISecurityProfileRef from a securityProfileName.- Parameters:
scope- This parameter is required.id- This parameter is required.securityProfileName- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrSecurityProfileArn
The Amazon Resource Name (ARN) of the security profile. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getSecurityProfileRef
A reference to a SecurityProfile resource.- Specified by:
getSecurityProfileRefin interfaceISecurityProfileRef
-
getTags
Tag Manager which manages the tags for this resource. -
getAdditionalMetricsToRetainV2
A list of metrics whose data is retained (stored).Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnSecurityProfile.MetricToRetainProperty> -
setAdditionalMetricsToRetainV2
A list of metrics whose data is retained (stored). -
setAdditionalMetricsToRetainV2
A list of metrics whose data is retained (stored). -
getAlertTargets
Specifies the destinations to which alerts are sent.Returns union: either
IResolvableor Mapinvalid input: '<'String, eitherIResolvableorCfnSecurityProfile.AlertTargetProperty> -
setAlertTargets
Specifies the destinations to which alerts are sent. -
setAlertTargets
Specifies the destinations to which alerts are sent. -
getBehaviors
Specifies the behaviors that, when violated by a device (thing), cause an alert.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnSecurityProfile.BehaviorProperty> -
setBehaviors
Specifies the behaviors that, when violated by a device (thing), cause an alert. -
setBehaviors
Specifies the behaviors that, when violated by a device (thing), cause an alert. -
getMetricsExportConfig
Specifies the MQTT topic and role ARN required for metric export.Returns union: either
IResolvableorCfnSecurityProfile.MetricsExportConfigProperty -
setMetricsExportConfig
Specifies the MQTT topic and role ARN required for metric export. -
setMetricsExportConfig
@Stability(Stable) public void setMetricsExportConfig(@Nullable CfnSecurityProfile.MetricsExportConfigProperty value) Specifies the MQTT topic and role ARN required for metric export. -
getSecurityProfileDescription
A description of the security profile. -
setSecurityProfileDescription
A description of the security profile. -
getSecurityProfileName
The name you gave to the security profile. -
setSecurityProfileName
The name you gave to the security profile. -
getTagsRaw
Metadata that can be used to manage the security profile. -
setTagsRaw
Metadata that can be used to manage the security profile. -
getTargetArns
The ARN of the target (thing group) to which the security profile is attached. -
setTargetArns
The ARN of the target (thing group) to which the security profile is attached.
-