-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathmodels.tsp
More file actions
357 lines (270 loc) · 9.75 KB
/
Copy pathmodels.tsp
File metadata and controls
357 lines (270 loc) · 9.75 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
import "@azure-tools/typespec-client-generator-core";
import "@typespec/versioning";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using TypeSpec.Versioning;
namespace Microsoft.CodeSigning;
interface Operations extends Azure.ResourceManager.Operations {}
@doc("The status of the current operation.")
union ProvisioningState {
string,
@doc("Resource has been created.")
Succeeded: "Succeeded",
@doc("Resource creation failed.")
Failed: "Failed",
@doc("Resource creation was canceled.")
Canceled: "Canceled",
@doc("Updating in progress.")
Updating: "Updating",
@doc("Deletion in progress.")
Deleting: "Deleting",
@doc("Resource creation started.")
Accepted: "Accepted",
}
@doc("Type of the certificate")
union ProfileType {
string,
@doc("Used for signing files which are distributed publicly.")
PublicTrust: "PublicTrust",
@doc("Used for signing files which are distributed internally within organization or group boundary.")
PrivateTrust: "PrivateTrust",
@doc("Used for signing CI policy files.")
PrivateTrustCIPolicy: "PrivateTrustCIPolicy",
@doc("Used for signing files which are run in secure vbs enclave.")
VBSEnclave: "VBSEnclave",
@doc("Used for signing files for testing purpose.")
PublicTrustTest: "PublicTrustTest",
}
@doc("Status of the certificate profiles.")
union CertificateProfileStatus {
string,
@doc("The certificate profile is active.")
Active: "Active",
@doc("The certificate profile is disabled.")
Disabled: "Disabled",
@doc("The certificate profile is suspended.")
Suspended: "Suspended",
}
@doc("Status of the certificate")
union CertificateStatus {
string,
@doc("The certificate is active.")
Active: "Active",
@doc("The certificate is expired.")
Expired: "Expired",
@doc("The certificate is revoked.")
Revoked: "Revoked",
}
@doc("Revocation status of the certificate.")
union RevocationStatus {
string,
@doc("Certificate revocation succeeded.")
Succeeded: "Succeeded",
@doc("Certificate revocation is in progress.")
InProgress: "InProgress",
@doc("Certificate revocation failed.")
Failed: "Failed",
}
@doc("Name of the sku.")
union SkuName {
string,
@doc("Basic sku.")
Basic: "Basic",
@doc("Premium sku.")
Premium: "Premium",
}
@doc("The reason that an artifact signing account name could not be used. The Reason element is only returned if nameAvailable is false.")
union NameUnavailabilityReason {
string,
@doc("Account name is invalid")
AccountNameInvalid: "AccountNameInvalid",
@doc("Account name already exists")
AlreadyExists: "AlreadyExists",
}
@doc("Properties of the artifact signing account.")
model CodeSigningAccountProperties {
@doc("The URI of the artifact signing account which is used during signing files.")
@visibility(Lifecycle.Read)
accountUri?: string;
@doc("SKU of the artifact signing account.")
sku?: AccountSku;
@doc("Status of the current operation on artifact signing account.")
@visibility(Lifecycle.Read)
provisioningState?: ProvisioningState;
}
@doc("SKU of the artifact signing account.")
model AccountSku {
@doc("Name of the SKU.")
name: SkuName;
}
@doc("Parameters for creating or updating an artifact signing account.")
model CodeSigningAccountPatch {
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "existing API"
@doc("Resource tags.")
tags?: Record<string>;
@doc("Properties of the artifact signing account.")
properties?: CodeSigningAccountPatchProperties;
}
@doc("Properties of the artifact signing account.")
model CodeSigningAccountPatchProperties {
@doc("SKU of the artifact signing account.")
@typeChangedFrom(Versions.v2024_09_30_preview, AccountSku)
sku?: AccountSkuPatch;
}
@doc("SKU of the artifact signing account.")
@added(Versions.v2024_09_30_preview)
model AccountSkuPatch {
@doc("Name of the SKU.")
name?: SkuName;
}
@doc("Properties of the certificate profile.")
model CertificateProfileProperties {
@doc("Profile type of the certificate.")
profileType: ProfileType;
@removed(Versions.v2024_09_30_preview)
@doc("Used as CN in the certificate subject name.")
@visibility(Lifecycle.Read)
commonName?: string;
@removed(Versions.v2024_09_30_preview)
@doc("Used as O in the certificate subject name.")
@visibility(Lifecycle.Read)
organization?: string;
@removed(Versions.v2024_09_30_preview)
@doc("Used as OU in the private trust certificate subject name.")
@visibility(Lifecycle.Read)
organizationUnit?: string;
@removed(Versions.v2024_09_30_preview)
@doc("Used as STREET in the certificate subject name.")
@visibility(Lifecycle.Read)
streetAddress?: string;
@doc("Whether to include STREET in the certificate subject name.")
includeStreetAddress?: boolean = false;
@removed(Versions.v2024_09_30_preview)
@doc("Used as L in the certificate subject name.")
@visibility(Lifecycle.Read)
city?: string;
@doc("Whether to include L in the certificate subject name. Applicable only for private trust, private trust ci profile types")
includeCity?: boolean = false;
@removed(Versions.v2024_09_30_preview)
@doc("Used as S in the certificate subject name.")
@visibility(Lifecycle.Read)
state?: string;
@doc("Whether to include S in the certificate subject name. Applicable only for private trust, private trust ci profile types")
includeState?: boolean = false;
@removed(Versions.v2024_09_30_preview)
@doc("Used as C in the certificate subject name.")
@visibility(Lifecycle.Read)
country?: string;
@doc("Whether to include C in the certificate subject name. Applicable only for private trust, private trust ci profile types")
includeCountry?: boolean = false;
@removed(Versions.v2024_09_30_preview)
@doc("Used as PC in the certificate subject name.")
@visibility(Lifecycle.Read)
postalCode?: string;
@doc("Whether to include PC in the certificate subject name.")
includePostalCode?: boolean = false;
@removed(Versions.v2024_09_30_preview)
@doc("Enhanced key usage of the certificate.")
@visibility(Lifecycle.Read)
enhancedKeyUsage?: string;
@doc("Identity validation id used for the certificate subject name.")
@madeRequired(Versions.v2024_09_30_preview)
identityValidationId: string;
@doc("Indicates whether the resource is intended for a specific usage scenario.")
@added(Versions.v2026_05_15_preview)
programType?: string;
@doc("Status of the current operation on certificate profile.")
@visibility(Lifecycle.Read)
provisioningState?: ProvisioningState;
@doc("Status of the certificate profile.")
@visibility(Lifecycle.Read)
status?: CertificateProfileStatus;
@doc("List of renewed certificates.")
@visibility(Lifecycle.Read)
@identifiers(#[])
certificates?: Certificate[];
}
@doc("Properties of the certificate.")
model Certificate {
@doc("Serial number of the certificate.")
serialNumber?: string;
@doc("Enhanced key usage of the certificate.")
@added(Versions.v2024_09_30_preview)
enhancedKeyUsage?: string;
@doc("Subject name of the certificate.")
subjectName?: string;
@doc("Thumbprint of the certificate.")
thumbprint?: string;
@doc("Certificate created date.")
createdDate?: string;
@doc("Certificate expiry date.")
expiryDate?: string;
@doc("Status of the certificate.")
status?: CertificateStatus;
@doc("Revocations history of a certificate.")
revocation?: Revocation;
}
@doc("Revocation details of the certificate.")
model Revocation {
@doc("The timestamp when the revocation is requested.")
requestedAt?: utcDateTime;
@doc("The timestamp when the revocation is effective.")
effectiveAt?: utcDateTime;
@doc("Reason for revocation.")
reason?: string;
@doc("Remarks for the revocation.")
remarks?: string;
@doc("Status of the revocation.")
status?: RevocationStatus;
@doc("Reason for the revocation failure.")
failureReason?: string;
}
@doc("Defines the certificate revocation properties.")
model RevokeCertificate {
@doc("Serial number of the certificate.")
serialNumber: string;
@doc("Thumbprint of the certificate.")
thumbprint: string;
// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario.
@doc("The timestamp when the revocation is effective.")
effectiveAt: utcDateTime;
@doc("Reason for the revocation.")
reason: string;
@doc("Remarks for the revocation.")
remarks?: string;
}
@doc("Defines the list of certificates for revocation in certificate profile.")
@added(Versions.v2026_05_15_preview)
model RevokeCertificateList {
@doc("List of certificates to be revoked in a certificate profile.")
@identifiers(#[])
revokeCertificates: RevokeCertificate[];
}
@doc("The parameters used to check the availability of the artifact signing account name.")
model CheckNameAvailability {
@doc("The type of the resource, \"Microsoft.CodeSigning/codeSigningAccounts\".")
type: string;
@doc("Artifact signing account name.")
name: string;
}
@doc("The CheckNameAvailability operation response.")
model CheckNameAvailabilityResult {
@doc("A boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.")
@visibility(Lifecycle.Read)
nameAvailable?: boolean;
@doc("The reason that an artifact signing account name could not be used. The Reason element is only returned if nameAvailable is false.")
@visibility(Lifecycle.Read)
reason?: NameUnavailabilityReason;
@doc("An error message explaining the Reason value in more detail.")
@visibility(Lifecycle.Read)
message?: string;
}