Skip to content

get_custom_action async

get_custom_action(
    custom_action_arn: CustomActionArn,
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
) -> GetCustomActionResult

Returns a custom action.

Parameters:

  • custom_action_arn (CustomActionArn) –

    Returns the fully defined Amazon Resource Name (ARN) of the custom action.

Raises:

Examples:

Get a custom action

>>> await client.get_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 get_custom_action(
    self,
    custom_action_arn: "capo_chatbot.types.custom_action_arn.CustomActionArn",
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
) -> "capo_chatbot.types.get_custom_action_result.GetCustomActionResult":
    """<p>Returns a custom action.</p>

    Args:
        custom_action_arn: <p>Returns the fully defined Amazon Resource Name (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:
        Get a custom action

        >>> await client.get_custom_action(custom_action_arn='arn:aws:chatbot::1234567890:custom-action/my-custom-action')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_chatbot.types.get_custom_action_request.GetCustomActionRequest]",
    ) -> AsyncOperationResponse[
        "capo_chatbot.types.get_custom_action_result.GetCustomActionResult"
    ]:
        import capo_chatbot._operations.wheatley_orchestration_20171011.get_custom_action

        (
            output,
            http_response,
        ) = await capo_chatbot._operations.wheatley_orchestration_20171011.get_custom_action.async_get_custom_action(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetCustomAction")
    )
    input_: capo_chatbot.types.get_custom_action_request.GetCustomActionRequest = {
        "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