Skip to content

Commit

Permalink
Storage Task Assignment Swagger Updates (Azure#29050)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
triciarosario and Tricia Rosario authored Jun 5, 2024
1 parent f6f50c6 commit 09c187c
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
}
],
"description": "Storage Tasks run report instance"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"parameters": {
"subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616",
"resourceGroupName": "res4228",
"accountName": "sto4445",
"storageTaskAssignmentName": "myassignment1",
"api-version": "2023-05-01",
"parameters": {
"properties": {
"taskId": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
"enabled": true,
"description": "My Storage task assignment",
"executionContext": {
"trigger": {
"type": "RunOnce",
"parameters": {
"startOn": "2022-11-15T21:52:47.8145095Z"
}
}
},
"report": {
"prefix": "container1"
}
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1",
"name": "myassignment1",
"type": "Microsoft.Storage/storageAccounts/storageTaskAssignments",
"properties": {
"taskId": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
"enabled": true,
"description": "My Storage task assignment",
"executionContext": {
"trigger": {
"type": "RunOnce",
"parameters": {
"startOn": "2022-11-15T21:52:47.8145095Z"
}
}
},
"report": {
"prefix": "container1"
},
"provisioningState": "Succeeded"
}
}
},
"201": {
"body": {
"id": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1",
"name": "myassignment1",
"type": "Microsoft.Storage/storageAccounts/storageTaskAssignments",
"properties": {
"taskId": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
"enabled": true,
"description": "My Storage task assignment",
"executionContext": {
"trigger": {
"type": "RunOnce",
"parameters": {
"startOn": "2022-11-15T21:52:47.8145095Z"
}
}
},
"report": {
"prefix": "container1"
},
"provisioningState": "Succeeded"
}
}
},
"202": {
"headers": {
"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"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"x-ms-examples": {
"PutStorageTaskAssignment": {
"$ref": "./examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json"
},
"PutStorageTaskAssignmentRequiredProperties": {
"$ref": "./examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json"
}
},
"parameters": [
Expand Down Expand Up @@ -275,12 +278,6 @@
"type": "string",
"description": "Optional, specifies the maximum number of storage task assignment Ids to be included in the list response."
},
{
"name": "$filter",
"in": "query",
"type": "string",
"description": "Optional. When specified, it can be used to query using reporting properties."
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
Expand Down Expand Up @@ -336,7 +333,7 @@
"name": "$filter",
"in": "query",
"type": "string",
"description": "Optional. When specified, it can be used to query using reporting properties."
"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."
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -396,7 +393,7 @@
"name": "$filter",
"in": "query",
"type": "string",
"description": "Optional. When specified, it can be used to query using reporting properties."
"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."
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -433,9 +430,12 @@
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/Resource"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource"
}
],
"required": [
"properties"
],
"description": "The storage task assignment."
},
"StorageTaskAssignmentProperties": {
Expand Down Expand Up @@ -507,7 +507,6 @@
}
},
"required": [
"target",
"trigger"
],
"description": "Execution context of the storage task assignment."
Expand All @@ -530,9 +529,6 @@
"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"
}
},
"required": [
"prefix"
],
"description": "Target helps provide filter parameters for the objects in the storage account and forms the execution context for the storage task"
},
"ExecutionTrigger": {
Expand Down Expand Up @@ -675,7 +671,7 @@
"type": "object",
"properties": {
"target": {
"$ref": "#/definitions/ExecutionTargetUpdate",
"$ref": "#/definitions/ExecutionTarget",
"description": "Execution target of the storage task assignment"
},
"trigger": {
Expand All @@ -685,26 +681,6 @@
},
"description": "Execution context of the storage task assignment update."
},
"ExecutionTargetUpdate": {
"type": "object",
"properties": {
"prefix": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of object prefixes to be included for task execution"
},
"excludePrefix": {
"type": "array",
"items": {
"type": "string"
},
"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"
}
},
"description": "Target helps provide filter parameters for the objects in the storage account and forms the execution context for the storage task"
},
"ExecutionTriggerUpdate": {
"type": "object",
"properties": {
Expand Down

0 comments on commit 09c187c

Please sign in to comment.