Skip to content

Commit 297a50f

Browse files
committed
update
1 parent f133926 commit 297a50f

8 files changed

Lines changed: 37 additions & 155 deletions

File tree

specification/monitor/resource-manager/Microsoft.Insights/Insights/DiagnosticsSettings/DiagnosticSettingsResource.tsp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface DiagnosticSettingsResources {
3434
get is Extension.Read<
3535
Extension.ScopeParameter,
3636
DiagnosticSettingsResource,
37-
Error = ErrorResponse
37+
Error = Microsoft.Common.ErrorResponse
3838
>;
3939

4040
/**
@@ -46,7 +46,7 @@ interface DiagnosticSettingsResources {
4646
Extension.ScopeParameter,
4747
DiagnosticSettingsResource,
4848
Response = ArmResourceUpdatedResponse<DiagnosticSettingsResource>,
49-
Error = ErrorResponse
49+
Error = Microsoft.Common.ErrorResponse
5050
>;
5151

5252
/**
@@ -56,7 +56,7 @@ interface DiagnosticSettingsResources {
5656
delete is Extension.DeleteSync<
5757
Extension.ScopeParameter,
5858
DiagnosticSettingsResource,
59-
Error = ErrorResponse
59+
Error = Microsoft.Common.ErrorResponse
6060
>;
6161

6262
/**
@@ -67,7 +67,7 @@ interface DiagnosticSettingsResources {
6767
Extension.ScopeParameter,
6868
DiagnosticSettingsResource,
6969
Response = ArmResponse<DiagnosticSettingsResourceCollection>,
70-
Error = ErrorResponse
70+
Error = Microsoft.Common.ErrorResponse
7171
>;
7272
}
7373

specification/monitor/resource-manager/Microsoft.Insights/Insights/DiagnosticsSettings/main.tsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import "./models.tsp";
1515
import "./back-compatible.tsp";
1616
import "./DiagnosticSettingsResource.tsp";
1717
import "./DiagnosticSettingsCategoryResource.tsp";
18+
import "../Common/main.tsp";
1819

1920
using TypeSpec.Rest;
2021
using TypeSpec.Http;

specification/monitor/resource-manager/Microsoft.Insights/Insights/DiagnosticsSettings/models.tsp

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,7 @@ model MetricSettings {
130130
/**
131131
* the retention policy for this category.
132132
*/
133-
retentionPolicy?: RetentionPolicy;
134-
}
135-
136-
/**
137-
* Specifies the retention policy for the log.
138-
*/
139-
model RetentionPolicy {
140-
/**
141-
* a value indicating whether the retention policy is enabled.
142-
*/
143-
enabled: boolean;
144-
145-
/**
146-
* the number of days for the retention in days. A value of 0 will retain the events indefinitely.
147-
*/
148-
@minValue(0)
149-
days: int32;
133+
retentionPolicy?: Microsoft.Common.RetentionPolicy;
150134
}
151135

152136
/**
@@ -171,23 +155,7 @@ model LogSettings {
171155
/**
172156
* the retention policy for this log.
173157
*/
174-
retentionPolicy?: RetentionPolicy;
175-
}
176-
177-
/**
178-
* Describes the format of Error response.
179-
*/
180-
@error
181-
model ErrorResponse {
182-
/**
183-
* Error code
184-
*/
185-
code?: string;
186-
187-
/**
188-
* Error message indicating why the operation failed.
189-
*/
190-
message?: string;
158+
retentionPolicy?: Microsoft.Common.RetentionPolicy;
191159
}
192160

193161
/**

specification/monitor/resource-manager/Microsoft.Insights/Insights/TenantActionGroups/main.tsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import "@azure-tools/typespec-azure-resource-manager";
1414
import "./models.tsp";
1515
import "./back-compatible.tsp";
1616
import "./TenantActionGroupResource.tsp";
17+
import "../Common/main.tsp";
1718

1819
using TypeSpec.Rest;
1920
using TypeSpec.Http;

specification/monitor/resource-manager/Microsoft.Insights/Insights/TenantActionGroups/models.tsp

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -205,57 +205,6 @@ model VoiceReceiver {
205205
phoneNumber: string;
206206
}
207207

208-
/**
209-
* An azure resource object
210-
*/
211-
model AzureResource {
212-
/**
213-
* Azure resource Id
214-
*/
215-
@visibility(Lifecycle.Read)
216-
id?: string;
217-
218-
/**
219-
* Azure resource name
220-
*/
221-
@visibility(Lifecycle.Read)
222-
name?: string;
223-
224-
/**
225-
* Azure resource type
226-
*/
227-
@visibility(Lifecycle.Read)
228-
type?: string;
229-
230-
/**
231-
* Resource location
232-
*/
233-
@visibility(Lifecycle.Read, Lifecycle.Create)
234-
location: string;
235-
236-
/**
237-
* Resource tags
238-
*/
239-
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
240-
tags?: Record<string>;
241-
}
242-
243-
/**
244-
* Describes the format of Error response.
245-
*/
246-
@error
247-
model ErrorResponse {
248-
/**
249-
* Error code
250-
*/
251-
code?: string;
252-
253-
/**
254-
* Error message indicating why the operation failed.
255-
*/
256-
message?: string;
257-
}
258-
259208
/**
260209
* A tenant action group object for the body of patch operations.
261210
*/

specification/monitor/resource-manager/Microsoft.Insights/Insights/VmInsightsOnboarding/models.tsp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -116,29 +116,6 @@ model WorkspaceInfoProperties {
116116
customerId: string;
117117
}
118118

119-
/**
120-
* An azure resource object
121-
*/
122-
model ProxyResource {
123-
/**
124-
* Azure resource Id
125-
*/
126-
@visibility(Lifecycle.Read)
127-
id?: string;
128-
129-
/**
130-
* Azure resource name
131-
*/
132-
@visibility(Lifecycle.Read)
133-
name?: string;
134-
135-
/**
136-
* Azure resource type
137-
*/
138-
@visibility(Lifecycle.Read)
139-
type?: string;
140-
}
141-
142119
/**
143120
* An error response from the API.
144121
*/

specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2021-05-01-preview/openapi.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"default": {
7878
"description": "An unexpected error response.",
7979
"schema": {
80-
"$ref": "#/definitions/ErrorResponse"
80+
"$ref": "#/definitions/Microsoft.Common.ErrorResponse"
8181
}
8282
}
8383
},
@@ -131,7 +131,7 @@
131131
"default": {
132132
"description": "An unexpected error response.",
133133
"schema": {
134-
"$ref": "#/definitions/ErrorResponse"
134+
"$ref": "#/definitions/Microsoft.Common.ErrorResponse"
135135
}
136136
}
137137
},
@@ -189,7 +189,7 @@
189189
"default": {
190190
"description": "An unexpected error response.",
191191
"schema": {
192-
"$ref": "#/definitions/ErrorResponse"
192+
"$ref": "#/definitions/Microsoft.Common.ErrorResponse"
193193
}
194194
}
195195
},
@@ -238,7 +238,7 @@
238238
"default": {
239239
"description": "An unexpected error response.",
240240
"schema": {
241-
"$ref": "#/definitions/ErrorResponse"
241+
"$ref": "#/definitions/Microsoft.Common.ErrorResponse"
242242
}
243243
}
244244
},
@@ -279,7 +279,7 @@
279279
"default": {
280280
"description": "An unexpected error response.",
281281
"schema": {
282-
"$ref": "#/definitions/ErrorResponse"
282+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
283283
}
284284
}
285285
},
@@ -330,7 +330,7 @@
330330
"default": {
331331
"description": "An unexpected error response.",
332332
"schema": {
333-
"$ref": "#/definitions/ErrorResponse"
333+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
334334
}
335335
}
336336
},
@@ -498,20 +498,6 @@
498498
}
499499
}
500500
},
501-
"ErrorResponse": {
502-
"type": "object",
503-
"description": "Describes the format of Error response.",
504-
"properties": {
505-
"code": {
506-
"type": "string",
507-
"description": "Error code"
508-
},
509-
"message": {
510-
"type": "string",
511-
"description": "Error message indicating why the operation failed."
512-
}
513-
}
514-
},
515501
"LogSettings": {
516502
"type": "object",
517503
"description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.",
@@ -529,7 +515,7 @@
529515
"description": "a value indicating whether this log is enabled."
530516
},
531517
"retentionPolicy": {
532-
"$ref": "#/definitions/RetentionPolicy",
518+
"$ref": "#/definitions/Microsoft.Common.RetentionPolicy",
533519
"description": "the retention policy for this log."
534520
}
535521
},
@@ -555,15 +541,29 @@
555541
"description": "a value indicating whether this category is enabled."
556542
},
557543
"retentionPolicy": {
558-
"$ref": "#/definitions/RetentionPolicy",
544+
"$ref": "#/definitions/Microsoft.Common.RetentionPolicy",
559545
"description": "the retention policy for this category."
560546
}
561547
},
562548
"required": [
563549
"enabled"
564550
]
565551
},
566-
"RetentionPolicy": {
552+
"Microsoft.Common.ErrorResponse": {
553+
"type": "object",
554+
"description": "Describes the format of Error response.",
555+
"properties": {
556+
"code": {
557+
"type": "string",
558+
"description": "Error code"
559+
},
560+
"message": {
561+
"type": "string",
562+
"description": "Error message indicating why the operation failed."
563+
}
564+
}
565+
},
566+
"Microsoft.Common.RetentionPolicy": {
567567
"type": "object",
568568
"description": "Specifies the retention policy for the log.",
569569
"properties": {

specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2023-05-01-preview/tenantActionGroups.json

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"default": {
7575
"description": "An unexpected error response.",
7676
"schema": {
77-
"$ref": "#/definitions/ErrorResponse"
77+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
7878
}
7979
}
8080
},
@@ -132,7 +132,7 @@
132132
"default": {
133133
"description": "An unexpected error response.",
134134
"schema": {
135-
"$ref": "#/definitions/ErrorResponse"
135+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
136136
}
137137
}
138138
},
@@ -200,7 +200,7 @@
200200
"default": {
201201
"description": "An unexpected error response.",
202202
"schema": {
203-
"$ref": "#/definitions/ErrorResponse"
203+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
204204
}
205205
}
206206
},
@@ -262,7 +262,7 @@
262262
"default": {
263263
"description": "An unexpected error response.",
264264
"schema": {
265-
"$ref": "#/definitions/ErrorResponse"
265+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
266266
}
267267
}
268268
},
@@ -315,7 +315,7 @@
315315
"default": {
316316
"description": "An unexpected error response.",
317317
"schema": {
318-
"$ref": "#/definitions/ErrorResponse"
318+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
319319
}
320320
}
321321
},
@@ -459,7 +459,7 @@
459459
"default": {
460460
"description": "An unexpected error response.",
461461
"schema": {
462-
"$ref": "#/definitions/ErrorResponse"
462+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
463463
}
464464
}
465465
},
@@ -591,20 +591,6 @@
591591
"emailAddress"
592592
]
593593
},
594-
"ErrorResponse": {
595-
"type": "object",
596-
"description": "Describes the format of Error response.",
597-
"properties": {
598-
"code": {
599-
"type": "string",
600-
"description": "Error code"
601-
},
602-
"message": {
603-
"type": "string",
604-
"description": "Error message indicating why the operation failed."
605-
}
606-
}
607-
},
608594
"ReceiverStatus": {
609595
"type": "string",
610596
"description": "Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications.",

0 commit comments

Comments
 (0)