Skip to content

list_service_operations

list_service_operations(
    start_time: datetime,
    end_time: datetime,
    key_attributes: Attributes,
    *,
    config_overrides: Optional[ApplicationSignalsClientConfig] = None,
    max_results: Optional[ListServiceOperationMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListServiceOperationsOutput

Returns a list of the operations of this service that have been discovered by Application Signals. Only the operations that were invoked during the specified time range are returned.

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 end time will be rounded to the nearest hour.

  • key_attributes (Attributes) –

    Use this field to specify which service you want to retrieve information for. You must specify at least the Type, Name, and Environment attributes.

    This is a string-to-string map. It can include the following fields.

    • Type designates the type of object this is.

    • ResourceType specifies the type of the resource. This field is used only when the value of the Type field is Resource or AWS::Resource.

    • Name specifies the name of the object. This is used only if the value of the Type field is Service, RemoteService, or AWS::Service.

    • Identifier identifies the resource objects of this resource. This is used only if the value of the Type field is Resource or AWS::Resource.

    • Environment specifies the location where this object is hosted, or what it belongs to.

  • max_results (Optional[ListServiceOperationMaxResults], 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 service operations.

Raises:

Source code in docs_src/capo_application_signals/_services/application_signals.py
def list_service_operations(
    self,
    start_time: datetime.datetime,
    end_time: datetime.datetime,
    key_attributes: "capo_application_signals.types.attributes.Attributes",
    *,
    config_overrides: Optional[ApplicationSignalsClientConfig] = None,
    max_results: Optional[
        "capo_application_signals.types.list_service_operation_max_results.ListServiceOperationMaxResults"
    ] = None,
    next_token: Optional[
        "capo_application_signals.types.next_token.NextToken"
    ] = None,
) -> "capo_application_signals.types.list_service_operations_output.ListServiceOperationsOutput":
    """<p>Returns a list of the <i>operations</i> of this service that have been discovered by Application Signals. Only the operations that were invoked during the specified time range are returned.</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 end time will be rounded to the nearest hour.</p>
        key_attributes: <p>Use this field to specify which service you want to retrieve information for. You must specify at least the <code>Type</code>, <code>Name</code>, and <code>Environment</code> attributes.</p> <p>This is a string-to-string map. It can include the following fields.</p> <ul> <li> <p> <code>Type</code> designates the type of object this is.</p> </li> <li> <p> <code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p> </li> <li> <p> <code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p> </li> <li> <p> <code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p> </li> <li> <p> <code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p> </li> </ul>
        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 service operations.</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.
    """

    def _handler(
        req: "OperationRequest[capo_application_signals.types.list_service_operations_input.ListServiceOperationsInput]",
    ) -> OperationResponse[
        "capo_application_signals.types.list_service_operations_output.ListServiceOperationsOutput"
    ]:
        import capo_application_signals._operations.application_signals.list_service_operations

        output, http_response = (
            capo_application_signals._operations.application_signals.list_service_operations.list_service_operations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListServiceOperations")
    )
    input_: capo_application_signals.types.list_service_operations_input.ListServiceOperationsInput = {
        "start_time": start_time,
        "end_time": end_time,
        "key_attributes": key_attributes,
    }
    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