Skip to content

Commit 7525002

Browse files
DevinwongDevin Wong
andauthored
Devinwon update solutions and solutioninstances (#5546)
* update solutions and solution instances schemas * added x-ms-examples in Operations_Get * remove status from solution instance schema * fix Model Validation error * fix prettier errors Co-authored-by: Devin Wong <[email protected]>
1 parent b411e21 commit 7525002

File tree

4 files changed

+106
-55
lines changed

4 files changed

+106
-55
lines changed

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

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
},
6363
"x-ms-pageable": {
6464
"nextLinkName": "nextLink"
65+
},
66+
"x-ms-examples": {
67+
"Operations_Get": {
68+
"$ref": "./examples/Operations_Get.json"
69+
}
6570
}
6671
}
6772
},
@@ -1968,17 +1973,6 @@
19681973
"properties": {
19691974
"x-ms-client-flatten": true,
19701975
"description": "Azure Percept Solution editable properties.",
1971-
"$ref": "#/definitions/SolutionEditableProperties"
1972-
}
1973-
}
1974-
},
1975-
"SolutionEditableProperties": {
1976-
"description": "Editable properties of a Solution inside the Azure Percept account.",
1977-
"type": "object",
1978-
"properties": {
1979-
"properties": {
1980-
"description": "The properties of a Solution linked to the Azure Percept account.",
1981-
"x-ms-client-flatten": true,
19821976
"$ref": "#/definitions/SolutionProperties"
19831977
}
19841978
}
@@ -2027,9 +2021,7 @@
20272021
"capabilities": {
20282022
"description": "Component capabilities.",
20292023
"type": "object",
2030-
"additionalProperties": {
2031-
"type": "string"
2032-
}
2024+
"additionalProperties": {}
20332025
},
20342026
"configurations": {
20352027
"description": "Component configurations.",
@@ -2375,6 +2367,10 @@
23752367
"description": "Editable properties of a sensor inside the Azure Percept device.",
23762368
"type": "object",
23772369
"properties": {
2370+
"sensorLocation": {
2371+
"description": "The sensor location.",
2372+
"type": "string"
2373+
},
23782374
"metadata": {
23792375
"type": "object",
23802376
"additionalProperties": {
@@ -2525,6 +2521,40 @@
25252521
"type": "object",
25262522
"description": "The SolutionInstance object."
25272523
},
2524+
"SolutionInstanceUpdateProperties": {
2525+
"description": "The properties of a SolutionInstance within a Azure Percept account.",
2526+
"type": "object",
2527+
"properties": {
2528+
"provisioningState": {
2529+
"description": "Provisioning state of solutioninstance resource",
2530+
"type": "string",
2531+
"readOnly": true
2532+
},
2533+
"target": {
2534+
"description": "The target resource to deploy the SolutionInstance.",
2535+
"type": "string"
2536+
},
2537+
"solution": {
2538+
"description": "The solution resource to be deployed.",
2539+
"type": "string"
2540+
},
2541+
"description": {
2542+
"description": "The user provided description.",
2543+
"type": "string"
2544+
},
2545+
"configurations": {
2546+
"description": "Component configurations.",
2547+
"type": "array",
2548+
"items": {
2549+
"$ref": "#/definitions/SolutionInstanceConfiguration"
2550+
}
2551+
}
2552+
},
2553+
"required": [
2554+
"target",
2555+
"solution"
2556+
]
2557+
},
25282558
"SolutionInstanceProperties": {
25292559
"description": "The properties of a SolutionInstance within a Azure Percept account.",
25302560
"type": "object",
@@ -2578,7 +2608,7 @@
25782608
"properties": {
25792609
"x-ms-client-flatten": true,
25802610
"description": "Azure Percept SolutionInstance editable properties.",
2581-
"$ref": "#/definitions/SolutionInstanceProperties"
2611+
"$ref": "#/definitions/SolutionInstanceUpdateProperties"
25822612
}
25832613
}
25842614
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
4+
"api-version": "2021-09-01-preview"
5+
},
6+
"responses": {
7+
"200": {
8+
"description": "The list of supported operations has been fetched successfully.",
9+
"body": {
10+
"value": [
11+
{
12+
"name": "Microsoft.AzurePercept/accounts/Read",
13+
"display": {
14+
"provider": "Microsoft.AzurePercept",
15+
"resource": "accounts",
16+
"operation": "Gets/List Azure Percept accounts",
17+
"description": "Read accounts"
18+
}
19+
},
20+
{
21+
"name": "Microsoft.AzurePercept/accounts/Write",
22+
"display": {
23+
"provider": "Microsoft.AzurePercept",
24+
"resource": "accounts",
25+
"operation": "Create/update Azure Percept accounts",
26+
"description": "Writes accounts"
27+
}
28+
}
29+
]
30+
}
31+
}
32+
}
33+
}

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@
1010
"target": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AzurePercept/accounts/myAccount/targets/myTarget",
1111
"solution": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AzurePercept/accounts/myAccount/solutions/mySolution",
1212
"description": "User provided SolutionInstance description",
13-
"accounts": [
14-
{
15-
"kind": "ava",
16-
"accountResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.videoAnalyzers/my-ava-account"
17-
},
18-
{
19-
"kind": "computervision",
20-
"accountResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.CognitiveServices/accounts/my-cv-account"
21-
}
22-
],
2313
"configurations": [
2414
{
2515
"operation": "add",

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

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,39 @@
77
"solutionName": "mySolutionName",
88
"solution": {
99
"properties": {
10-
"properties": {
11-
"components": [
12-
{
13-
"componentType": "IoTEdgeModule",
14-
"componentName": "avaedge",
15-
"capabilities": {},
16-
"configurations": {
17-
"readOnly": {
18-
"properties.desired": {
19-
"key1": "value1",
20-
"type": "type"
21-
},
22-
"graphTopologies": [
23-
{
24-
"topologyName": "topology1"
25-
},
26-
{
27-
"topologyName": "topology2"
28-
},
29-
{
30-
"topologyName": "topology3"
31-
}
32-
]
10+
"components": [
11+
{
12+
"componentType": "IoTEdgeModule",
13+
"componentName": "avaedge",
14+
"capabilities": {},
15+
"configurations": {
16+
"readOnly": {
17+
"properties.desired": {
18+
"key1": "value1",
19+
"type": "type"
3320
},
34-
"readWrite": {
35-
"edgeAgent.properties.desired": {
36-
"settings": {
37-
"SettingsName": "Settings1"
38-
}
21+
"graphTopologies": [
22+
{
23+
"topologyName": "topology1"
24+
},
25+
{
26+
"topologyName": "topology2"
27+
},
28+
{
29+
"topologyName": "topology3"
30+
}
31+
]
32+
},
33+
"readWrite": {
34+
"edgeAgent.properties.desired": {
35+
"settings": {
36+
"SettingsName": "Settings1"
3937
}
4038
}
4139
}
4240
}
43-
]
44-
}
41+
}
42+
]
4543
}
4644
}
4745
},

0 commit comments

Comments
 (0)