Class AnomalyDetectorAsyncClient


  • public final class AnomalyDetectorAsyncClient
    extends Object
    Initializes a new instance of the asynchronous AnomalyDetectorClient type.
    • Method Detail

      • detectEntireSeriesWithResponse

        public Mono<com.azure.core.http.rest.Response<EntireDetectResponse>> detectEntireSeriesWithResponse​(DetectRequest body)
        This operation generates a model with an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.
        Parameters:
        body - Time series points and period if needed. Advanced model parameters can also be set in the request.
        Returns:
        the response of entire anomaly detection.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        AnomalyDetectorErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • detectEntireSeries

        public Mono<EntireDetectResponse> detectEntireSeries​(DetectRequest body)
        This operation generates a model with an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.
        Parameters:
        body - Time series points and period if needed. Advanced model parameters can also be set in the request.
        Returns:
        the response of entire anomaly detection.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        AnomalyDetectorErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • detectLastPointWithResponse

        public Mono<com.azure.core.http.rest.Response<LastDetectResponse>> detectLastPointWithResponse​(DetectRequest body)
        This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.
        Parameters:
        body - Time series points and period if needed. Advanced model parameters can also be set in the request.
        Returns:
        the response of last anomaly detection.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        AnomalyDetectorErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • detectLastPoint

        public Mono<LastDetectResponse> detectLastPoint​(DetectRequest body)
        This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.
        Parameters:
        body - Time series points and period if needed. Advanced model parameters can also be set in the request.
        Returns:
        the response of last anomaly detection.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        AnomalyDetectorErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • detectChangePointWithResponse

        public Mono<com.azure.core.http.rest.Response<ChangePointDetectResponse>> detectChangePointWithResponse​(ChangePointDetectRequest body)
        Evaluate change point score of every series point.
        Parameters:
        body - Time series points and granularity is needed. Advanced model parameters can also be set in the request if needed.
        Returns:
        the response of change point detection.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        AnomalyDetectorErrorException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • trainMultivariateModelWithResponse

        public Mono<TrainMultivariateModelResponse> trainMultivariateModelWithResponse​(ModelInfo body)
        Create and train a multivariate anomaly detection model. The request must include a source parameter to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be in a single CSV file in which the first column is timestamp and the second column is value.
        Parameters:
        body - Training request.
        Returns:
        the completion.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • trainMultivariateModel

        public Mono<Void> trainMultivariateModel​(ModelInfo body)
        Create and train a multivariate anomaly detection model. The request must include a source parameter to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be in a single CSV file in which the first column is timestamp and the second column is value.
        Parameters:
        body - Training request.
        Returns:
        the completion.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • listMultivariateModelSinglePage

        public Mono<com.azure.core.http.rest.PagedResponse<ModelSnapshot>> listMultivariateModelSinglePage​(Integer skip,
                                                                                                           Integer top)
        List models of a subscription.
        Parameters:
        skip - $skip indicates how many models will be skipped.
        top - $top indicates how many models will be fetched.
        Returns:
        response of listing models.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • listMultivariateModel

        public com.azure.core.http.rest.PagedFlux<ModelSnapshot> listMultivariateModel​(Integer skip,
                                                                                       Integer top)
        List models of a subscription.
        Parameters:
        skip - $skip indicates how many models will be skipped.
        top - $top indicates how many models will be fetched.
        Returns:
        response of listing models.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getMultivariateModelWithResponse

        public Mono<com.azure.core.http.rest.Response<Model>> getMultivariateModelWithResponse​(UUID modelId)
        Get detailed information of multivariate model, including the training status and variables used in the model.
        Parameters:
        modelId - Model identifier.
        Returns:
        detailed information of multivariate model, including the training status and variables used in the model.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getMultivariateModel

        public Mono<Model> getMultivariateModel​(UUID modelId)
        Get detailed information of multivariate model, including the training status and variables used in the model.
        Parameters:
        modelId - Model identifier.
        Returns:
        detailed information of multivariate model, including the training status and variables used in the model.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteMultivariateModelWithResponse

        public Mono<com.azure.core.http.rest.Response<Void>> deleteMultivariateModelWithResponse​(UUID modelId)
        Delete an existing multivariate model according to the modelId.
        Parameters:
        modelId - Model identifier.
        Returns:
        the completion.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteMultivariateModel

        public Mono<Void> deleteMultivariateModel​(UUID modelId)
        Delete an existing multivariate model according to the modelId.
        Parameters:
        modelId - Model identifier.
        Returns:
        the completion.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • detectAnomalyWithResponse

        public Mono<DetectAnomalyResponse> detectAnomalyWithResponse​(UUID modelId,
                                                                     DetectionRequest body)
        Submit detection multivariate anomaly task with the trained model of modelId, the input schema should be the same with the training request. Thus request will be complete asynchronously and will return a resultId for querying the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be as follows: the first column is timestamp and the second column is value.
        Parameters:
        modelId - Model identifier.
        body - Detect anomaly request.
        Returns:
        the completion.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • detectAnomaly

        public Mono<Void> detectAnomaly​(UUID modelId,
                                        DetectionRequest body)
        Submit detection multivariate anomaly task with the trained model of modelId, the input schema should be the same with the training request. Thus request will be complete asynchronously and will return a resultId for querying the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be as follows: the first column is timestamp and the second column is value.
        Parameters:
        modelId - Model identifier.
        body - Detect anomaly request.
        Returns:
        the completion.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getDetectionResultWithResponse

        public Mono<com.azure.core.http.rest.Response<DetectionResult>> getDetectionResultWithResponse​(UUID resultId)
        Get multivariate anomaly detection result based on resultId returned by the DetectAnomalyAsync api.
        Parameters:
        resultId - Result identifier.
        Returns:
        multivariate anomaly detection result based on resultId returned by the DetectAnomalyAsync api.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getDetectionResult

        public Mono<DetectionResult> getDetectionResult​(UUID resultId)
        Get multivariate anomaly detection result based on resultId returned by the DetectAnomalyAsync api.
        Parameters:
        resultId - Result identifier.
        Returns:
        multivariate anomaly detection result based on resultId returned by the DetectAnomalyAsync api.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • exportModelWithResponse

        public Mono<com.azure.core.http.rest.StreamResponse> exportModelWithResponse​(UUID modelId)
        Export multivariate anomaly detection model based on modelId.
        Parameters:
        modelId - Model identifier.
        Returns:
        the response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • exportModel

        public Flux<ByteBuffer> exportModel​(UUID modelId)
        Export multivariate anomaly detection model based on modelId.
        Parameters:
        modelId - Model identifier.
        Returns:
        the response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • lastDetectAnomalyWithResponse

        public Mono<com.azure.core.http.rest.Response<LastDetectionResult>> lastDetectAnomalyWithResponse​(UUID modelId,
                                                                                                          LastDetectionRequest body)
        Synchronized API for anomaly detection.
        Parameters:
        modelId - Model identifier.
        body - Request for last detection.
        Returns:
        the response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • listMultivariateModelNextSinglePage

        public Mono<com.azure.core.http.rest.PagedResponse<ModelSnapshot>> listMultivariateModelNextSinglePage​(String nextLink)
        Get the next page of items.
        Parameters:
        nextLink - The nextLink parameter.
        Returns:
        response of listing models.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorResponseException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.