Skip to content

[AnomalyDetector] Fix CADL operation signatures #21527

Open
@catalinaperalta

Description

@catalinaperalta

Upgrade operation signatures to the CADL Azure Core operations signatures once custom error responses are allowed.

Example Univariate operations signatures using Azure.Core.Foundations signature:

op DetectUnivariateEntireSeries is Azure.Core.Foundations.Operation<DetectRequest, EntireDetectResponse>;
op DetectUnivariateLastPoint is Azure.Core.Foundations.Operation<DetectRequest, LastDetectResponse>;
op DetectUnivariateChangePoint is Azure.Core.Foundations.Operation<ChangePointDetectRequest, ChangePointDetectResponse>;

Example Multivariate operations using the Azure.Core operation signatures:

op GetBatchDetectionResult is Azure.Core.ResourceRead<DetectionResult>;

op CreateAndTrainMultivariateModelis Azure.Core.ResourceCreateWithServiceProvidedName<Model>;

op ListMultivariateModel is Azure.Core.ResourceList<
  Model,
  {
    parameters: {
      @doc("Skip indicates how many models will be skipped.")
      @query
      skip?: int32;

      @doc("Top indicates how many models will be fetched.")
      @query
      top?: int32;
    },
    response: ModelList,
  }
>;

op DeleteMultivariateModel is Azure.Core.ResourceDelete<Model>;

op GetMultivariateModel is Azure.Core.ResourceRead<Model>;

op DetectMultivariateBatchAnomaly is Azure.Core.Foundations.LongRunningOperation<
  {
    @doc("Model identifier")
    @format("uuid")
    @path
    modelId: string,
    ...DetectionRequest,
  },
  {
    @statusCode statusCode: 202,
    @doc("Id of the detection result.")
    @header "Operation-Id": string,
    ...DetectionResult,
  }
>;

op DetectMultivariateLastAnomalyis Azure.Core.Foundations.Operation<
  {
    @doc("Model identifier")
    @format("uuid")
    @path
    modelId: string,
    ...LastDetectionRequest,
  },
  LastDetectionResult
>;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions