Skip to content

list_profile_times

list_profile_times(
    profiling_group_name: ProfilingGroupName,
    start_time: Timestamp,
    end_time: Timestamp,
    period: AggregationPeriod,
    *,
    config_overrides: Optional[CodeGuruProfilerClientConfig] = None,
    order_by: Optional[OrderBy] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListProfileTimesResponse

Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.

Parameters:

  • profiling_group_name (ProfilingGroupName) –

    The name of the profiling group.

  • start_time (Timestamp) –

    The start time of the time range from which to list the profiles.

  • end_time (Timestamp) –

    The end time of the time range from which to list the profiles.

  • period (AggregationPeriod) –

    The aggregation period. This specifies the period during which an aggregation profile collects posted agent profiles for a profiling group. There are 3 valid values.

    • P1D — 1 day

    • PT1H — 1 hour

    • PT5M — 5 minutes

  • order_by (Optional[OrderBy], default: None ) –

    The order (ascending or descending by start time of the profile) to use when listing profiles. Defaults to TIMESTAMP_DESCENDING.

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

    The maximum number of profile time results returned by ListProfileTimes in paginated output. When this parameter is used, ListProfileTimes only returns maxResults results in a single page with a nextToken response element. The remaining results of the initial request can be seen by sending another ListProfileTimes request with the returned nextToken value.

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

    The nextToken value returned from a previous paginated ListProfileTimes request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

    This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

Raises:

Source code in docs_src/capo_codeguruprofiler/_services/code_guru_profiler.py
def list_profile_times(
    self,
    profiling_group_name: "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName",
    start_time: "capo_codeguruprofiler.types.timestamp.Timestamp",
    end_time: "capo_codeguruprofiler.types.timestamp.Timestamp",
    period: "capo_codeguruprofiler.types.aggregation_period.AggregationPeriod",
    *,
    config_overrides: Optional[CodeGuruProfilerClientConfig] = None,
    order_by: Optional["capo_codeguruprofiler.types.order_by.OrderBy"] = None,
    max_results: Optional[
        "capo_codeguruprofiler.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_codeguruprofiler.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_codeguruprofiler.types.list_profile_times_response.ListProfileTimesResponse":
    """<p>Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.</p>

    Args:
        profiling_group_name: <p>The name of the profiling group.</p>
        start_time: <p>The start time of the time range from which to list the profiles.</p>
        end_time: <p>The end time of the time range from which to list the profiles.</p>
        period: <p> The aggregation period. This specifies the period during which an aggregation profile collects posted agent profiles for a profiling group. There are 3 valid values. </p> <ul> <li> <p> <code>P1D</code> — 1 day </p> </li> <li> <p> <code>PT1H</code> — 1 hour </p> </li> <li> <p> <code>PT5M</code> — 5 minutes </p> </li> </ul>
        order_by: <p>The order (ascending or descending by start time of the profile) to use when listing profiles. Defaults to <code>TIMESTAMP_DESCENDING</code>. </p>
        max_results: <p>The maximum number of profile time results returned by <code>ListProfileTimes</code> in paginated output. When this parameter is used, <code>ListProfileTimes</code> only returns <code>maxResults</code> results in a single page with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListProfileTimes</code> request with the returned <code>nextToken</code> value. </p>
        next_token: <p>The <code>nextToken</code> value returned from a previous paginated <code>ListProfileTimes</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. </p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note>

    Raises:
        capo_codeguruprofiler.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_codeguruprofiler.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_codeguruprofiler.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_codeguruprofiler.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_codeguruprofiler.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codeguruprofiler.types.list_profile_times_request.ListProfileTimesRequest]",
    ) -> OperationResponse[
        "capo_codeguruprofiler.types.list_profile_times_response.ListProfileTimesResponse"
    ]:
        import capo_codeguruprofiler._operations.code_guru_profiler.list_profile_times

        output, http_response = (
            capo_codeguruprofiler._operations.code_guru_profiler.list_profile_times.list_profile_times(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProfileTimes")
    )
    input_: capo_codeguruprofiler.types.list_profile_times_request.ListProfileTimesRequest = {
        "profiling_group_name": profiling_group_name,
        "start_time": start_time,
        "end_time": end_time,
        "period": period,
    }
    if order_by is not None:
        input_["order_by"] = order_by
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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