Skip to content

Commit 3dd4012

Browse files
adalmia96Ayush
authored andcommitted
Added Changes to fix S360 issues (Azure#17064)
* fix changes * added 202 example * Fix update * fixed issue * fixed * added type * Add example for update application Co-authored-by: Ayush <[email protected]>
1 parent c627fbb commit 3dd4012

File tree

6 files changed

+184
-2
lines changed

6 files changed

+184
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "subid",
4+
"resourceGroupName": "rg",
5+
"applicationName": "myManagedApplication",
6+
"api-version": "2021-07-01",
7+
"parameters": {
8+
"properties": {
9+
"applicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef",
10+
"managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG"
11+
},
12+
"kind": "ServiceCatalog"
13+
}
14+
},
15+
"responses": {
16+
"200": {
17+
"headers": {},
18+
"body": {
19+
"name": "myManagedApplication",
20+
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
21+
"type": "Microsoft.Solutions/applications",
22+
"managedBy": null,
23+
"plan": null,
24+
"identity": null,
25+
"kind": "ServiceCatalog",
26+
"sku": null,
27+
"properties": {
28+
"applicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef",
29+
"managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG",
30+
"outputs": null,
31+
"parameters": null,
32+
"provisioningState": "Created"
33+
}
34+
}
35+
},
36+
"202": {
37+
"headers": {
38+
"location": "https://url.to.query"
39+
}
40+
}
41+
}
42+
}

specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@
248248
],
249249
"operationId": "Applications_Update",
250250
"description": "Updates an existing managed application. The only value that can be updated via PATCH currently is the tags.",
251+
"x-ms-examples": {
252+
"Create or update managed application": {
253+
"$ref": "./examples/updateApplication.json"
254+
}
255+
},
251256
"parameters": [
252257
{
253258
"name": "resourceGroupName",
@@ -290,6 +295,9 @@
290295
"$ref": "#/definitions/Application"
291296
}
292297
},
298+
"202": {
299+
"description": "Accepted - Returns this status until the asynchronous operation has completed."
300+
},
293301
"default": {
294302
"description": "Error response describing why the operation failed.",
295303
"schema": {
@@ -1931,6 +1939,13 @@
19311939
"type": "string"
19321940
},
19331941
"description": "The deny assignment excluded actions."
1942+
},
1943+
"allowedDataActions": {
1944+
"type": "array",
1945+
"items": {
1946+
"type": "string"
1947+
},
1948+
"description": "The deny assignment excluded data actions."
19341949
}
19351950
},
19361951
"description": "Managed application locking policy."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "subid",
4+
"resourceGroupName": "rg",
5+
"applicationName": "myManagedApplication",
6+
"api-version": "2021-07-01",
7+
"parameters": {
8+
"properties": {
9+
"applicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef",
10+
"managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG"
11+
},
12+
"kind": "ServiceCatalog"
13+
}
14+
},
15+
"responses": {
16+
"200": {
17+
"headers": {},
18+
"body": {
19+
"name": "myManagedApplication",
20+
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
21+
"type": "Microsoft.Solutions/applications",
22+
"managedBy": null,
23+
"plan": null,
24+
"identity": null,
25+
"kind": "ServiceCatalog",
26+
"sku": null,
27+
"properties": {
28+
"applicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef",
29+
"managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG",
30+
"outputs": null,
31+
"parameters": null,
32+
"provisioningState": "Created"
33+
}
34+
}
35+
},
36+
"202": {
37+
"headers": {
38+
"location": "https://url.to.query"
39+
}
40+
}
41+
}
42+
}

specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@
242242
],
243243
"operationId": "Applications_Update",
244244
"description": "Updates an existing managed application. The only value that can be updated via PATCH currently is the tags.",
245+
"x-ms-examples": {
246+
"Create or update managed application": {
247+
"$ref": "./examples/updateApplication.json"
248+
}
249+
},
245250
"parameters": [
246251
{
247252
"name": "resourceGroupName",
@@ -284,6 +289,9 @@
284289
"$ref": "#/definitions/Application"
285290
}
286291
},
292+
"202": {
293+
"description": "Accepted - Returns this status until the asynchronous operation has completed."
294+
},
287295
"default": {
288296
"description": "Error response describing why the operation failed.",
289297
"schema": {
@@ -1918,6 +1926,13 @@
19181926
"type": "string"
19191927
},
19201928
"description": "The deny assignment excluded actions."
1929+
},
1930+
"allowedDataActions": {
1931+
"type": "array",
1932+
"items": {
1933+
"type": "string"
1934+
},
1935+
"description": "The deny assignment excluded data actions."
19211936
}
19221937
},
19231938
"description": "Managed application locking policy."

specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateApplication.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
"provisioningState": "Created"
3333
}
3434
}
35+
},
36+
"202": {
37+
"headers": {
38+
"location": "https://url.to.query"
39+
}
3540
}
3641
}
3742
}

specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/managedapplications.json

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@
254254
"$ref": "#/definitions/Application"
255255
}
256256
},
257+
"202": {
258+
"description": "Accepted - Returns this status until the asynchronous operation has completed."
259+
},
257260
"default": {
258261
"description": "Error response describing why the operation failed.",
259262
"schema": {
@@ -986,7 +989,7 @@
986989
"pattern": "^[-\\w\\._,\\(\\)]+$"
987990
},
988991
"identity": {
989-
"$ref": "../../../../../common-types/resource-management/v3/managedidentity.json#/definitions/ManagedServiceIdentity",
992+
"$ref": "#/definitions/Identity",
990993
"description": "The identity of the resource."
991994
}
992995
},
@@ -1019,7 +1022,7 @@
10191022
"pattern": "^[-\\w\\._,\\(\\)]+$"
10201023
},
10211024
"identity": {
1022-
"$ref": "../../../../../common-types/resource-management/v3/managedidentity.json#/definitions/ManagedServiceIdentity",
1025+
"$ref": "#/definitions/Identity",
10231026
"description": "The identity of the resource."
10241027
}
10251028
},
@@ -1367,6 +1370,59 @@
13671370
],
13681371
"description": "SKU for the resource."
13691372
},
1373+
"Identity": {
1374+
"type": "object",
1375+
"properties": {
1376+
"principalId": {
1377+
"readOnly": true,
1378+
"type": "string",
1379+
"description": "The principal ID of resource identity."
1380+
},
1381+
"tenantId": {
1382+
"readOnly": true,
1383+
"type": "string",
1384+
"description": "The tenant ID of resource."
1385+
},
1386+
"type": {
1387+
"type": "string",
1388+
"description": "The identity type.",
1389+
"enum": [
1390+
"SystemAssigned",
1391+
"UserAssigned",
1392+
"SystemAssigned, UserAssigned",
1393+
"None"
1394+
],
1395+
"x-ms-enum": {
1396+
"name": "ResourceIdentityType",
1397+
"modelAsString": false
1398+
}
1399+
},
1400+
"userAssignedIdentities": {
1401+
"type": "object",
1402+
"additionalProperties": {
1403+
"$ref": "#/definitions/userAssignedResourceIdentity"
1404+
},
1405+
"description": "The list of user identities associated with the resource. The user identity dictionary key references will be resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'."
1406+
}
1407+
},
1408+
"description": "Identity for the resource."
1409+
},
1410+
"userAssignedResourceIdentity": {
1411+
"type": "object",
1412+
"properties": {
1413+
"principalId": {
1414+
"readOnly": true,
1415+
"type": "string",
1416+
"description": "The principal id of user assigned identity."
1417+
},
1418+
"tenantId": {
1419+
"readOnly": true,
1420+
"type": "string",
1421+
"description": "The tenant id of user assigned identity."
1422+
}
1423+
},
1424+
"description": "Represents the user assigned identity that is contained within the UserAssignedIdentities dictionary on ResourceIdentity"
1425+
},
13701426
"Resource": {
13711427
"type": "object",
13721428
"properties": {
@@ -1596,6 +1652,13 @@
15961652
"type": "string"
15971653
},
15981654
"description": "The deny assignment excluded actions."
1655+
},
1656+
"allowedDataActions": {
1657+
"type": "array",
1658+
"items": {
1659+
"type": "string"
1660+
},
1661+
"description": "The deny assignment excluded data actions."
15991662
}
16001663
},
16011664
"description": "Managed application locking policy."

0 commit comments

Comments
 (0)