Skip to content

get_automation_event async

get_automation_event(
    event_id: EventId,
    *,
    config_overrides: Optional[AsyncComputeOptimizerAutomationClientConfig] = None,
) -> GetAutomationEventResponse

Retrieves details about a specific automation event.

Parameters:

  • event_id (EventId) –

    The ID of the automation event to retrieve.

Raises:

Source code in docs_src/capo_compute_optimizer_automation/_services/async_compute_optimizer_automation.py
async def get_automation_event(
    self,
    event_id: "capo_compute_optimizer_automation.types.event_id.EventId",
    *,
    config_overrides: Optional[AsyncComputeOptimizerAutomationClientConfig] = None,
) -> "capo_compute_optimizer_automation.types.get_automation_event_response.GetAutomationEventResponse":
    """<p> Retrieves details about a specific automation event. </p>

    Args:
        event_id: <p> The ID of the automation event to retrieve. </p>

    Raises:
        capo_compute_optimizer_automation.errors.access_denied_exception.AccessDeniedException: <p> You do not have sufficient permissions to perform this action. </p>
        capo_compute_optimizer_automation.errors.forbidden_exception.ForbiddenException: <p> You are not authorized to perform this action. </p>
        capo_compute_optimizer_automation.errors.internal_server_exception.InternalServerException: <p> An internal error occurred while processing the request. </p>
        capo_compute_optimizer_automation.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p> One or more parameter values are not valid. </p>
        capo_compute_optimizer_automation.errors.opt_in_required_exception.OptInRequiredException: <p> The account must be opted in to Compute Optimizer Automation before performing this action. </p>
        capo_compute_optimizer_automation.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified resource was not found. </p>
        capo_compute_optimizer_automation.errors.service_unavailable_exception.ServiceUnavailableException: <p> The service is temporarily unavailable. </p>
        capo_compute_optimizer_automation.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
        capo_compute_optimizer_automation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_compute_optimizer_automation.types.get_automation_event_request.GetAutomationEventRequest]",
    ) -> AsyncOperationResponse[
        "capo_compute_optimizer_automation.types.get_automation_event_response.GetAutomationEventResponse"
    ]:
        import capo_compute_optimizer_automation._operations.compute_optimizer_automation_service.get_automation_event

        (
            output,
            http_response,
        ) = await capo_compute_optimizer_automation._operations.compute_optimizer_automation_service.get_automation_event.async_get_automation_event(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAutomationEvent")
    )
    input_: capo_compute_optimizer_automation.types.get_automation_event_request.GetAutomationEventRequest = {
        "event_id": event_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output