Skip to content

get_sessions_statistics_aggregation

get_sessions_statistics_aggregation(
    farm_id: FarmId,
    aggregation_id: AggregationId,
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> GetSessionsStatisticsAggregationResponse

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.

Parameters:

  • farm_id (FarmId) –

    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.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of results, or null to start from the beginning.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

  • aggregation_id (AggregationId) –

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

Raises:

Source code in docs_src/capo_deadline/_services/deadline.py
def get_sessions_statistics_aggregation(
    self,
    farm_id: "capo_deadline.types.farm_id.FarmId",
    aggregation_id: "capo_deadline.types.aggregation_id.AggregationId",
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    next_token: Optional["capo_deadline.types.next_token.NextToken"] = None,
    max_results: Optional["capo_deadline.types.max_results.MaxResults"] = None,
) -> "capo_deadline.types.get_sessions_statistics_aggregation_response.GetSessionsStatisticsAggregationResponse":
    """<p>Gets a set of statistics for queues or farms. Before you can call the <code>GetSessionStatisticsAggregation</code> operation, you must first call the <code>StartSessionsStatisticsAggregation</code> operation. Statistics are available for 1 hour after you call the <code>StartSessionsStatisticsAggregation</code> operation.</p>

    Args:
        farm_id: <p>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 <code>StartSessionsStatisticsAggregation</code> operation.</p>
        next_token: <p>The token for the next set of results, or <code>null</code> to start from the beginning.</p>
        max_results: <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages.</p>
        aggregation_id: <p>The identifier returned by the <code>StartSessionsStatisticsAggregation</code> operation that identifies the aggregated statistics.</p>

    Raises:
        capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
        capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: <p>Deadline Cloud can't process your request right now. Try again later.</p>
        capo_deadline.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_deadline.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota.</p>
        capo_deadline.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
        capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_deadline.types.get_sessions_statistics_aggregation_request.GetSessionsStatisticsAggregationRequest]",
    ) -> OperationResponse[
        "capo_deadline.types.get_sessions_statistics_aggregation_response.GetSessionsStatisticsAggregationResponse"
    ]:
        import capo_deadline._operations.deadline.get_sessions_statistics_aggregation

        output, http_response = (
            capo_deadline._operations.deadline.get_sessions_statistics_aggregation.get_sessions_statistics_aggregation(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSessionsStatisticsAggregation")
    )
    input_: capo_deadline.types.get_sessions_statistics_aggregation_request.GetSessionsStatisticsAggregationRequest = {
        "farm_id": farm_id,
        "aggregation_id": aggregation_id,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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