-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathDiagnostics.tsp
More file actions
67 lines (58 loc) · 2.41 KB
/
Copy pathDiagnostics.tsp
File metadata and controls
67 lines (58 loc) · 2.41 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
import "@typespec/http";
import "@typespec/rest";
import "@azure-tools/typespec-azure-resource-manager";
import "@azure-tools/typespec-azure-core";
import "@typespec/versioning";
using TypeSpec.Http;
using TypeSpec.Rest;
using Azure.ResourceManager;
using Azure.ResourceManager.CommonTypes;
using TypeSpec.Versioning;
namespace Microsoft.Edge;
@doc("The properties of a Diagnostic resource.")
model DiagnosticProperties {
@doc("The status of the last operation.")
@visibility(Lifecycle.Read)
provisioningState?: ProvisioningState;
}
@doc("The updatable properties of the Diagnostic.")
model DiagnosticUpdate {
@doc("The resource-specific properties for this resource.")
properties?: DiagnosticUpdateProperties;
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@doc("Resource tags.")
tags?: Record<string>;
}
#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@doc("The updatable properties of the Diagnostic.")
model DiagnosticUpdateProperties is DiagnosticProperties;
@doc("A Diagnostic resource.")
@resource("diagnostics")
model Diagnostic
is Azure.ResourceManager.TrackedResource<DiagnosticProperties> {
@doc("Name of Diagnostic.")
@maxLength(90)
@minLength(1)
@pattern("^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*$")
@path
@key("diagnosticName")
@segment("diagnostics")
name: string;
...ExtendedLocationProperty;
...EntityTagProperty;
}
@armResourceOperations
interface Diagnostics {
@doc("Returns details of specified Diagnostic resource.")
get is Azure.ResourceManager.ArmResourceRead<Diagnostic>;
@doc("Creates new or updates existing Diagnostic resource.")
createOrUpdate is Azure.ResourceManager.ArmResourceCreateOrReplaceAsync<Diagnostic>;
@doc("Updates existing Diagnostic resource.")
update is ArmCustomPatchAsync<Diagnostic, PatchModel = DiagnosticUpdate>;
@doc("Deletes specified Diagnostic resource.")
delete is ArmResourceDeleteWithoutOkAsync<Diagnostic>;
@doc("Returns a collection of Diagnostic resources within the resource group.")
listByResourceGroup is Azure.ResourceManager.ArmResourceListByParent<Diagnostic>;
@doc("Lists Diagnostics resources within an Azure subscription.")
listBySubscription is ArmListBySubscription<Diagnostic>;
}