update_bot
¶
update_bot(
network_id: NetworkId,
bot_id: BotId,
*,
config_overrides: Optional[WickrClientConfig] = None,
display_name: Optional[GenericString] = None,
group_id: Optional[GenericString] = None,
challenge: Optional[SensitiveString] = None,
suspend: Optional[bool] = None,
) -> UpdateBotResponse
Updates the properties of an existing bot in a Wickr network. This operation allows you to modify the bot's display name, security group, password, or suspension status.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network containing the bot to update.
-
bot_id(BotId) –The unique identifier of the bot to update.
-
display_name(Optional[GenericString], default:None) –The new display name for the bot.
-
group_id(Optional[GenericString], default:None) –The ID of the new security group to assign the bot to.
-
challenge(Optional[SensitiveString], default:None) –The new password for the bot account.
-
suspend(Optional[bool], default:None) –Set to true to suspend the bot or false to unsuspend it. Omit this field for standard updates that don't affect suspension status.
Raises:
-
BadRequestError–The request was invalid or malformed. This error occurs when the request parameters do not meet the API requirements, such as invalid field values, missing required parameters, or improperly formatted data.
-
ForbiddenError–Access to the requested resource is forbidden. This error occurs when the authenticated user does not have the necessary permissions to perform the requested operation, even though they are authenticated.
-
InternalServerError–An unexpected error occurred on the server while processing the request. This indicates a problem with the Wickr service itself rather than with the request. If this error persists, contact Amazon Web Services Support.
-
RateLimitError–The request was throttled because too many requests were sent in a short period of time. Wait a moment and retry the request. Consider implementing exponential backoff in your application.
-
ResourceNotFoundError–The requested resource could not be found. This error occurs when you try to access or modify a network, user, bot, security group, or other resource that doesn't exist or has been deleted.
-
UnauthorizedError–The request was not authenticated or the authentication credentials were invalid. This error occurs when the request lacks valid authentication credentials or the credentials have expired.
-
ValidationError–One or more fields in the request failed validation. This error provides detailed information about which fields were invalid and why, allowing you to correct the request and retry.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Update bot successfully
>>> client.update_bot(network_id='12345678', bot_id='98765', display_name='Updated Support Bot', group_id='support_group')
Update bot - bot not found
Source code in docs_src/capo_wickr/_services/wickr.py
3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 | |