Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 09c187c

Browse files
triciarosarioTricia Rosario
andauthored
Storage Task Assignment Swagger Updates (Azure#29050)
* SDK team improvements * Report APIs contain filtering * PR comment add more examples * Fix example path * Fix duplicate schema issue --------- Co-authored-by: Tricia Rosario <[email protected]>
1 parent f6f50c6 commit 09c187c

File tree

3 files changed

+93
-35
lines changed

3 files changed

+93
-35
lines changed

specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
},
238238
"allOf": [
239239
{
240-
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
240+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
241241
}
242242
],
243243
"description": "Storage Tasks run report instance"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616",
4+
"resourceGroupName": "res4228",
5+
"accountName": "sto4445",
6+
"storageTaskAssignmentName": "myassignment1",
7+
"api-version": "2023-05-01",
8+
"parameters": {
9+
"properties": {
10+
"taskId": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
11+
"enabled": true,
12+
"description": "My Storage task assignment",
13+
"executionContext": {
14+
"trigger": {
15+
"type": "RunOnce",
16+
"parameters": {
17+
"startOn": "2022-11-15T21:52:47.8145095Z"
18+
}
19+
}
20+
},
21+
"report": {
22+
"prefix": "container1"
23+
}
24+
}
25+
}
26+
},
27+
"responses": {
28+
"200": {
29+
"body": {
30+
"id": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1",
31+
"name": "myassignment1",
32+
"type": "Microsoft.Storage/storageAccounts/storageTaskAssignments",
33+
"properties": {
34+
"taskId": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
35+
"enabled": true,
36+
"description": "My Storage task assignment",
37+
"executionContext": {
38+
"trigger": {
39+
"type": "RunOnce",
40+
"parameters": {
41+
"startOn": "2022-11-15T21:52:47.8145095Z"
42+
}
43+
}
44+
},
45+
"report": {
46+
"prefix": "container1"
47+
},
48+
"provisioningState": "Succeeded"
49+
}
50+
}
51+
},
52+
"201": {
53+
"body": {
54+
"id": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1",
55+
"name": "myassignment1",
56+
"type": "Microsoft.Storage/storageAccounts/storageTaskAssignments",
57+
"properties": {
58+
"taskId": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
59+
"enabled": true,
60+
"description": "My Storage task assignment",
61+
"executionContext": {
62+
"trigger": {
63+
"type": "RunOnce",
64+
"parameters": {
65+
"startOn": "2022-11-15T21:52:47.8145095Z"
66+
}
67+
}
68+
},
69+
"report": {
70+
"prefix": "container1"
71+
},
72+
"provisioningState": "Succeeded"
73+
}
74+
}
75+
},
76+
"202": {
77+
"headers": {
78+
"location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-05-01"
79+
}
80+
}
81+
}
82+
}

specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/storageTaskAssignments.json

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"x-ms-examples": {
2727
"PutStorageTaskAssignment": {
2828
"$ref": "./examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json"
29+
},
30+
"PutStorageTaskAssignmentRequiredProperties": {
31+
"$ref": "./examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json"
2932
}
3033
},
3134
"parameters": [
@@ -275,12 +278,6 @@
275278
"type": "string",
276279
"description": "Optional, specifies the maximum number of storage task assignment Ids to be included in the list response."
277280
},
278-
{
279-
"name": "$filter",
280-
"in": "query",
281-
"type": "string",
282-
"description": "Optional. When specified, it can be used to query using reporting properties."
283-
},
284281
{
285282
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
286283
}
@@ -336,7 +333,7 @@
336333
"name": "$filter",
337334
"in": "query",
338335
"type": "string",
339-
"description": "Optional. When specified, it can be used to query using reporting properties."
336+
"description": "Optional. When specified, it can be used to query using reporting properties. See [Constructing Filter Strings](https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings) for details."
340337
},
341338
{
342339
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
@@ -396,7 +393,7 @@
396393
"name": "$filter",
397394
"in": "query",
398395
"type": "string",
399-
"description": "Optional. When specified, it can be used to query using reporting properties."
396+
"description": "Optional. When specified, it can be used to query using reporting properties. See [Constructing Filter Strings](https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings) for details."
400397
},
401398
{
402399
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
@@ -433,9 +430,12 @@
433430
},
434431
"allOf": [
435432
{
436-
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/Resource"
433+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource"
437434
}
438435
],
436+
"required": [
437+
"properties"
438+
],
439439
"description": "The storage task assignment."
440440
},
441441
"StorageTaskAssignmentProperties": {
@@ -507,7 +507,6 @@
507507
}
508508
},
509509
"required": [
510-
"target",
511510
"trigger"
512511
],
513512
"description": "Execution context of the storage task assignment."
@@ -530,9 +529,6 @@
530529
"description": "List of object prefixes to be excluded from task execution. If there is a conflict between include and exclude prefixes, the exclude prefix will be the determining factor"
531530
}
532531
},
533-
"required": [
534-
"prefix"
535-
],
536532
"description": "Target helps provide filter parameters for the objects in the storage account and forms the execution context for the storage task"
537533
},
538534
"ExecutionTrigger": {
@@ -675,7 +671,7 @@
675671
"type": "object",
676672
"properties": {
677673
"target": {
678-
"$ref": "#/definitions/ExecutionTargetUpdate",
674+
"$ref": "#/definitions/ExecutionTarget",
679675
"description": "Execution target of the storage task assignment"
680676
},
681677
"trigger": {
@@ -685,26 +681,6 @@
685681
},
686682
"description": "Execution context of the storage task assignment update."
687683
},
688-
"ExecutionTargetUpdate": {
689-
"type": "object",
690-
"properties": {
691-
"prefix": {
692-
"type": "array",
693-
"items": {
694-
"type": "string"
695-
},
696-
"description": "List of object prefixes to be included for task execution"
697-
},
698-
"excludePrefix": {
699-
"type": "array",
700-
"items": {
701-
"type": "string"
702-
},
703-
"description": "List of object prefixes to be excluded from task execution. If there is a conflict between include and exclude prefixes, the exclude prefix will be the determining factor"
704-
}
705-
},
706-
"description": "Target helps provide filter parameters for the objects in the storage account and forms the execution context for the storage task"
707-
},
708684
"ExecutionTriggerUpdate": {
709685
"type": "object",
710686
"properties": {

0 commit comments

Comments
 (0)