update_custom_action
¶
update_custom_action(
custom_action_arn: CustomActionArn,
definition: CustomActionDefinition,
*,
config_overrides: Optional[chatbotClientConfig] = None,
alias_name: Optional[CustomActionAliasName] = None,
attachments: Optional[CustomActionAttachmentList] = None,
) -> UpdateCustomActionResult
Updates a custom action.
Parameters:
-
custom_action_arn(CustomActionArn) –The fully defined Amazon Resource Name (ARN) of the custom action.
-
definition(CustomActionDefinition) –The definition of the command to run when invoked as an alias or as an action button.
-
alias_name(Optional[CustomActionAliasName], default:None) –The name used to invoke this action in the chat channel. For example,
@aws run my-alias. -
attachments(Optional[CustomActionAttachmentList], default:None) –Defines when this custom action button should be attached to a notification.
Raises:
-
InternalServiceError–Unexpected error during processing of request.
-
InvalidRequestException–Your request input doesn't meet the constraints required by AWS Chatbot.
-
ResourceNotFoundException–We were unable to find the resource for your request
-
UnauthorizedException–The request was rejected because it doesn't have valid credentials for the target resource.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Update the command definition of an existing action Updates the command text of a custom action without altering the existing alias name or attachment criteria
>>> client.update_custom_action(custom_action_arn='arn:aws:chatbot::1234567890:custom-action/my-custom-action', definition={'CommandText': 'lambda invoke MyNewFunction'})
Source code in docs_src/capo_chatbot/_services/chatbot.py
2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 | |