Deletes a custom action.
Parameters:
-
custom_action_arn
(CustomActionArn)
–
The fully defined ARN of the custom action.
Raises:
Examples:
Delete a custom action
>>> await client.delete_custom_action(custom_action_arn='arn:aws:chatbot::1234567890:custom-action/my-custom-action')
Source code in docs_src/capo_chatbot/_services/async_chatbot.py
| async def delete_custom_action(
self,
custom_action_arn: "capo_chatbot.types.custom_action_arn.CustomActionArn",
*,
config_overrides: Optional[AsyncchatbotClientConfig] = None,
) -> "capo_chatbot.types.delete_custom_action_result.DeleteCustomActionResult":
"""<p>Deletes a custom action.</p>
Args:
custom_action_arn: <p>The fully defined ARN of the custom action.</p>
Raises:
capo_chatbot.errors.internal_service_error.InternalServiceError: <p>Unexpected error during processing of request.</p>
capo_chatbot.errors.invalid_request_exception.InvalidRequestException: <p>Your request input doesn't meet the constraints required by AWS Chatbot.</p>
capo_chatbot.errors.resource_not_found_exception.ResourceNotFoundException: <p>We were unable to find the resource for your request</p>
capo_chatbot.errors.unauthorized_exception.UnauthorizedException: <p>The request was rejected because it doesn't have valid credentials for the target resource.</p>
capo_chatbot.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Delete a custom action
>>> await client.delete_custom_action(custom_action_arn='arn:aws:chatbot::1234567890:custom-action/my-custom-action')
"""
async def _handler(
req: "AsyncOperationRequest[capo_chatbot.types.delete_custom_action_request.DeleteCustomActionRequest]",
) -> AsyncOperationResponse[
"capo_chatbot.types.delete_custom_action_result.DeleteCustomActionResult"
]:
import capo_chatbot._operations.wheatley_orchestration_20171011.delete_custom_action
(
output,
http_response,
) = await capo_chatbot._operations.wheatley_orchestration_20171011.delete_custom_action.async_delete_custom_action(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteCustomAction")
)
input_: capo_chatbot.types.delete_custom_action_request.DeleteCustomActionRequest = {
"custom_action_arn": custom_action_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|