Skip to content

Commit cc7ba44

Browse files
RaviRavi Yadav
Ravi
and
Ravi Yadav
authored
Add swagger definitions for deletedAutomationAccounts resource type (Azure#17169)
* add swagger definitions for deletedAutomationAccounts resource type * fix semantic and model validation error * fix model validation error * fix date format and schema type * fix lint diff error * fix paths * fix lint diff * remove errorresponse schema * add errorresponse schema * add reference in readme * supress error schema * fix URI path to return list of deleted accounts * remove automation account name parameter Co-authored-by: Ravi Yadav <[email protected]>
1 parent a82659d commit cc7ba44

File tree

3 files changed

+214
-0
lines changed

3 files changed

+214
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "AutomationManagement",
5+
"version": "2022-01-31",
6+
"x-ms-code-generation-settings": {
7+
"useDateTimeOffset": true
8+
}
9+
},
10+
"host": "management.azure.com",
11+
"schemes": [
12+
"https"
13+
],
14+
"consumes": [
15+
"application/json"
16+
],
17+
"produces": [
18+
"application/json"
19+
],
20+
"security": [
21+
{
22+
"azure_auth": [
23+
"user_impersonation"
24+
]
25+
}
26+
],
27+
"securityDefinitions": {
28+
"azure_auth": {
29+
"type": "oauth2",
30+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
31+
"flow": "implicit",
32+
"description": "Azure Active Directory OAuth2 Flow",
33+
"scopes": {
34+
"user_impersonation": "impersonate your user account"
35+
}
36+
}
37+
},
38+
"paths": {
39+
"/subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts": {
40+
"get": {
41+
"tags": [
42+
"DeletedAutomationAccounts"
43+
],
44+
"operationId": "deletedAutomationAccounts_ListBySubscription",
45+
"description": "Retrieve deleted automation account.",
46+
"x-ms-examples": {
47+
"Get deleted automation account": {
48+
"$ref": "./examples/getDeletedAutomationAccount.json"
49+
}
50+
},
51+
"parameters": [
52+
{
53+
"$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter"
54+
},
55+
{
56+
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
57+
}
58+
],
59+
"responses": {
60+
"200": {
61+
"description": "OK",
62+
"schema": {
63+
"$ref": "#/definitions/DeletedAutomationAccountListResult"
64+
}
65+
},
66+
"default": {
67+
"description": "Automation error response describing why the operation failed.",
68+
"schema": {
69+
"$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
70+
}
71+
}
72+
}
73+
}
74+
}
75+
},
76+
"definitions": {
77+
"DeletedAutomationAccountListResult": {
78+
"type": "object",
79+
"properties": {
80+
"value": {
81+
"type": "array",
82+
"items": {
83+
"$ref": "#/definitions/DeletedAutomationAccount"
84+
},
85+
"description": "Gets or sets the list of deleted automation accounts."
86+
}
87+
},
88+
"description": "The response model for the list deleted automation account."
89+
},
90+
"DeletedAutomationAccount": {
91+
"type": "object",
92+
"properties": {
93+
"properties": {
94+
"$ref": "#/definitions/DeletedAutomationAccountProperties",
95+
"x-ms-client-flatten": true,
96+
"description": "Gets or sets the automation account properties."
97+
},
98+
"id": {
99+
"description": "The resource id.",
100+
"type": "string"
101+
},
102+
"name": {
103+
"type": "string",
104+
"description": "Gets or sets name of the resource."
105+
},
106+
"type": {
107+
"type": "string",
108+
"description": "The resource type."
109+
},
110+
"location": {
111+
"type": "string",
112+
"description": "Gets or sets the location of the resource."
113+
}
114+
},
115+
"description": "Definition of the deleted automation account type."
116+
},
117+
"DeletedAutomationAccountProperties": {
118+
"type": "object",
119+
"properties": {
120+
"automationAccountResourceId": {
121+
"type": "string",
122+
"description": "Gets or sets the Automation Account Resource Id."
123+
},
124+
"automationAccountId": {
125+
"type": "string",
126+
"description": "Gets or sets the Automation Account Id."
127+
},
128+
"location": {
129+
"type": "string",
130+
"description": "Gets or sets the location of the resource."
131+
},
132+
"deletedTime": {
133+
"type": "string",
134+
"format": "date-time",
135+
"readOnly": true,
136+
"description": "Gets the creation time.",
137+
"x-nullable": false
138+
}
139+
},
140+
"description": "Definition of the deleted automation account properties."
141+
}
142+
},
143+
"parameters": {}
144+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "subid",
4+
"api-version": "2022-01-31"
5+
},
6+
"responses": {
7+
"200": {
8+
"headers": {},
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/subscriptions/subid/resourceGroups/msitest/providers/Microsoft.Automation/deletedAutomationAccounts/myAutomationAccount",
13+
"name": "myAutomationAccount",
14+
"type": "Microsoft.Automation/deletedAutomationAccounts",
15+
"location": "westus",
16+
"properties": {
17+
"automationAccountResourceId": "/subscriptions/subid/resourceGroups/msitest/providers/Microsoft.Automation/automationAccounts/myAutomationAccount",
18+
"automationAccountId": "cb855f13-0223-4fe4-8260-9e6583dfef24",
19+
"location": "westus",
20+
"deletedTime": "2018-04-24T16:30:55+00:00"
21+
}
22+
}
23+
]
24+
}
25+
}
26+
}
27+
}

specification/automation/resource-manager/readme.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,46 @@ input-file:
271271
- Microsoft.Automation/stable/2021-06-22/hybridRunbookWorker.json
272272
```
273273

274+
### Tag: package-2022-01-31
275+
276+
These settings apply only when `--tag=package-2022-01-31` is specified on the command line.
277+
278+
``` yaml $(tag) == 'package-2022-01-31'
279+
input-file:
280+
- Microsoft.Automation/preview/2020-01-13-preview/privateEndpointConnection.json
281+
- Microsoft.Automation/preview/2020-01-13-preview/privateLinkResources.json
282+
- Microsoft.Automation/preview/2020-01-13-preview/python2package.json
283+
- Microsoft.Automation/preview/2020-01-13-preview/dscNode.json
284+
- Microsoft.Automation/preview/2020-01-13-preview/dscNodeConfiguration.json
285+
- Microsoft.Automation/preview/2020-01-13-preview/dscCompilationJob.json
286+
- Microsoft.Automation/preview/2020-01-13-preview/dscNodeCounts.json
287+
- Microsoft.Automation/preview/2020-01-13-preview/sourceControl.json
288+
- Microsoft.Automation/preview/2020-01-13-preview/sourceControlSyncJob.json
289+
- Microsoft.Automation/preview/2020-01-13-preview/sourceControlSyncJobStreams.json
290+
- Microsoft.Automation/stable/2021-06-22/account.json
291+
- Microsoft.Automation/preview/2020-01-13-preview/certificate.json
292+
- Microsoft.Automation/preview/2020-01-13-preview/connection.json
293+
- Microsoft.Automation/preview/2020-01-13-preview/connectionType.json
294+
- Microsoft.Automation/preview/2020-01-13-preview/credential.json
295+
- Microsoft.Automation/stable/2021-06-22/hybridRunbookWorkerGroup.json
296+
- Microsoft.Automation/preview/2020-01-13-preview/jobSchedule.json
297+
- Microsoft.Automation/preview/2020-01-13-preview/linkedWorkspace.json
298+
- Microsoft.Automation/preview/2020-01-13-preview/module.json
299+
- Microsoft.Automation/preview/2020-01-13-preview/schedule.json
300+
- Microsoft.Automation/preview/2020-01-13-preview/variable.json
301+
- Microsoft.Automation/preview/2020-01-13-preview/watcher.json
302+
- Microsoft.Automation/stable/2019-06-01/dscConfiguration.json
303+
- Microsoft.Automation/stable/2019-06-01/job.json
304+
- Microsoft.Automation/stable/2021-06-22/operations.json
305+
- Microsoft.Automation/stable/2019-06-01/softwareUpdateConfiguration.json
306+
- Microsoft.Automation/stable/2019-06-01/softwareUpdateConfigurationRun.json
307+
- Microsoft.Automation/stable/2019-06-01/softwareUpdateConfigurationMachineRun.json
308+
- Microsoft.Automation/stable/2018-06-30/runbook.json
309+
- Microsoft.Automation/stable/2015-10-31/webhook.json
310+
- Microsoft.Automation/stable/2021-06-22/hybridRunbookWorker.json
311+
- Microsoft.Automation/stable/2022-01-31/deletedAutomationAccount.json
312+
```
313+
274314
---
275315
## Suppression
276316
``` yaml
@@ -311,6 +351,9 @@ directive:
311351
- suppress: RequiredPropertiesMissingInResourceModel
312352
from: hybridRunbookWorkerGroup.json
313353
reason: This body format is already part of the previous api, cannot change it as it will result in breaking change.
354+
- suppress: DefaultErrorResponseSchema
355+
from: deletedAutomationAccount.json
356+
reason: This error format is already part of the previous api, cannot change it as it will result in breaking change.
314357
```
315358

316359
---

0 commit comments

Comments
 (0)