Skip to content

Commit

Permalink
Changes to : Remove deploy action on SolutionInstance object, Add des…
Browse files Browse the repository at this point in the history
…ired 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.
  • Loading branch information
deveshdama authored Dec 20, 2021
1 parent ab4dc8e commit d8f6977
Show file tree
Hide file tree
Showing 9 changed files with 303 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@
"summary": "Create or update the metadata of an Azure Percept account.",
"description": "Create or update the metadata of an Azure Percept account. Performs a full replacement of the editable properties.",
"operationId": "Accounts_CreateOrUpdate",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"Accounts_CreateOrUpdate": {
"$ref": "./examples/Accounts_CreateOrUpdate.json"
Expand Down Expand Up @@ -228,6 +232,12 @@
}
],
"responses": {
"201": {
"description": "The resource was created or updated successfully.",
"schema": {
"$ref": "#/definitions/Account"
}
},
"200": {
"description": "The resource was created or updated successfully.",
"schema": {
Expand All @@ -249,6 +259,10 @@
"summary": "Partially update an existing Azure Percept account",
"description": "Partially update an existing Azure Percept account.",
"operationId": "Accounts_Update",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"Accounts_Update": {
"$ref": "./examples/Accounts_Update.json"
Expand Down Expand Up @@ -278,6 +292,12 @@
}
],
"responses": {
"202": {
"description": "Azure Percept account was successfully updated",
"schema": {
"$ref": "#/definitions/Account"
}
},
"200": {
"description": "Azure Percept account was successfully updated",
"schema": {
Expand Down Expand Up @@ -1532,6 +1552,10 @@
],
"summary": "Create a new solutionInstance in the Azure Percept account under a specific name or update an existing one.",
"operationId": "SolutionInstances_CreateOrUpdate",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"SolutionInstances_CreateOrUpdate": {
"$ref": "./examples/SolutionInstances_CreateOrUpdate.json"
Expand Down Expand Up @@ -1564,6 +1588,12 @@
}
],
"responses": {
"201": {
"description": "The SolutionInstance was successfully created or updated in the account.",
"schema": {
"$ref": "#/definitions/SolutionInstance"
}
},
"200": {
"description": "The SolutionInstance was successfully created or updated in the account.",
"schema": {
Expand All @@ -1584,6 +1614,10 @@
],
"summary": "Partially update an existing solutionInstance inside an Azure Percept account.",
"operationId": "SolutionInstances_Update",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"SolutionInstances_Update": {
"$ref": "./examples/SolutionInstances_Update.json"
Expand Down Expand Up @@ -1616,6 +1650,12 @@
}
],
"responses": {
"202": {
"description": "The SolutionInstance inside the Azure Percept account was successfully updated.",
"schema": {
"$ref": "#/definitions/SolutionInstance"
}
},
"200": {
"description": "The SolutionInstance inside the Azure Percept account was successfully updated.",
"schema": {
Expand All @@ -1636,6 +1676,10 @@
],
"summary": "Delete a solutionInstance from an Azure Percept account.",
"operationId": "SolutionInstances_Delete",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"SolutionInstances_Delete": {
"$ref": "./examples/SolutionInstances_Delete.json"
Expand All @@ -1659,6 +1703,9 @@
}
],
"responses": {
"202": {
"description": "The SolutionInstance was successfully deleted."
},
"200": {
"description": "The SolutionInstance was successfully deleted."
},
Expand All @@ -1674,51 +1721,6 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePercept/accounts/{accountName}/solutioninstances/{solutionInstanceName}/deploy": {
"post": {
"tags": [
"POST"
],
"summary": "Deploy SolutionInstance.",
"operationId": "SolutionInstancesAction_Deploy",
"x-ms-examples": {
"SolutionInstancesAction_Deploy": {
"$ref": "./examples/SolutionInstancesAction_Deploy.json"
}
},
"parameters": [
{
"$ref": "#/parameters/api-version"
},
{
"$ref": "#/parameters/subscriptionId"
},
{
"$ref": "#/parameters/resourceGroupName"
},
{
"$ref": "#/parameters/accountName"
},
{
"$ref": "#/parameters/solutionInstanceName"
}
],
"responses": {
"200": {
"description": "The action was successfully executed.",
"schema": {
"$ref": "#/definitions/SolutionInstanceStatus"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.AzurePercept/checkNameAvailability": {
"post": {
"tags": [
Expand Down Expand Up @@ -1795,8 +1797,9 @@
"description": "Operation name: {provider}/{resource}/{read | write | action | delete}."
},
"isDataAction": {
"description": "Indicates whether the operation is a data action",
"type": "boolean"
"description": "Indicates whether the operation is a data action. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.",
"type": "boolean",
"readOnly": true
},
"display": {
"description": "The operation supported by Azure Percept.",
Expand Down Expand Up @@ -2542,6 +2545,10 @@
"description": "The user provided description.",
"type": "string"
},
"desiredStatus": {
"$ref": "#/definitions/SolutionInstanceStatusDesired",
"description": "The desired status of the SolutionInstance resource."
},
"configurations": {
"description": "Component configurations.",
"type": "array",
Expand Down Expand Up @@ -2576,9 +2583,13 @@
"description": "The user provided description.",
"type": "string"
},
"status": {
"reportedStatus": {
"$ref": "#/definitions/SolutionInstanceStatus",
"description": "The status of the SolutionInstance resource."
"description": "The current status of the SolutionInstance resource."
},
"desiredStatus": {
"$ref": "#/definitions/SolutionInstanceStatusDesired",
"description": "The desired status of the SolutionInstance resource."
},
"accounts": {
"type": "array",
Expand Down Expand Up @@ -2681,6 +2692,35 @@
}
}
},
"SolutionInstanceStatusDesired": {
"description": "Metadata pertaining to desired deployment status of the SolutionInstance.",
"type": "object",
"readOnly": false,
"properties": {
"code": {
"type": "string",
"description": "The desired status code.",
"enum": [
"Active",
"Inactive"
],
"x-ms-enum": {
"name": "code",
"modelAsString": true,
"values": [
{
"value": "Active",
"description": "Solution instance desired deployment status - Active."
},
{
"value": "Inactive",
"description": "Solution instance desired deployment status - Inactive."
}
]
}
}
}
},
"SolutionInstanceStatus": {
"description": "Metadata pertaining to deployment status of the SolutionInstance.",
"type": "object",
Expand All @@ -2690,30 +2730,25 @@
"type": "string",
"description": "The status code.",
"enum": [
"Created",
"Success",
"Failed",
"InProgress"
"Active",
"Inactive",
"Failed"
],
"x-ms-enum": {
"name": "code",
"modelAsString": true,
"values": [
{
"value": "Created",
"description": "Solution instance deployment status - Created."
"value": "Active",
"description": "Solution instance deployment status - Active."
},
{
"value": "Success",
"description": "Solution instance deployment status - Success."
"value": "Inactive",
"description": "Solution instance deployment status - Inactive."
},
{
"value": "Failed",
"description": "Solution instance deployment status - Failed."
},
{
"value": "InProgress",
"description": "Solution instance deployment status - InProgress."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,36 @@
}
}
}
},
"201": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AzurePercept/accounts/myAccount",
"name": "myAccount",
"type": "Microsoft.AzurePercept/accounts",
"sku": {
"name": "F1",
"tier": "Free"
},
"location": "westus",
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2020-01-01T17:18:19.1234567Z",
"lastModifiedBy": "user2",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
},
"tags": {},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"principalId": "00000000-0000-0000-0000-000000000000",
"clientId": "00000000-0000-0000-0000-000000000000"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,36 @@
}
}
}
},
"202": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AzurePercept/accounts/myAccount",
"name": "myAccount",
"type": "Microsoft.AzurePercept/accounts",
"sku": {
"name": "F1",
"tier": "Free"
},
"location": "westus",
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2020-01-01T17:18:19.1234567Z",
"lastModifiedBy": "user2",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
},
"tags": {},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"principalId": "00000000-0000-0000-0000-000000000000",
"clientId": "00000000-0000-0000-0000-000000000000"
}
}
}
}
}
}
}

This file was deleted.

Loading

0 comments on commit d8f6977

Please sign in to comment.