Attaches a list of notification settings to a trust anchor.
A notification setting includes information such as event name, threshold, status of the notification setting, and the channel to notify.
Required permissions: rolesanywhere:PutNotificationSettings.
Parameters:
-
trust_anchor_id
(Uuid)
–
The unique identifier of the trust anchor.
-
notification_settings
(NotificationSettings)
–
A list of notification settings to be associated to the trust anchor.
Raises:
Examples:
PutNotificationSettings - Adds custom notification settings
>>> await client.put_notification_settings(trust_anchor_id='c2505e61-2fc1-4a18-9fcf-94e18a22928b', notification_settings=[{'event': 'END_ENTITY_CERTIFICATE_EXPIRY', 'enabled': True, 'threshold': 10}])
Source code in docs_src/capo_rolesanywhere/_services/async_roles_anywhere.py
| async def put_notification_settings(
self,
trust_anchor_id: "capo_rolesanywhere.types.uuid.Uuid",
notification_settings: "capo_rolesanywhere.types.notification_settings.NotificationSettings",
*,
config_overrides: Optional[AsyncRolesAnywhereClientConfig] = None,
) -> "capo_rolesanywhere.types.put_notification_settings_response.PutNotificationSettingsResponse":
"""<p>Attaches a list of <i>notification settings</i> to a trust anchor.</p> <p>A notification setting includes information such as event name, threshold, status of the notification setting, and the channel to notify.</p> <p> <b>Required permissions: </b> <code>rolesanywhere:PutNotificationSettings</code>. </p>
Args:
trust_anchor_id: <p>The unique identifier of the trust anchor.</p>
notification_settings: <p>A list of notification settings to be associated to the trust anchor.</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:
PutNotificationSettings - Adds custom notification settings
>>> await client.put_notification_settings(trust_anchor_id='c2505e61-2fc1-4a18-9fcf-94e18a22928b', notification_settings=[{'event': 'END_ENTITY_CERTIFICATE_EXPIRY', 'enabled': True, 'threshold': 10}])
"""
async def _handler(
req: "AsyncOperationRequest[capo_rolesanywhere.types.put_notification_settings_request.PutNotificationSettingsRequest]",
) -> AsyncOperationResponse[
"capo_rolesanywhere.types.put_notification_settings_response.PutNotificationSettingsResponse"
]:
import capo_rolesanywhere._operations.roles_anywhere.put_notification_settings
(
output,
http_response,
) = await capo_rolesanywhere._operations.roles_anywhere.put_notification_settings.async_put_notification_settings(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutNotificationSettings")
)
input_: capo_rolesanywhere.types.put_notification_settings_request.PutNotificationSettingsRequest = {
"trust_anchor_id": trust_anchor_id,
"notification_settings": notification_settings,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|