Skip to content

list_model_monitor_configs

list_model_monitor_configs(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    target_type: Optional[ModelMonitorTargetType] = None,
    target_name: Optional[ModelMonitorTargetName] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListModelMonitorConfigsResponse

Lists the model monitor configurations that are attached to a single target, a SageMaker AI endpoint or an Amazon Bedrock model, in your account. SageMaker AI lists the configurations newest first. Results are paginated. To get the next page, use NextToken. A target can have more than one configuration, so the response includes every configuration that is attached to the target that you specify.

This operation is in public preview release for Amazon SageMaker AI and is subject to change. This feature is not recommended for production environments.

Parameters:

  • target_type (Optional[ModelMonitorTargetType], default: None ) –

    The type of the target whose model monitor configurations you want to list.

  • target_name (Optional[ModelMonitorTargetName], default: None ) –

    The name of the target whose model monitor configurations you want to list: the endpoint name or the Amazon Bedrock model ID, depending on TargetType.

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

    If the previous response was truncated, you receive this token. To get the next set of results, use it in your next request.

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

    The maximum number of results to return in the response.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_model_monitor_configs(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    target_type: Optional[
        "capo_sagemaker.types.model_monitor_target_type.ModelMonitorTargetType"
    ] = None,
    target_name: Optional[
        "capo_sagemaker.types.model_monitor_target_name.ModelMonitorTargetName"
    ] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
) -> "capo_sagemaker.types.list_model_monitor_configs_response.ListModelMonitorConfigsResponse":
    """<p>Lists the model monitor configurations that are attached to a single target, a SageMaker AI endpoint or an Amazon Bedrock model, in your account. SageMaker AI lists the configurations newest first. Results are paginated. To get the next page, use <code>NextToken</code>. A target can have more than one configuration, so the response includes every configuration that is attached to the target that you specify.</p> <note> <p>This operation is in public preview release for Amazon SageMaker AI and is subject to change. This feature is not recommended for production environments.</p> </note>

    Args:
        target_type: <p>The type of the target whose model monitor configurations you want to list.</p>
        target_name: <p>The name of the target whose model monitor configurations you want to list: the endpoint name or the Amazon Bedrock model ID, depending on <code>TargetType</code>.</p>
        next_token: <p>If the previous response was truncated, you receive this token. To get the next set of results, use it in your next request.</p>
        max_results: <p>The maximum number of results to return in the response.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_model_monitor_configs_request.ListModelMonitorConfigsRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_model_monitor_configs_response.ListModelMonitorConfigsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_model_monitor_configs

        output, http_response = (
            capo_sagemaker._operations.sage_maker.list_model_monitor_configs.list_model_monitor_configs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListModelMonitorConfigs")
    )
    input_: capo_sagemaker.types.list_model_monitor_configs_request.ListModelMonitorConfigsRequest = {}
    if target_type is not None:
        input_["target_type"] = target_type
    if target_name is not None:
        input_["target_name"] = target_name
    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