-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathhealthValidation.tsp
More file actions
115 lines (92 loc) · 3.06 KB
/
Copy pathhealthValidation.tsp
File metadata and controls
115 lines (92 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import "@typespec/rest";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
namespace Microsoft.DatabaseWatcher;
using Azure.ResourceManager;
using TypeSpec.Versioning;
using TypeSpec.Http;
using TypeSpec.Rest;
@armResourceOperations
@added(Versions.v2024_10_01_preview)
interface HealthValidations {
get is ArmResourceRead<HealthValidation>;
listByParent is ArmResourceListByParent<HealthValidation>;
@doc("Starts health validation for a watcher.")
startValidation is ArmResourceActionAsync<
HealthValidation,
void,
HealthValidation
>;
}
@parentResource(Watcher)
@added(Versions.v2024_10_01_preview)
model HealthValidation is ProxyResource<HealthValidationProperties> {
@doc("The health validation resource name.")
@key("healthValidationName")
@pattern("^[a-zA-Z0-9]{1}[a-zA-Z0-9-_.]{0,62}[a-zA-Z0-9_]{1}$")
@segment("healthValidations")
@path
name: string;
}
@doc("The generic properties of the health validation resource.")
@added(Versions.v2024_10_01_preview)
model HealthValidationProperties {
@visibility(Lifecycle.Read)
@doc("The start time of health validation, in UTC.")
startTime: utcDateTime;
@visibility(Lifecycle.Read)
@doc("The end time of health validation, in UTC.")
endTime: utcDateTime;
@visibility(Lifecycle.Read)
@doc("The current health validation status.")
status: validationStatus;
@visibility(Lifecycle.Read)
@identifiers(#[])
@doc("The list of issues found by health validation.")
issues: ValidationIssue[];
@visibility(Lifecycle.Read)
@doc("The provisioning state of the health validation resource.")
provisioningState?: ResourceProvisioningState;
}
@doc("Health validation status.")
@added(Versions.v2024_10_01_preview)
union validationStatus {
string,
@doc("Health validation has not started.")
NotStarted: "NotStarted",
@doc("Health validation is running.")
Running: "Running",
@doc("Health validation completed successfully.")
Succeeded: "Succeeded",
@doc("Health validation failed.")
Failed: "Failed",
@doc("Health validation was canceled.")
Canceled: "Canceled",
@doc("Health validation timed out.")
TimedOut: "TimedOut",
}
@doc("The model of a health validation issue.")
@added(Versions.v2024_10_01_preview)
model ValidationIssue {
@visibility(Lifecycle.Read)
@doc("The error code of the issue.")
errorCode: string;
@visibility(Lifecycle.Read)
@doc("The error message of the issue.")
errorMessage: string;
@visibility(Lifecycle.Read)
@doc("The additional details for the issue.")
additionalDetails?: string;
@visibility(Lifecycle.Read)
@doc("The recommendation for resolving the issue.")
recommendationMessage: string;
@visibility(Lifecycle.Read)
@doc("The URL related to resolving the issue.")
recommendationUrl?: url;
@visibility(Lifecycle.Read)
@doc("The resource ID of the Azure resource related to the issue.")
relatedResourceId?: Azure.Core.armResourceIdentifier<[]>;
@visibility(Lifecycle.Read)
@doc("The type of the Azure resource related to the issue.")
relatedResourceType?: string;
}