Skip to content

describe_what_if_forecast async

describe_what_if_forecast(
    what_if_forecast_arn: LongArn,
    *,
    config_overrides: Optional[AsyncforecastClientConfig] = None,
) -> DescribeWhatIfForecastResponse

Describes the what-if forecast created using the CreateWhatIfForecast operation.

In addition to listing the properties provided in the CreateWhatIfForecast request, this operation lists the following properties:

  • CreationTime

  • LastModificationTime

  • Message - If an error occurred, information about the error.

  • Status

Parameters:

  • what_if_forecast_arn (LongArn) –

    The Amazon Resource Name (ARN) of the what-if forecast that you are interested in.

Raises:

  • InvalidInputException –

    We can't process the request because it includes an invalid value or a value that exceeds the valid range.

  • ResourceNotFoundException –

    We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_forecast/_services/async_forecast.py
async def describe_what_if_forecast(
    self,
    what_if_forecast_arn: "capo_forecast.types.long_arn.LongArn",
    *,
    config_overrides: Optional[AsyncforecastClientConfig] = None,
) -> "capo_forecast.types.describe_what_if_forecast_response.DescribeWhatIfForecastResponse":
    """<p>Describes the what-if forecast created using the <a>CreateWhatIfForecast</a> operation.</p> <p>In addition to listing the properties provided in the <code>CreateWhatIfForecast</code> request, this operation lists the following properties:</p> <ul> <li> <p> <code>CreationTime</code> </p> </li> <li> <p> <code>LastModificationTime</code> </p> </li> <li> <p> <code>Message</code> - If an error occurred, information about the error.</p> </li> <li> <p> <code>Status</code> </p> </li> </ul>

    Args:
        what_if_forecast_arn: <p>The Amazon Resource Name (ARN) of the what-if forecast that you are interested in.</p>

    Raises:
        capo_forecast.errors.invalid_input_exception.InvalidInputException: <p>We can't process the request because it includes an invalid value or a value that exceeds the valid range.</p>
        capo_forecast.errors.resource_not_found_exception.ResourceNotFoundException: <p>We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.</p>
        capo_forecast.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_forecast.types.describe_what_if_forecast_request.DescribeWhatIfForecastRequest]",
    ) -> AsyncOperationResponse[
        "capo_forecast.types.describe_what_if_forecast_response.DescribeWhatIfForecastResponse"
    ]:
        import capo_forecast._operations.amazon_forecast.describe_what_if_forecast

        (
            output,
            http_response,
        ) = await capo_forecast._operations.amazon_forecast.describe_what_if_forecast.async_describe_what_if_forecast(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeWhatIfForecast")
    )
    input_: capo_forecast.types.describe_what_if_forecast_request.DescribeWhatIfForecastRequest = {
        "what_if_forecast_arn": what_if_forecast_arn
    }

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