Skip to content

Commit d8f6977

Browse files
authored
Changes to : Remove deploy action on SolutionInstance object, Add desired status on SolutionInstance object, Add async operations for Accounts and SolutionInstance objects. (#5732)
* Changes to : 1. Remove deploy action on SolutionInstance object 2. Add desired status on SolutionInstance object 3. Add async operations for Accounts and SolutionInstance objects. * changes as per the validation checks * fix validation changes * Edit desc for isDataAction in Operation resource * update statuses to be more descriptive. * Changes as per review comments.
1 parent ab4dc8e commit d8f6977

File tree

9 files changed

+303
-93
lines changed

9 files changed

+303
-93
lines changed

specification/azurepercept/resource-manager/Microsoft.AzurePercept/preview/2021-09-01-preview/azurepercept.json

Lines changed: 96 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@
199199
"summary": "Create or update the metadata of an Azure Percept account.",
200200
"description": "Create or update the metadata of an Azure Percept account. Performs a full replacement of the editable properties.",
201201
"operationId": "Accounts_CreateOrUpdate",
202+
"x-ms-long-running-operation": true,
203+
"x-ms-long-running-operation-options": {
204+
"final-state-via": "azure-async-operation"
205+
},
202206
"x-ms-examples": {
203207
"Accounts_CreateOrUpdate": {
204208
"$ref": "./examples/Accounts_CreateOrUpdate.json"
@@ -228,6 +232,12 @@
228232
}
229233
],
230234
"responses": {
235+
"201": {
236+
"description": "The resource was created or updated successfully.",
237+
"schema": {
238+
"$ref": "#/definitions/Account"
239+
}
240+
},
231241
"200": {
232242
"description": "The resource was created or updated successfully.",
233243
"schema": {
@@ -249,6 +259,10 @@
249259
"summary": "Partially update an existing Azure Percept account",
250260
"description": "Partially update an existing Azure Percept account.",
251261
"operationId": "Accounts_Update",
262+
"x-ms-long-running-operation": true,
263+
"x-ms-long-running-operation-options": {
264+
"final-state-via": "azure-async-operation"
265+
},
252266
"x-ms-examples": {
253267
"Accounts_Update": {
254268
"$ref": "./examples/Accounts_Update.json"
@@ -278,6 +292,12 @@
278292
}
279293
],
280294
"responses": {
295+
"202": {
296+
"description": "Azure Percept account was successfully updated",
297+
"schema": {
298+
"$ref": "#/definitions/Account"
299+
}
300+
},
281301
"200": {
282302
"description": "Azure Percept account was successfully updated",
283303
"schema": {
@@ -1532,6 +1552,10 @@
15321552
],
15331553
"summary": "Create a new solutionInstance in the Azure Percept account under a specific name or update an existing one.",
15341554
"operationId": "SolutionInstances_CreateOrUpdate",
1555+
"x-ms-long-running-operation": true,
1556+
"x-ms-long-running-operation-options": {
1557+
"final-state-via": "azure-async-operation"
1558+
},
15351559
"x-ms-examples": {
15361560
"SolutionInstances_CreateOrUpdate": {
15371561
"$ref": "./examples/SolutionInstances_CreateOrUpdate.json"
@@ -1564,6 +1588,12 @@
15641588
}
15651589
],
15661590
"responses": {
1591+
"201": {
1592+
"description": "The SolutionInstance was successfully created or updated in the account.",
1593+
"schema": {
1594+
"$ref": "#/definitions/SolutionInstance"
1595+
}
1596+
},
15671597
"200": {
15681598
"description": "The SolutionInstance was successfully created or updated in the account.",
15691599
"schema": {
@@ -1584,6 +1614,10 @@
15841614
],
15851615
"summary": "Partially update an existing solutionInstance inside an Azure Percept account.",
15861616
"operationId": "SolutionInstances_Update",
1617+
"x-ms-long-running-operation": true,
1618+
"x-ms-long-running-operation-options": {
1619+
"final-state-via": "azure-async-operation"
1620+
},
15871621
"x-ms-examples": {
15881622
"SolutionInstances_Update": {
15891623
"$ref": "./examples/SolutionInstances_Update.json"
@@ -1616,6 +1650,12 @@
16161650
}
16171651
],
16181652
"responses": {
1653+
"202": {
1654+
"description": "The SolutionInstance inside the Azure Percept account was successfully updated.",
1655+
"schema": {
1656+
"$ref": "#/definitions/SolutionInstance"
1657+
}
1658+
},
16191659
"200": {
16201660
"description": "The SolutionInstance inside the Azure Percept account was successfully updated.",
16211661
"schema": {
@@ -1636,6 +1676,10 @@
16361676
],
16371677
"summary": "Delete a solutionInstance from an Azure Percept account.",
16381678
"operationId": "SolutionInstances_Delete",
1679+
"x-ms-long-running-operation": true,
1680+
"x-ms-long-running-operation-options": {
1681+
"final-state-via": "azure-async-operation"
1682+
},
16391683
"x-ms-examples": {
16401684
"SolutionInstances_Delete": {
16411685
"$ref": "./examples/SolutionInstances_Delete.json"
@@ -1659,6 +1703,9 @@
16591703
}
16601704
],
16611705
"responses": {
1706+
"202": {
1707+
"description": "The SolutionInstance was successfully deleted."
1708+
},
16621709
"200": {
16631710
"description": "The SolutionInstance was successfully deleted."
16641711
},
@@ -1674,51 +1721,6 @@
16741721
}
16751722
}
16761723
},
1677-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePercept/accounts/{accountName}/solutioninstances/{solutionInstanceName}/deploy": {
1678-
"post": {
1679-
"tags": [
1680-
"POST"
1681-
],
1682-
"summary": "Deploy SolutionInstance.",
1683-
"operationId": "SolutionInstancesAction_Deploy",
1684-
"x-ms-examples": {
1685-
"SolutionInstancesAction_Deploy": {
1686-
"$ref": "./examples/SolutionInstancesAction_Deploy.json"
1687-
}
1688-
},
1689-
"parameters": [
1690-
{
1691-
"$ref": "#/parameters/api-version"
1692-
},
1693-
{
1694-
"$ref": "#/parameters/subscriptionId"
1695-
},
1696-
{
1697-
"$ref": "#/parameters/resourceGroupName"
1698-
},
1699-
{
1700-
"$ref": "#/parameters/accountName"
1701-
},
1702-
{
1703-
"$ref": "#/parameters/solutionInstanceName"
1704-
}
1705-
],
1706-
"responses": {
1707-
"200": {
1708-
"description": "The action was successfully executed.",
1709-
"schema": {
1710-
"$ref": "#/definitions/SolutionInstanceStatus"
1711-
}
1712-
},
1713-
"default": {
1714-
"description": "Error response describing why the operation failed.",
1715-
"schema": {
1716-
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
1717-
}
1718-
}
1719-
}
1720-
}
1721-
},
17221724
"/subscriptions/{subscriptionId}/providers/Microsoft.AzurePercept/checkNameAvailability": {
17231725
"post": {
17241726
"tags": [
@@ -1795,8 +1797,9 @@
17951797
"description": "Operation name: {provider}/{resource}/{read | write | action | delete}."
17961798
},
17971799
"isDataAction": {
1798-
"description": "Indicates whether the operation is a data action",
1799-
"type": "boolean"
1800+
"description": "Indicates whether the operation is a data action. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.",
1801+
"type": "boolean",
1802+
"readOnly": true
18001803
},
18011804
"display": {
18021805
"description": "The operation supported by Azure Percept.",
@@ -2542,6 +2545,10 @@
25422545
"description": "The user provided description.",
25432546
"type": "string"
25442547
},
2548+
"desiredStatus": {
2549+
"$ref": "#/definitions/SolutionInstanceStatusDesired",
2550+
"description": "The desired status of the SolutionInstance resource."
2551+
},
25452552
"configurations": {
25462553
"description": "Component configurations.",
25472554
"type": "array",
@@ -2576,9 +2583,13 @@
25762583
"description": "The user provided description.",
25772584
"type": "string"
25782585
},
2579-
"status": {
2586+
"reportedStatus": {
25802587
"$ref": "#/definitions/SolutionInstanceStatus",
2581-
"description": "The status of the SolutionInstance resource."
2588+
"description": "The current status of the SolutionInstance resource."
2589+
},
2590+
"desiredStatus": {
2591+
"$ref": "#/definitions/SolutionInstanceStatusDesired",
2592+
"description": "The desired status of the SolutionInstance resource."
25822593
},
25832594
"accounts": {
25842595
"type": "array",
@@ -2681,6 +2692,35 @@
26812692
}
26822693
}
26832694
},
2695+
"SolutionInstanceStatusDesired": {
2696+
"description": "Metadata pertaining to desired deployment status of the SolutionInstance.",
2697+
"type": "object",
2698+
"readOnly": false,
2699+
"properties": {
2700+
"code": {
2701+
"type": "string",
2702+
"description": "The desired status code.",
2703+
"enum": [
2704+
"Active",
2705+
"Inactive"
2706+
],
2707+
"x-ms-enum": {
2708+
"name": "code",
2709+
"modelAsString": true,
2710+
"values": [
2711+
{
2712+
"value": "Active",
2713+
"description": "Solution instance desired deployment status - Active."
2714+
},
2715+
{
2716+
"value": "Inactive",
2717+
"description": "Solution instance desired deployment status - Inactive."
2718+
}
2719+
]
2720+
}
2721+
}
2722+
}
2723+
},
26842724
"SolutionInstanceStatus": {
26852725
"description": "Metadata pertaining to deployment status of the SolutionInstance.",
26862726
"type": "object",
@@ -2690,30 +2730,25 @@
26902730
"type": "string",
26912731
"description": "The status code.",
26922732
"enum": [
2693-
"Created",
2694-
"Success",
2695-
"Failed",
2696-
"InProgress"
2733+
"Active",
2734+
"Inactive",
2735+
"Failed"
26972736
],
26982737
"x-ms-enum": {
26992738
"name": "code",
27002739
"modelAsString": true,
27012740
"values": [
27022741
{
2703-
"value": "Created",
2704-
"description": "Solution instance deployment status - Created."
2742+
"value": "Active",
2743+
"description": "Solution instance deployment status - Active."
27052744
},
27062745
{
2707-
"value": "Success",
2708-
"description": "Solution instance deployment status - Success."
2746+
"value": "Inactive",
2747+
"description": "Solution instance deployment status - Inactive."
27092748
},
27102749
{
27112750
"value": "Failed",
27122751
"description": "Solution instance deployment status - Failed."
2713-
},
2714-
{
2715-
"value": "InProgress",
2716-
"description": "Solution instance deployment status - InProgress."
27172752
}
27182753
]
27192754
}

specification/azurepercept/resource-manager/Microsoft.AzurePercept/preview/2021-09-01-preview/examples/Accounts_CreateOrUpdate.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,36 @@
4848
}
4949
}
5050
}
51+
},
52+
"201": {
53+
"body": {
54+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AzurePercept/accounts/myAccount",
55+
"name": "myAccount",
56+
"type": "Microsoft.AzurePercept/accounts",
57+
"sku": {
58+
"name": "F1",
59+
"tier": "Free"
60+
},
61+
"location": "westus",
62+
"systemData": {
63+
"createdBy": "user1",
64+
"createdByType": "User",
65+
"createdAt": "2020-01-01T17:18:19.1234567Z",
66+
"lastModifiedBy": "user2",
67+
"lastModifiedByType": "User",
68+
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
69+
},
70+
"tags": {},
71+
"identity": {
72+
"type": "UserAssigned",
73+
"userAssignedIdentities": {
74+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
75+
"principalId": "00000000-0000-0000-0000-000000000000",
76+
"clientId": "00000000-0000-0000-0000-000000000000"
77+
}
78+
}
79+
}
80+
}
5181
}
5282
}
5383
}

specification/azurepercept/resource-manager/Microsoft.AzurePercept/preview/2021-09-01-preview/examples/Accounts_Update.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,36 @@
4646
}
4747
}
4848
}
49+
},
50+
"202": {
51+
"body": {
52+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AzurePercept/accounts/myAccount",
53+
"name": "myAccount",
54+
"type": "Microsoft.AzurePercept/accounts",
55+
"sku": {
56+
"name": "F1",
57+
"tier": "Free"
58+
},
59+
"location": "westus",
60+
"systemData": {
61+
"createdBy": "user1",
62+
"createdByType": "User",
63+
"createdAt": "2020-01-01T17:18:19.1234567Z",
64+
"lastModifiedBy": "user2",
65+
"lastModifiedByType": "User",
66+
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
67+
},
68+
"tags": {},
69+
"identity": {
70+
"type": "UserAssigned",
71+
"userAssignedIdentities": {
72+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
73+
"principalId": "00000000-0000-0000-0000-000000000000",
74+
"clientId": "00000000-0000-0000-0000-000000000000"
75+
}
76+
}
77+
}
78+
}
4979
}
5080
}
5181
}

specification/azurepercept/resource-manager/Microsoft.AzurePercept/preview/2021-09-01-preview/examples/SolutionInstancesAction_Deploy.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)