update_security_profile
async
¶
update_security_profile(
security_profile_name: SecurityProfileName,
*,
config_overrides: Optional[AsyncIoTClientConfig] = 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/async_io_t.py
18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 | |