Class CfnSecurityProfile

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:44.635Z") @Stability(Stable) public class CfnSecurityProfile extends CfnResource implements IInspectable, 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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrSecurityProfileArn

      @Stability(Stable) @NotNull public String getAttrSecurityProfileArn()
      The Amazon Resource Name (ARN) of the security profile.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getAdditionalMetricsToRetainV2

      @Stability(Stable) @Nullable public Object getAdditionalMetricsToRetainV2()
      A list of metrics whose data is retained (stored).
    • setAdditionalMetricsToRetainV2

      @Stability(Stable) public void setAdditionalMetricsToRetainV2(@Nullable IResolvable value)
      A list of metrics whose data is retained (stored).
    • setAdditionalMetricsToRetainV2

      @Stability(Stable) public void setAdditionalMetricsToRetainV2(@Nullable List<Object> value)
      A list of metrics whose data is retained (stored).
    • getAlertTargets

      @Stability(Stable) @Nullable public Object getAlertTargets()
      Specifies the destinations to which alerts are sent.
    • setAlertTargets

      @Stability(Stable) public void setAlertTargets(@Nullable IResolvable value)
      Specifies the destinations to which alerts are sent.
    • setAlertTargets

      @Stability(Stable) public void setAlertTargets(@Nullable Map<String,Object> value)
      Specifies the destinations to which alerts are sent.
    • getBehaviors

      @Stability(Stable) @Nullable public Object getBehaviors()
      Specifies the behaviors that, when violated by a device (thing), cause an alert.
    • setBehaviors

      @Stability(Stable) public void setBehaviors(@Nullable IResolvable value)
      Specifies the behaviors that, when violated by a device (thing), cause an alert.
    • setBehaviors

      @Stability(Stable) public void setBehaviors(@Nullable List<Object> value)
      Specifies the behaviors that, when violated by a device (thing), cause an alert.
    • getMetricsExportConfig

      @Stability(Stable) @Nullable public Object getMetricsExportConfig()
      Specifies the MQTT topic and role ARN required for metric export.
    • setMetricsExportConfig

      @Stability(Stable) public void setMetricsExportConfig(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public String getSecurityProfileDescription()
      A description of the security profile.
    • setSecurityProfileDescription

      @Stability(Stable) public void setSecurityProfileDescription(@Nullable String value)
      A description of the security profile.
    • getSecurityProfileName

      @Stability(Stable) @Nullable public String getSecurityProfileName()
      The name you gave to the security profile.
    • setSecurityProfileName

      @Stability(Stable) public void setSecurityProfileName(@Nullable String value)
      The name you gave to the security profile.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Metadata that can be used to manage the security profile.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Metadata that can be used to manage the security profile.
    • getTargetArns

      @Stability(Stable) @Nullable public List<String> getTargetArns()
      The ARN of the target (thing group) to which the security profile is attached.
    • setTargetArns

      @Stability(Stable) public void setTargetArns(@Nullable List<String> value)
      The ARN of the target (thing group) to which the security profile is attached.