-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add swagger definitions for deletedAutomationAccounts resource type (#…
…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]>
- Loading branch information
Showing
3 changed files
with
214 additions
and
0 deletions.
There are no files selected for viewing
144 changes: 144 additions & 0 deletions
144
...ion/resource-manager/Microsoft.Automation/stable/2022-01-31/deletedAutomationAccount.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "AutomationManagement", | ||
"version": "2022-01-31", | ||
"x-ms-code-generation-settings": { | ||
"useDateTimeOffset": true | ||
} | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"flow": "implicit", | ||
"description": "Azure Active Directory OAuth2 Flow", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts": { | ||
"get": { | ||
"tags": [ | ||
"DeletedAutomationAccounts" | ||
], | ||
"operationId": "deletedAutomationAccounts_ListBySubscription", | ||
"description": "Retrieve deleted automation account.", | ||
"x-ms-examples": { | ||
"Get deleted automation account": { | ||
"$ref": "./examples/getDeletedAutomationAccount.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/DeletedAutomationAccountListResult" | ||
} | ||
}, | ||
"default": { | ||
"description": "Automation error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"DeletedAutomationAccountListResult": { | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/DeletedAutomationAccount" | ||
}, | ||
"description": "Gets or sets the list of deleted automation accounts." | ||
} | ||
}, | ||
"description": "The response model for the list deleted automation account." | ||
}, | ||
"DeletedAutomationAccount": { | ||
"type": "object", | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/DeletedAutomationAccountProperties", | ||
"x-ms-client-flatten": true, | ||
"description": "Gets or sets the automation account properties." | ||
}, | ||
"id": { | ||
"description": "The resource id.", | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "Gets or sets name of the resource." | ||
}, | ||
"type": { | ||
"type": "string", | ||
"description": "The resource type." | ||
}, | ||
"location": { | ||
"type": "string", | ||
"description": "Gets or sets the location of the resource." | ||
} | ||
}, | ||
"description": "Definition of the deleted automation account type." | ||
}, | ||
"DeletedAutomationAccountProperties": { | ||
"type": "object", | ||
"properties": { | ||
"automationAccountResourceId": { | ||
"type": "string", | ||
"description": "Gets or sets the Automation Account Resource Id." | ||
}, | ||
"automationAccountId": { | ||
"type": "string", | ||
"description": "Gets or sets the Automation Account Id." | ||
}, | ||
"location": { | ||
"type": "string", | ||
"description": "Gets or sets the location of the resource." | ||
}, | ||
"deletedTime": { | ||
"type": "string", | ||
"format": "date-time", | ||
"readOnly": true, | ||
"description": "Gets the creation time.", | ||
"x-nullable": false | ||
} | ||
}, | ||
"description": "Definition of the deleted automation account properties." | ||
} | ||
}, | ||
"parameters": {} | ||
} |
27 changes: 27 additions & 0 deletions
27
...-manager/Microsoft.Automation/stable/2022-01-31/examples/getDeletedAutomationAccount.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "subid", | ||
"api-version": "2022-01-31" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/subid/resourceGroups/msitest/providers/Microsoft.Automation/deletedAutomationAccounts/myAutomationAccount", | ||
"name": "myAutomationAccount", | ||
"type": "Microsoft.Automation/deletedAutomationAccounts", | ||
"location": "westus", | ||
"properties": { | ||
"automationAccountResourceId": "/subscriptions/subid/resourceGroups/msitest/providers/Microsoft.Automation/automationAccounts/myAutomationAccount", | ||
"automationAccountId": "cb855f13-0223-4fe4-8260-9e6583dfef24", | ||
"location": "westus", | ||
"deletedTime": "2018-04-24T16:30:55+00:00" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters