Skip to content

Commit 5226b59

Browse files
authored
Added AccountName to Instance properties in DeviceUpdate (#2006)
* Redo * required * no required * no required
1 parent 5fe1b83 commit 5226b59

File tree

13 files changed

+105
-65
lines changed

13 files changed

+105
-65
lines changed

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,45 @@
7171
}
7272
}
7373
},
74+
"/subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances": {
75+
"get": {
76+
"description": "Returns instances for the given account name.",
77+
"operationId": "Instances_ListBySubscription",
78+
"parameters": [
79+
{
80+
"$ref": "#/parameters/ApiVersionParameter"
81+
},
82+
{
83+
"$ref": "#/parameters/SubscriptionIdParameter"
84+
},
85+
{
86+
"$ref": "#/parameters/AccountNameParameter"
87+
}
88+
],
89+
"responses": {
90+
"200": {
91+
"description": "List of instances.",
92+
"schema": {
93+
"$ref": "#/definitions/InstanceList"
94+
}
95+
},
96+
"default": {
97+
"description": "Error response describing the reason for operation failure.",
98+
"schema": {
99+
"$ref": "#/definitions/ErrorResponse"
100+
}
101+
}
102+
},
103+
"x-ms-pageable": {
104+
"nextLinkName": "nextLink"
105+
},
106+
"x-ms-examples": {
107+
"Gets a list of instances by account": {
108+
"$ref": "./examples/Instances/Instances_ListByAccount.json"
109+
}
110+
}
111+
}
112+
},
74113
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts": {
75114
"get": {
76115
"description": "Returns list of accounts.",
@@ -154,7 +193,7 @@
154193
"operationId": "Accounts_Create",
155194
"x-ms-long-running-operation": true,
156195
"x-ms-long-running-operation-options": {
157-
"final-state-via": "location"
196+
"final-state-via": "azure-async-operation"
158197
},
159198
"parameters": [
160199
{
@@ -375,7 +414,7 @@
375414
"operationId": "Instances_Create",
376415
"x-ms-long-running-operation": true,
377416
"x-ms-long-running-operation-options": {
378-
"final-state-via": "location"
417+
"final-state-via": "azure-async-operation"
379418
},
380419
"parameters": [
381420
{
@@ -679,6 +718,11 @@
679718
"modelAsString": true
680719
}
681720
},
721+
"accountName": {
722+
"description": "Parent Device Update Account name to which Instance belongs to.",
723+
"type": "string",
724+
"readOnly": true
725+
},
682726
"iotHubs": {
683727
"description": "List of IoT Hubs associated with the account.",
684728
"type": "array",
@@ -732,11 +776,7 @@
732776
"x-ms-secret": true,
733777
"type": "string"
734778
}
735-
},
736-
"required": [
737-
"ioTHubConnectionString",
738-
"eventHubConnectionString"
739-
]
779+
}
740780
},
741781
"ErrorResponse": {
742782
"description": "Error response indicates that the service is not able to process the incoming request.",

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"parameters": {
33
"subscriptionId": "5d04a672-05ce-492b-958f-d225b6a67926",
44
"resourceGroupName": "testRG",
5-
"accountName": "Contoso",
5+
"accountName": "contoso",
66
"api-version": "2020-03-01-preview",
77
"Account": {
88
"location": "West US 2",
@@ -13,13 +13,14 @@
1313
"responses": {
1414
"201": {
1515
"body": {
16-
"name": "Contoso",
17-
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/Contoso",
16+
"name": "contoso",
17+
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/contoso",
1818
"type": "Microsoft.DeviceUpdate/accounts",
1919
"location": "West US 2",
2020
"properties": {
21+
"hostName": "contoso.api.adu.microsoft.com"
2122
}
2223
}
2324
}
2425
}
25-
}
26+
}

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"parameters": {
33
"subscriptionId": "5d04a672-05ce-492b-958f-d225b6a67926",
44
"resourceGroupName": "testRG",
5-
"accountName": "Contoso",
5+
"accountName": "contoso",
66
"api-version": "2020-03-01-preview"
77
},
88
"responses": {

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
"parameters": {
33
"subscriptionId": "5d04a672-05ce-492b-958f-d225b6a67926",
44
"resourceGroupName": "testRG",
5-
"accountName": "Contoso",
5+
"accountName": "contoso",
66
"api-version": "2020-03-01-preview"
77
},
88
"responses": {
99
"200": {
1010
"body": {
11-
"name": "Contoso",
12-
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/Contoso",
11+
"name": "contoso",
12+
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/contoso",
1313
"type": "Microsoft.DeviceUpdate/accounts",
1414
"location": "West US 2",
1515
"properties": {
16+
"hostName": "contoso.api.adu.microsoft.com"
1617
}
1718
}
1819
}
1920
}
20-
}
21+
}

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010
"nextLink": "string",
1111
"value": [
1212
{
13-
"name": "Contoso",
14-
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/Contoso",
13+
"name": "contoso",
14+
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/contoso",
1515
"type": "Microsoft.DeviceUpdate/accounts",
1616
"location": "West US 2",
1717
"properties": {
18+
"hostName": "contoso.api.adu.microsoft.com"
1819
}
1920
}
2021
]
2122
}
2223
}
2324
}
24-
}
25+
}

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"parameters": {
33
"subscriptionId": "5d04a672-05ce-492b-958f-d225b6a67926",
44
"resourceGroupName": "testRG",
5-
"accountName": "Contoso",
5+
"accountName": "contoso",
66
"api-version": "2020-03-01-preview",
77
"tagUpdatePayload": {
88
"tags": {
@@ -13,16 +13,17 @@
1313
"responses": {
1414
"200": {
1515
"body": {
16-
"name": "Contoso",
17-
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/Contoso",
16+
"name": "contoso",
17+
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/contoso",
1818
"type": "Microsoft.DeviceUpdate/accounts",
1919
"location": "West US 2",
20+
"properties": {
21+
"hostName": "contoso.api.adu.microsoft.com"
22+
},
2023
"tags": {
2124
"tagKey": "tagValue"
22-
},
23-
"properties": {
2425
}
2526
}
2627
}
2728
}
28-
}
29+
}

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"parameters": {
33
"subscriptionId": "5d04a672-05ce-492b-958f-d225b6a67926",
44
"resourceGroupName": "testRG",
5-
"accountName": "Contoso",
6-
"instanceName": "Blue",
5+
"accountName": "contoso",
6+
"instanceName": "blue",
77
"api-version": "2020-03-01-preview",
88
"Instance": {
99
"location": "West US 2",
@@ -22,20 +22,19 @@
2222
"responses": {
2323
"201": {
2424
"body": {
25-
"name": "Blue",
26-
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/Contoso/instances/Blue",
25+
"name": "blue",
26+
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue",
2727
"type": "Microsoft.DeviceUpdate/accounts/instances",
2828
"properties": {
29+
"accountName": "contoso",
2930
"iotHubs": [
3031
{
3132
"name": "string",
32-
"resourceId": "string",
33-
"ioTHubConnectionString": "string",
34-
"eventHubConnectionString": "string"
33+
"resourceId": "string"
3534
}
3635
]
3736
}
3837
}
3938
}
4039
}
41-
}
40+
}

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"parameters": {
33
"subscriptionId": "5d04a672-05ce-492b-958f-d225b6a67926",
44
"resourceGroupName": "testRG",
5-
"accountName": "Contoso",
6-
"instanceName": "Blue",
5+
"accountName": "contoso",
6+
"instanceName": "blue",
77
"api-version": "2020-03-01-preview"
88
},
99
"responses": {

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,26 @@
22
"parameters": {
33
"subscriptionId": "5d04a672-05ce-492b-958f-d225b6a67926",
44
"resourceGroupName": "testRG",
5-
"accountName": "Contoso",
6-
"instanceName": "Blue",
5+
"accountName": "contoso",
6+
"instanceName": "blue",
77
"api-version": "2020-03-01-preview"
88
},
99
"responses": {
1010
"200": {
1111
"body": {
12-
"name": "Blue",
13-
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/Contoso/instances/Blue",
12+
"name": "blue",
13+
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue",
1414
"type": "Microsoft.DeviceUpdate/accounts/instances",
1515
"properties": {
16+
"accountName": "contoso",
1617
"iotHubs": [
1718
{
1819
"name": "string",
19-
"resourceId": "string",
20-
"ioTHubConnectionString": "string",
21-
"eventHubConnectionString": "string"
20+
"resourceId": "string"
2221
}
2322
]
2423
}
2524
}
2625
}
2726
}
28-
}
27+
}

specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"parameters": {
33
"subscriptionId": "5d04a672-05ce-492b-958f-d225b6a67926",
44
"resourceGroupName": "testRG",
5-
"accountName": "Contoso",
5+
"accountName": "contoso",
66
"api-version": "2020-03-01-preview"
77
},
88
"responses": {
@@ -11,31 +11,29 @@
1111
"nextLink": "string",
1212
"value": [
1313
{
14-
"name": "Blue",
15-
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/Contoso/instances/Blue",
14+
"name": "blue",
15+
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue",
1616
"type": "Microsoft.DeviceUpdate/accounts/instances",
1717
"properties": {
18+
"accountName": "contoso",
1819
"iotHubs": [
1920
{
2021
"name": "string",
21-
"resourceId": "string",
22-
"ioTHubConnectionString": "string",
23-
"eventHubConnectionString": "string"
22+
"resourceId": "string"
2423
}
2524
]
2625
}
2726
},
2827
{
29-
"name": "Red",
30-
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/Contoso/instances/Red",
28+
"name": "red",
29+
"id": "/subscriptions/5d04a672-05ce-492b-958f-d225b6a67926/resourceGroups/testRG/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/red",
3130
"type": "Microsoft.DeviceUpdate/accounts/instances",
3231
"properties": {
32+
"accountName": "contoso",
3333
"iotHubs": [
3434
{
3535
"name": "string",
36-
"resourceId": "string",
37-
"ioTHubConnectionString": "string",
38-
"eventHubConnectionString": "string"
36+
"resourceId": "string"
3937
}
4038
]
4139
}
@@ -44,4 +42,4 @@
4442
}
4543
}
4644
}
47-
}
45+
}

0 commit comments

Comments
 (0)