update_custom_action
async
¶
update_custom_action(
custom_action_arn: CustomActionArn,
definition: CustomActionDefinition,
*,
config_overrides: Optional[AsyncchatbotClientConfig] = 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
>>> await 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/async_chatbot.py
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 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 | |