list_what_if_analyses

ForecastService.Client.list_what_if_analyses(**kwargs)

Returns a list of what-if analyses created using the CreateWhatIfAnalysis operation. For each what-if analysis, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the what-if analysis ARN with the DescribeWhatIfAnalysis operation.

See also: AWS API Documentation

Request Syntax

response = client.list_what_if_analyses(
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Key': 'string',
            'Value': 'string',
            'Condition': 'IS'|'IS_NOT'
        },
    ]
)
Parameters
  • NextToken (string) -- If the result of the previous request was truncated, the response includes a NextToken . To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
  • MaxResults (integer) -- The number of items to return in the response.
  • Filters (list) --

    An array of filters. For each filter, you provide a condition and a match statement. The condition is either IS or IS_NOT , which specifies whether to include or exclude the what-if analysis jobs that match the statement from the list, respectively. The match statement consists of a key and a value.

    Filter properties
    • Condition - The condition to apply. Valid values are IS and IS_NOT . To include the what-if analysis jobs that match the statement, specify IS . To exclude matching what-if analysis jobs, specify IS_NOT .
    • Key - The name of the parameter to filter on. Valid values are WhatIfAnalysisArn and Status .
    • Value - The value to match.

    For example, to list all jobs that export a forecast named electricityWhatIf , specify the following filter:

    "Filters": [ { "Condition": "IS", "Key": "WhatIfAnalysisArn", "Value": "arn:aws:forecast:us-west-2:<acct-id>:forecast/electricityWhatIf" } ]
    • (dict) --

      Describes a filter for choosing a subset of objects. Each filter consists of a condition and a match statement. The condition is either IS or IS_NOT , which specifies whether to include or exclude the objects that match the statement, respectively. The match statement consists of a key and a value.

      • Key (string) -- [REQUIRED]

        The name of the parameter to filter on.

      • Value (string) -- [REQUIRED]

        The value to match.

      • Condition (string) -- [REQUIRED]

        The condition to apply. To include the objects that match the statement, specify IS . To exclude matching objects, specify IS_NOT .

Return type

dict

Returns

Response Syntax

{
    'WhatIfAnalyses': [
        {
            'WhatIfAnalysisArn': 'string',
            'WhatIfAnalysisName': 'string',
            'ForecastArn': 'string',
            'Status': 'string',
            'Message': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'LastModificationTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • WhatIfAnalyses (list) --

      An array of WhatIfAnalysisSummary objects that describe the matched analyses.

      • (dict) --

        Provides a summary of the what-if analysis properties used in the ListWhatIfAnalyses operation. To get the complete set of properties, call the DescribeWhatIfAnalysis operation, and provide the WhatIfAnalysisArn that is listed in the summary.

        • WhatIfAnalysisArn (string) --

          The Amazon Resource Name (ARN) of the what-if analysis.

        • WhatIfAnalysisName (string) --

          The name of the what-if analysis.

        • ForecastArn (string) --

          The Amazon Resource Name (ARN) of the baseline forecast that is being used in this what-if analysis.

        • Status (string) --

          The status of the what-if analysis. States include:

          • ACTIVE
          • CREATE_PENDING , CREATE_IN_PROGRESS , CREATE_FAILED
          • CREATE_STOPPING , CREATE_STOPPED
          • DELETE_PENDING , DELETE_IN_PROGRESS , DELETE_FAILED

          Note

          The Status of the what-if analysis must be ACTIVE before you can access the analysis.

        • Message (string) --

          If an error occurred, an informational message about the error.

        • CreationTime (datetime) --

          When the what-if analysis was created.

        • LastModificationTime (datetime) --

          The last time the resource was modified. The timestamp depends on the status of the job:

          • CREATE_PENDING - The CreationTime .
          • CREATE_IN_PROGRESS - The current timestamp.
          • CREATE_STOPPING - The current timestamp.
          • CREATE_STOPPED - When the job stopped.
          • ACTIVE or CREATE_FAILED - When the job finished or failed.
    • NextToken (string) --

      If the response is truncated, Forecast returns this token. To retrieve the next set of results, use the token in the next request.

Exceptions

  • ForecastService.Client.exceptions.InvalidNextTokenException
  • ForecastService.Client.exceptions.InvalidInputException