Skip to content

list_services async

list_services(
    start_time: datetime,
    end_time: datetime,
    *,
    config_overrides: Optional[AsyncApplicationSignalsClientConfig] = None,
    max_results: Optional[ListServicesMaxResults] = None,
    next_token: Optional[NextToken] = None,
    include_linked_accounts: Optional[bool] = None,
    aws_account_id: Optional[AwsAccountId] = None,
) -> ListServicesOutput

Returns a list of services that have been discovered by Application Signals. A service represents a minimum logical and transactional unit that completes a business function. Services are discovered through Application Signals instrumentation.

Parameters:

  • start_time (datetime) –

    The start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: 1698778057

    Your requested start time will be rounded to the nearest hour.

  • end_time (datetime) –

    The end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: 1698778057

    Your requested start time will be rounded to the nearest hour.

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

    The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.

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

    Include this value, if it was returned by the previous operation, to get the next set of services.

  • include_linked_accounts (Optional[bool], default: None ) –

    If you are using this operation in a monitoring account, specify true to include services from source accounts in the returned data.

  • aws_account_id (Optional[AwsAccountId], default: None ) –

    Amazon Web Services Account ID.

Raises:

Source code in docs_src/capo_application_signals/_services/async_application_signals.py
async def list_services(
    self,
    start_time: datetime.datetime,
    end_time: datetime.datetime,
    *,
    config_overrides: Optional[AsyncApplicationSignalsClientConfig] = None,
    max_results: Optional[
        "capo_application_signals.types.list_services_max_results.ListServicesMaxResults"
    ] = None,
    next_token: Optional[
        "capo_application_signals.types.next_token.NextToken"
    ] = None,
    include_linked_accounts: Optional[bool] = None,
    aws_account_id: Optional[
        "capo_application_signals.types.aws_account_id.AwsAccountId"
    ] = None,
) -> "capo_application_signals.types.list_services_output.ListServicesOutput":
    """<p>Returns a list of services that have been discovered by Application Signals. A service represents a minimum logical and transactional unit that completes a business function. Services are discovered through Application Signals instrumentation.</p>

    Args:
        start_time: <p>The start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code> </p> <p>Your requested start time will be rounded to the nearest hour.</p>
        end_time: <p>The end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code> </p> <p>Your requested start time will be rounded to the nearest hour.</p>
        max_results: <p> The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used. </p>
        next_token: <p>Include this value, if it was returned by the previous operation, to get the next set of services.</p>
        include_linked_accounts: <p>If you are using this operation in a monitoring account, specify <code>true</code> to include services from source accounts in the returned data. </p>
        aws_account_id: <p>Amazon Web Services Account ID.</p>

    Raises:
        capo_application_signals.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
        capo_application_signals.errors.validation_exception.ValidationException: <p>The resource is not valid.</p>
        capo_application_signals.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_application_signals.types.list_services_input.ListServicesInput]",
    ) -> AsyncOperationResponse[
        "capo_application_signals.types.list_services_output.ListServicesOutput"
    ]:
        import capo_application_signals._operations.application_signals.list_services

        (
            output,
            http_response,
        ) = await capo_application_signals._operations.application_signals.list_services.async_list_services(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListServices")
    )
    input_: capo_application_signals.types.list_services_input.ListServicesInput = {
        "start_time": start_time,
        "end_time": end_time,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if include_linked_accounts is not None:
        input_["include_linked_accounts"] = include_linked_accounts
    if aws_account_id is not None:
        input_["aws_account_id"] = aws_account_id

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