2023-06-01 22:25:03 +03:00
|
|
|
package api
|
|
|
|
|
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
// Licensed under the Apache License 2.0.
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
)
|
|
|
|
|
|
|
|
// PreflightRequest is the request body of preflight
|
|
|
|
type PreflightRequest struct {
|
|
|
|
Resources []json.RawMessage `json:"resources"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ValidationResult is the validation result to return in the deployment preflight response body
|
|
|
|
type ValidationResult struct {
|
2024-07-12 21:49:18 +03:00
|
|
|
Status ValidationStatus `json:"status"`
|
|
|
|
Error *CloudErrorBody `json:"error,omitempty"`
|
2023-06-01 22:25:03 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// ResourceTypeMeta is the Typemeta inside request body of preflight
|
|
|
|
type ResourceTypeMeta struct {
|
2023-07-17 21:56:49 +03:00
|
|
|
Id string `json:"id"`
|
2023-06-01 22:25:03 +03:00
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Location string `json:"location"`
|
|
|
|
APIVersion string `json:"apiVersion"`
|
|
|
|
Properties `json:"properties"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Properties map[string]interface{}
|
|
|
|
|
|
|
|
type ValidationStatus string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// ValidationStatusSucceeded means validation passed
|
|
|
|
ValidationStatusSucceeded ValidationStatus = "Succeeded"
|
|
|
|
// ValidationStatusFailed means validation failed
|
|
|
|
ValidationStatusFailed ValidationStatus = "Failed"
|
|
|
|
)
|