@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:15.948Z") public class CfnSecurityProfile extends CfnResource implements IInspectable
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 .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()) .metric("metric") .metricDimension(MetricDimensionProperty.builder() .dimensionName("dimensionName") // the properties below are optional .operator("operator") .build()) .suppressAlerts(false) .build())) .securityProfileDescription("securityProfileDescription") .securityProfileName("securityProfileName") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .targetArns(List.of("targetArns")) .build();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnSecurityProfile.AlertTargetProperty
A structure containing the alert target ARN and the role ARN.
|
static interface |
CfnSecurityProfile.BehaviorCriteriaProperty
The criteria by which the behavior is determined to be normal.
|
static interface |
CfnSecurityProfile.BehaviorProperty
A Device Defender security profile behavior.
|
static class |
CfnSecurityProfile.Builder
A fluent builder for
CfnSecurityProfile . |
static interface |
CfnSecurityProfile.MachineLearningDetectionConfigProperty
The `MachineLearningDetectionConfig` property type controls confidence of the machine learning model.
|
static interface |
CfnSecurityProfile.MetricDimensionProperty
The dimension of the metric.
|
static interface |
CfnSecurityProfile.MetricToRetainProperty
The metric you want to retain.
|
static interface |
CfnSecurityProfile.MetricValueProperty
The value to be compared with the `metric` .
|
static interface |
CfnSecurityProfile.StatisticalThresholdProperty
A statistical ranking (percentile) that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnSecurityProfile(Construct scope,
java.lang.String id)
Create a new `AWS::IoT::SecurityProfile`.
|
|
CfnSecurityProfile(Construct scope,
java.lang.String id,
CfnSecurityProfileProps props)
Create a new `AWS::IoT::SecurityProfile`.
|
protected |
CfnSecurityProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnSecurityProfile(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAdditionalMetricsToRetainV2()
A list of metrics whose data is retained (stored).
|
java.lang.Object |
getAlertTargets()
Specifies the destinations to which alerts are sent.
|
java.lang.String |
getAttrSecurityProfileArn()
The Amazon Resource Name (ARN) of the security profile.
|
java.lang.Object |
getBehaviors()
Specifies the behaviors that, when violated by a device (thing), cause an alert.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getSecurityProfileDescription()
A description of the security profile.
|
java.lang.String |
getSecurityProfileName()
The name you gave to the security profile.
|
TagManager |
getTags()
Metadata that can be used to manage the security profile.
|
java.util.List<java.lang.String> |
getTargetArns()
The ARN of the target (thing group) to which the security profile is attached.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAdditionalMetricsToRetainV2(IResolvable value)
A list of metrics whose data is retained (stored).
|
void |
setAdditionalMetricsToRetainV2(java.util.List<java.lang.Object> value)
A list of metrics whose data is retained (stored).
|
void |
setAlertTargets(IResolvable value)
Specifies the destinations to which alerts are sent.
|
void |
setAlertTargets(java.util.Map<java.lang.String,java.lang.Object> value)
Specifies the destinations to which alerts are sent.
|
void |
setBehaviors(IResolvable value)
Specifies the behaviors that, when violated by a device (thing), cause an alert.
|
void |
setBehaviors(java.util.List<java.lang.Object> value)
Specifies the behaviors that, when violated by a device (thing), cause an alert.
|
void |
setSecurityProfileDescription(java.lang.String value)
A description of the security profile.
|
void |
setSecurityProfileName(java.lang.String value)
The name you gave to the security profile.
|
void |
setTargetArns(java.util.List<java.lang.String> value)
The ARN of the target (thing group) to which the security profile is attached.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnSecurityProfile(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSecurityProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnSecurityProfile(Construct scope, java.lang.String id, CfnSecurityProfileProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties.public CfnSecurityProfile(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrSecurityProfileArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Object getAdditionalMetricsToRetainV2()
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.
public void setAdditionalMetricsToRetainV2(IResolvable value)
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.
public void setAdditionalMetricsToRetainV2(java.util.List<java.lang.Object> value)
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.
public java.lang.Object getAlertTargets()
(Alerts are always sent to the console.) Alerts are generated when a device (thing) violates a behavior.
public void setAlertTargets(IResolvable value)
(Alerts are always sent to the console.) Alerts are generated when a device (thing) violates a behavior.
public void setAlertTargets(java.util.Map<java.lang.String,java.lang.Object> value)
(Alerts are always sent to the console.) Alerts are generated when a device (thing) violates a behavior.
public java.lang.Object getBehaviors()
public void setBehaviors(IResolvable value)
public void setBehaviors(java.util.List<java.lang.Object> value)
public java.lang.String getSecurityProfileDescription()
public void setSecurityProfileDescription(java.lang.String value)
public java.lang.String getSecurityProfileName()
public void setSecurityProfileName(java.lang.String value)
public java.util.List<java.lang.String> getTargetArns()
public void setTargetArns(java.util.List<java.lang.String> value)