update_bot
async
¶
update_bot(
network_id: NetworkId,
bot_id: BotId,
*,
config_overrides: Optional[AsyncWickrClientConfig] = 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
>>> await 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/async_wickr.py
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 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 | |