update_security_profile
¶
update_security_profile(
security_profile_name: SecurityProfileName,
*,
config_overrides: Optional[IoTClientConfig] = None,
security_profile_description: Optional[SecurityProfileDescription] = None,
behaviors: Optional[Behaviors] = None,
alert_targets: Optional[AlertTargets] = None,
additional_metrics_to_retain: Optional[AdditionalMetricsToRetainList] = None,
additional_metrics_to_retain_v2: Optional[AdditionalMetricsToRetainV2List] = None,
delete_behaviors: Optional[DeleteBehaviors] = None,
delete_alert_targets: Optional[DeleteAlertTargets] = None,
delete_additional_metrics_to_retain: Optional[
DeleteAdditionalMetricsToRetain
] = None,
expected_version: Optional[OptionalVersion] = None,
metrics_export_config: Optional[MetricsExportConfig] = None,
delete_metrics_export_config: Optional[DeleteMetricsExportConfig] = None,
) -> UpdateSecurityProfileResponse
The IoT Device Defender detect feature will no longer be available to new customers starting August 31, 2026. If you would like to use the detect feature, sign up prior to August 31, 2026. To learn about alternatives to IoT Device Defender detect, see IoT Device Defender detect feature availability change in the IoT Device Defender Developer Guide. There is no change to IoT Device Defender audit availability.
Updates a Device Defender security profile.
Requires permission to access the UpdateSecurityProfile action.
Parameters:
-
security_profile_name(SecurityProfileName) –The name of the security profile you want to update.
-
security_profile_description(Optional[SecurityProfileDescription], default:None) –A description of the security profile.
-
behaviors(Optional[Behaviors], default:None) –Specifies the behaviors that, when violated by a device (thing), cause an alert.
-
alert_targets(Optional[AlertTargets], default:None) –Where the alerts are sent. (Alerts are always sent to the console.)
-
additional_metrics_to_retain(Optional[AdditionalMetricsToRetainList], default:None) –Please use UpdateSecurityProfileRequest$additionalMetricsToRetainV2 instead.
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 is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions. -
additional_metrics_to_retain_v2(Optional[AdditionalMetricsToRetainV2List], default:None) –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 is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
-
delete_behaviors(Optional[DeleteBehaviors], default:None) –If true, delete all
behaviorsdefined for this security profile. If anybehaviorsare defined in the current invocation, an exception occurs. -
delete_alert_targets(Optional[DeleteAlertTargets], default:None) –If true, delete all
alertTargetsdefined for this security profile. If anyalertTargetsare defined in the current invocation, an exception occurs. -
delete_additional_metrics_to_retain(Optional[DeleteAdditionalMetricsToRetain], default:None) –If true, delete all
additionalMetricsToRetaindefined for this security profile. If anyadditionalMetricsToRetainare defined in the current invocation, an exception occurs. -
expected_version(Optional[OptionalVersion], default:None) –The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a
VersionConflictExceptionis thrown. -
metrics_export_config(Optional[MetricsExportConfig], default:None) –Specifies the MQTT topic and role ARN required for metric export.
-
delete_metrics_export_config(Optional[DeleteMetricsExportConfig], default:None) –Set the value as true to delete metrics export related configurations.
Raises:
-
InternalFailureException–An unexpected error has occurred.
-
InvalidRequestException–The request is not valid.
-
ResourceNotFoundException–The specified resource does not exist.
-
ThrottlingException–The rate exceeds the limit.
-
VersionConflictException–An exception thrown when the version of an entity specified with the
expectedVersionparameter does not match the latest version in the system. -
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iot/_services/io_t.py
18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 18455 18456 18457 18458 18459 18460 18461 18462 18463 18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 | |