Skip to content

get_action

get_action(
    id: ActionId, *, config_overrides: Optional[fisClientConfig] = None
) -> GetActionResponse

Gets information about the specified FIS action.

Parameters:

  • id (ActionId) –

    The ID of the action.

Raises:

Source code in docs_src/capo_fis/_services/fis.py
def get_action(
    self,
    id: "capo_fis.types.action_id.ActionId",
    *,
    config_overrides: Optional[fisClientConfig] = None,
) -> "capo_fis.types.get_action_response.GetActionResponse":
    """<p>Gets information about the specified FIS action.</p>

    Args:
        id: <p>The ID of the action.</p>

    Raises:
        capo_fis.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_fis.errors.validation_exception.ValidationException: <p>The specified input is not valid, or fails to satisfy the constraints for the request.</p>
        capo_fis.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fis.types.get_action_request.GetActionRequest]",
    ) -> OperationResponse["capo_fis.types.get_action_response.GetActionResponse"]:
        import capo_fis._operations.fault_injection_simulator.get_action

        output, http_response = (
            capo_fis._operations.fault_injection_simulator.get_action.get_action(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAction")
    )
    input_: capo_fis.types.get_action_request.GetActionRequest = {"id": id}

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output