Skip to content

get_instrumentation_configuration_status

get_instrumentation_configuration_status(
    instrumentation_type: InstrumentationType,
    service: str,
    environment: str,
    signal_type: DynamicInstrumentationSignalType,
    location_identifier: LocationIdentifier,
    *,
    config_overrides: Optional[ApplicationSignalsClientConfig] = None,
    status: Optional[InstrumentationConfigurationStatus] = None,
    start_time: Optional[datetime] = None,
    end_time: Optional[datetime] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
) -> GetInstrumentationConfigurationStatusResponse

Retrieves the status history for a single instrumentation configuration during a specified time range. The response lists when the configuration was ACTIVE, READY, ERROR, or DISABLED.

If no status or time window is provided, the operation defaults to ACTIVE events from the last hour.

Parameters:

  • instrumentation_type (InstrumentationType) –

    Type of instrumentation configuration (BREAKPOINT or PROBE). Required to identify the configuration to retrieve.

  • service (str) –

    Service name for the instrumentation configuration.

  • environment (str) –

    Environment name for the instrumentation configuration.

  • signal_type (DynamicInstrumentationSignalType) –

    Signal type for the instrumentation configuration.

  • location_identifier (LocationIdentifier) –

    Location identifier - either full code location or a pre-computed hash.

  • status (Optional[InstrumentationConfigurationStatus], default: None ) –

    The single status to query for. If omitted, only ACTIVE status events are returned.

  • start_time (Optional[datetime], default: None ) –

    The start of the time range to retrieve status events for. StartTime and EndTime must both be provided together or both be omitted. When both are omitted, the time range defaults to the last hour.

  • end_time (Optional[datetime], default: None ) –

    The end of the time range to retrieve status events for. StartTime and EndTime must both be provided together or both be omitted. When both are omitted, the time range defaults to the last hour.

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

    The maximum number of status events to return in one call. The default is 60.

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

    Use the token returned by a previous call to retrieve the next page of status events.

Raises:

Source code in docs_src/capo_application_signals/_services/application_signals.py
def get_instrumentation_configuration_status(
    self,
    instrumentation_type: "capo_application_signals.types.instrumentation_type.InstrumentationType",
    service: str,
    environment: str,
    signal_type: "capo_application_signals.types.dynamic_instrumentation_signal_type.DynamicInstrumentationSignalType",
    location_identifier: "capo_application_signals.types.location_identifier.LocationIdentifier",
    *,
    config_overrides: Optional[ApplicationSignalsClientConfig] = None,
    status: Optional[
        "capo_application_signals.types.instrumentation_configuration_status.InstrumentationConfigurationStatus"
    ] = None,
    start_time: Optional[datetime.datetime] = None,
    end_time: Optional[datetime.datetime] = None,
    max_results: Optional[int] = None,
    next_token: Optional[
        "capo_application_signals.types.next_token.NextToken"
    ] = None,
) -> "capo_application_signals.types.get_instrumentation_configuration_status_response.GetInstrumentationConfigurationStatusResponse":
    """<p>Retrieves the status history for a single instrumentation configuration during a specified time range. The response lists when the configuration was ACTIVE, READY, ERROR, or DISABLED.</p> <p>If no status or time window is provided, the operation defaults to ACTIVE events from the last hour.</p>

    Args:
        instrumentation_type: Type of instrumentation configuration (BREAKPOINT or PROBE). Required to identify the configuration to retrieve.
        service: Service name for the instrumentation configuration.
        environment: Environment name for the instrumentation configuration.
        signal_type: Signal type for the instrumentation configuration.
        location_identifier: Location identifier - either full code location or a pre-computed hash.
        status: <p>The single status to query for. If omitted, only <code>ACTIVE</code> status events are returned.</p>
        start_time: <p>The start of the time range to retrieve status events for. <code>StartTime</code> and <code>EndTime</code> must both be provided together or both be omitted. When both are omitted, the time range defaults to the last hour.</p>
        end_time: <p>The end of the time range to retrieve status events for. <code>StartTime</code> and <code>EndTime</code> must both be provided together or both be omitted. When both are omitted, the time range defaults to the last hour.</p>
        max_results: <p>The maximum number of status events to return in one call. The default is 60.</p>
        next_token: <p>Use the token returned by a previous call to retrieve the next page of status events.</p>

    Raises:
        capo_application_signals.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found.</p>
        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.get_instrumentation_configuration_status_request.GetInstrumentationConfigurationStatusRequest]",
    ) -> OperationResponse[
        "capo_application_signals.types.get_instrumentation_configuration_status_response.GetInstrumentationConfigurationStatusResponse"
    ]:
        import capo_application_signals._operations.application_signals.get_instrumentation_configuration_status

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetInstrumentationConfigurationStatus")
    )
    input_: capo_application_signals.types.get_instrumentation_configuration_status_request.GetInstrumentationConfigurationStatusRequest = {
        "instrumentation_type": instrumentation_type,
        "service": service,
        "environment": environment,
        "signal_type": signal_type,
        "location_identifier": location_identifier,
    }
    if status is not None:
        input_["status"] = status
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["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

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