Skip to content

reset_notification_settings

reset_notification_settings(
    trust_anchor_id: Uuid,
    notification_setting_keys: NotificationSettingKeys,
    *,
    config_overrides: Optional[RolesAnywhereClientConfig] = None,
) -> ResetNotificationSettingsResponse

Resets the custom notification setting to IAM Roles Anywhere default setting.

Required permissions: rolesanywhere:ResetNotificationSettings.

Parameters:

  • trust_anchor_id (Uuid) –

    The unique identifier of the trust anchor.

  • notification_setting_keys (NotificationSettingKeys) –

    A list of notification setting keys to reset. A notification setting key includes the event and the channel.

Raises:

Examples:

ResetNotificationSettings - Resets to IAM Roles Anywhere defined default notification settings

>>> client.reset_notification_settings(trust_anchor_id='c2505e61-2fc1-4a18-9fcf-94e18a22928b', notification_setting_keys=[{'event': 'END_ENTITY_CERTIFICATE_EXPIRY'}])
Source code in docs_src/capo_rolesanywhere/_services/roles_anywhere.py
def reset_notification_settings(
    self,
    trust_anchor_id: "capo_rolesanywhere.types.uuid.Uuid",
    notification_setting_keys: "capo_rolesanywhere.types.notification_setting_keys.NotificationSettingKeys",
    *,
    config_overrides: Optional[RolesAnywhereClientConfig] = None,
) -> "capo_rolesanywhere.types.reset_notification_settings_response.ResetNotificationSettingsResponse":
    """<p>Resets the <i>custom notification setting</i> to IAM Roles Anywhere default setting. </p> <p> <b>Required permissions: </b> <code>rolesanywhere:ResetNotificationSettings</code>. </p>

    Args:
        trust_anchor_id: <p>The unique identifier of the trust anchor.</p>
        notification_setting_keys: <p>A list of notification setting keys to reset. A notification setting key includes the event and the channel. </p>

    Raises:
        capo_rolesanywhere.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_rolesanywhere.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_rolesanywhere.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
        capo_rolesanywhere.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        ResetNotificationSettings - Resets to IAM Roles Anywhere defined default notification settings

        >>> client.reset_notification_settings(trust_anchor_id='c2505e61-2fc1-4a18-9fcf-94e18a22928b', notification_setting_keys=[{'event': 'END_ENTITY_CERTIFICATE_EXPIRY'}])
    """

    def _handler(
        req: "OperationRequest[capo_rolesanywhere.types.reset_notification_settings_request.ResetNotificationSettingsRequest]",
    ) -> OperationResponse[
        "capo_rolesanywhere.types.reset_notification_settings_response.ResetNotificationSettingsResponse"
    ]:
        import capo_rolesanywhere._operations.roles_anywhere.reset_notification_settings

        output, http_response = (
            capo_rolesanywhere._operations.roles_anywhere.reset_notification_settings.reset_notification_settings(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ResetNotificationSettings")
    )
    input_: capo_rolesanywhere.types.reset_notification_settings_request.ResetNotificationSettingsRequest = {
        "trust_anchor_id": trust_anchor_id,
        "notification_setting_keys": notification_setting_keys,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output