-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathConfigTemplate.tsp
More file actions
147 lines (121 loc) · 4.04 KB
/
Copy pathConfigTemplate.tsp
File metadata and controls
147 lines (121 loc) · 4.04 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "./ProvisioningState.tsp";
import "./UpdateType.tsp";
import "./ConfigTemplateVersion.tsp";
import "./VersionParameter.tsp";
import "./RemoveVersionResponse.tsp";
using TypeSpec.OpenAPI;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
namespace Microsoft.Edge;
@doc("Config Template Properties")
model ConfigTemplateProperties {
@added(Versions.v2025_06_01)
@doc("A unique identifier for the config template, generated by the system")
@visibility(Lifecycle.Read)
uniqueIdentifier?: string;
@doc("Description of config template")
description: string;
@doc("Latest config template version")
@visibility(Lifecycle.Read)
latestVersion?: string;
@doc("Provisioning state of resource")
@visibility(Lifecycle.Read)
provisioningState?: ProvisioningState;
}
@doc("The updatable properties of the ConfigTemplate.")
model ConfigTemplateUpdateProperties {
@doc("Description of config template")
description?: string;
}
@doc("The type used for update operations of the ConfigTemplate.")
model ConfigTemplateUpdate {
...ArmTagsProperty;
@doc("The resource-specific properties for this resource.")
properties?: ConfigTemplateUpdateProperties;
}
@doc("Config Template Resource. Contains configuration expressions using the predefined expression language.")
model ConfigTemplate
is Azure.ResourceManager.TrackedResource<ConfigTemplateProperties> {
...ResourceNameParameter<ConfigTemplate>;
...EntityTagProperty;
}
@doc("Config Template Version With Update Type")
model ConfigTemplateVersionWithUpdateType {
@doc("Update type")
updateType?: UpdateType;
@doc("Version to create")
@pattern("^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$")
version?: string;
@doc("Config Template Version")
configTemplateVersion: ConfigTemplateVersion;
}
@added(Versions.v2025_08_01)
@doc("Hierarchy Ids With Level for applying config Template which will further generate ARG objects")
model HierarchySelector {
@doc("Context Id")
contextId: Azure.Core.armResourceIdentifier<[
{
type: "Microsoft.Edge/Contexts";
}
]>;
@doc("Hierarchy Ids")
hierarchyIds?: Azure.Core.armResourceIdentifier<[
{
type: "Microsoft.Edge/Targets";
},
{
type: "Microsoft.Edge/Sites";
}
]>[];
@doc("Hierarchy Level")
level?: string;
}
@armResourceOperations
interface ConfigTemplates {
@doc("Get a Config Template Resource")
get is ArmResourceRead<ConfigTemplate>;
@doc("Create or update a Config Template Resource")
createOrUpdate is ArmResourceCreateOrReplaceAsync<ConfigTemplate>;
@doc("update a Config Template Resource")
update is ArmCustomPatchSync<ConfigTemplate, ConfigTemplateUpdate>;
@added(Versions.v2025_08_01)
@doc("Apply a Config Template to a particular hierarchy node")
linkToHierarchies is ArmResourceActionNoResponseContentAsync<
ConfigTemplate,
HierarchySelector
>;
@added(Versions.v2025_08_01)
@doc("Remove a Config Template from a particular hierarchy node")
unLinkFromHierarchies is ArmResourceActionNoResponseContentAsync<
ConfigTemplate,
HierarchySelector
>;
@doc("Create or update a Config Template Version Resource with the specified UpdateType")
createVersion is ArmResourceActionAsync<
ConfigTemplate,
ConfigTemplateVersionWithUpdateType,
ConfigTemplateVersion
>;
@doc("Remove Config Template Version Resource")
removeVersion is ArmResourceActionSync<
ConfigTemplate,
VersionParameter,
RemoveVersionResponse
>;
@doc("Delete a Config Template Resource")
delete is ArmResourceDeleteWithoutOkAsync<ConfigTemplate>;
@doc("List by specified resource group")
listByResourceGroup is ArmResourceListByParent<ConfigTemplate>;
@doc("List by subscription")
listBySubscription is ArmListBySubscription<ConfigTemplate>;
}