DeadlineCloud / Client / get_sessions_statistics_aggregation

get_sessions_statistics_aggregation#

DeadlineCloud.Client.get_sessions_statistics_aggregation(**kwargs)#

Gets a set of statistics for queues or farms. Before you can call the GetSessionStatisticsAggregation operation, you must first call the StartSessionsStatisticsAggregation operation. Statistics are available for 1 hour after you call the StartSessionsStatisticsAggregation operation.

See also: AWS API Documentation

Request Syntax

response = client.get_sessions_statistics_aggregation(
    farmId='string',
    aggregationId='string',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • farmId (string) –

    [REQUIRED]

    The identifier of the farm to include in the statistics. This should be the same as the farm ID used in the call to the StartSessionsStatisticsAggregation operation.

  • aggregationId (string) –

    [REQUIRED]

    The identifier returned by the StartSessionsStatisticsAggregation operation that identifies the aggregated statistics.

  • maxResults (integer) – The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

  • nextToken (string) – The token for the next set of results, or null to start from the beginning.

Return type:

dict

Returns:

Response Syntax

{
    'statistics': [
        {
            'queueId': 'string',
            'fleetId': 'string',
            'jobId': 'string',
            'jobName': 'string',
            'userId': 'string',
            'usageType': 'COMPUTE'|'LICENSE',
            'licenseProduct': 'string',
            'instanceType': 'string',
            'count': 123,
            'costInUsd': {
                'min': 123.0,
                'max': 123.0,
                'avg': 123.0,
                'sum': 123.0
            },
            'runtimeInSeconds': {
                'min': 123.0,
                'max': 123.0,
                'avg': 123.0,
                'sum': 123.0
            },
            'aggregationStartTime': datetime(2015, 1, 1),
            'aggregationEndTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string',
    'status': 'IN_PROGRESS'|'TIMEOUT'|'FAILED'|'COMPLETED',
    'statusMessage': 'string'
}

Response Structure

  • (dict) –

    • statistics (list) –

      The statistics for the specified fleets or queues.

      • (dict) –

        A list of statistics for a session.

        • queueId (string) –

          The queue ID.

        • fleetId (string) –

          The fleet ID.

        • jobId (string) –

          The job ID.

        • jobName (string) –

          The job name.

        • userId (string) –

          The user ID.

        • usageType (string) –

          The type of usage for the statistics.

        • licenseProduct (string) –

          The licensed product.

        • instanceType (string) –

          The type of instance.

        • count (integer) –

          The number of instances in a list of statistics.

        • costInUsd (dict) –

          How the statistics should appear in USD. Options include: minimum, maximum, average or sum.

          • min (float) –

            The minimum of the usage statistics.

          • max (float) –

            The maximum among the usage statistics.

          • avg (float) –

            The average of the usage statistics.

          • sum (float) –

            The sum of the usage statistics.

        • runtimeInSeconds (dict) –

          The total aggregated runtime.

          • min (float) –

            The minimum of the usage statistics.

          • max (float) –

            The maximum among the usage statistics.

          • avg (float) –

            The average of the usage statistics.

          • sum (float) –

            The sum of the usage statistics.

        • aggregationStartTime (datetime) –

          The start time for the aggregation.

        • aggregationEndTime (datetime) –

          The end time for the aggregation.

    • nextToken (string) –

      If Deadline Cloud returns nextToken, then there are more results available. The value of nextToken is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then nextToken is set to null. Each pagination token expires after 24 hours. If you provide a token that isn’t valid, then you receive an HTTP 400 ValidationException error.

    • status (string) –

      The status of the aggregated results. An aggregation may fail or time out if the results are too large. If this happens, you can call the StartSessionsStatisticsAggregation operation after you reduce the aggregation time frame, reduce the number of queues or fleets in the aggregation, or increase the period length.

      If you call the StartSessionsStatisticsAggregation operation when the status is IN_PROGRESS, you will receive a ThrottlingException.

    • statusMessage (string) –

      A message that describes the status.

Exceptions

  • DeadlineCloud.Client.exceptions.AccessDeniedException

  • DeadlineCloud.Client.exceptions.InternalServerErrorException

  • DeadlineCloud.Client.exceptions.ResourceNotFoundException

  • DeadlineCloud.Client.exceptions.ThrottlingException

  • DeadlineCloud.Client.exceptions.ValidationException