From 8547bd0713178b926c755aefe91afb4856c4190b Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 12 Jul 2023 16:05:12 -0700 Subject: [PATCH 01/20] Add the Readme files and StorageTasks Spec file with CRUD and List by subs and rg with examples --- .../storageTasks/DeleteStorageTask.json | 17 + .../examples/storageTasks/GetStorageTask.json | 50 ++ .../ListStorageTasksByResourceGroup.json | 82 +++ .../ListStorageTasksBySubscription.json | 81 +++ .../storageTasks/PatchStorageTask.json | 88 +++ .../examples/storageTasks/PutStorageTask.json | 89 +++ .../stable/2023-01-01/storagetasks.json | 609 ++++++++++++++++++ .../resource-manager/readme.az.md | 28 + .../resource-manager/readme.cli.md | 1 + .../resource-manager/readme.csharp.md | 15 + .../resource-manager/readme.go.md | 11 + .../storagetasks/resource-manager/readme.md | 75 +++ .../resource-manager/readme.python.md | 18 + .../resource-manager/readme.typescript.md | 13 + 14 files changed, 1177 insertions(+) create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/DeleteStorageTask.json create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/GetStorageTask.json create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksByResourceGroup.json create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksBySubscription.json create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PatchStorageTask.json create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PutStorageTask.json create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json create mode 100644 specification/storagetasks/resource-manager/readme.az.md create mode 100644 specification/storagetasks/resource-manager/readme.cli.md create mode 100644 specification/storagetasks/resource-manager/readme.csharp.md create mode 100644 specification/storagetasks/resource-manager/readme.go.md create mode 100644 specification/storagetasks/resource-manager/readme.md create mode 100644 specification/storagetasks/resource-manager/readme.python.md create mode 100644 specification/storagetasks/resource-manager/readme.typescript.md diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/DeleteStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/DeleteStorageTask.json new file mode 100644 index 000000000000..6af97a7d11af --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/DeleteStorageTask.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res4228", + "storageTaskName": "mytask1", + "api-version": "2023-01-01", + "monitor": "true" + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/locations/westus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" + } + }, + "204": {} + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/GetStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/GetStorageTask.json new file mode 100644 index 000000000000..9d42e661204f --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/GetStorageTask.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res4228", + "storageTaskName": "mytask1", + "api-version": "2023-01-01", + "monitor": "true" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.Storage/storageTasks/mytask1", + "name": "mytask1", + "type": "Microsoft.Storage/storageTasks", + "location": "westus", + "properties": { + "enabled": true, + "description": "Storage task", + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Cool')]]", + "operations": [ + { + "name": "SetBlobTier", + "parameters": { + "tier": "Hot" + }, + "onSuccess": "continue", + "onFailure": "break" + } + ] + }, + "else": { + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + }, + "taskVersion": 1, + "provisioningState": "Succeeded", + "creationTimeInUtc": "2023-07-06T00:24:59.1441663Z" + } + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksByResourceGroup.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksByResourceGroup.json new file mode 100644 index 000000000000..593adc6c52d6 --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksByResourceGroup.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res6117", + "api-version": "2023-01-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.Storage/storageTasks/mytask1", + "name": "mytask1", + "type": "Microsoft.Storage/storageTasks", + "location": "eastus", + "identity": { + "principalId": "2fd475e8-8923-4597-842f-7ce1adfc6c4a", + "tenantId": "b4a2005c-32c1-434c-bbf0-ff486912fc75", + "type": "SystemAssigned" + }, + "properties": { + "enabled": true, + "description": "Storage task", + "action": { + "if": { + "condition": "[[greater(Content-Length, '100')]]", + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + }, + "taskVersion": 1, + "provisioningState": "Succeeded", + "creationTimeInUtc": "2023-07-05T23:06:50.7722358Z" + } + }, + { + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.Storage/storageTasks/mytask2", + "name": "mytask2", + "type": "Microsoft.Storage/storageTasks", + "location": "westus", + "properties": { + "enabled": true, + "description": "Storage task", + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Cool')]]", + "operations": [ + { + "name": "SetBlobTier", + "parameters": { + "tier": "Hot" + }, + "onSuccess": "continue", + "onFailure": "break" + } + ] + }, + "else": { + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + }, + "taskVersion": 1, + "provisioningState": "Succeeded", + "creationTimeInUtc": "2023-07-06T00:24:59.1441663Z" + } + } + ] + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksBySubscription.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksBySubscription.json new file mode 100644 index 000000000000..29529dbd3c63 --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksBySubscription.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "api-version": "2023-01-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.Storage/storageTasks/mytask1", + "name": "mytask1", + "type": "Microsoft.Storage/storageTasks", + "location": "eastus", + "identity": { + "principalId": "2fd475e8-8923-4597-842f-7ce1adfc6c4a", + "tenantId": "b4a2005c-32c1-434c-bbf0-ff486912fc75", + "type": "SystemAssigned" + }, + "properties": { + "enabled": true, + "description": "Storage task", + "action": { + "if": { + "condition": "[[greater(Content-Length, '100')]]", + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + }, + "taskVersion": 1, + "provisioningState": "Succeeded", + "creationTimeInUtc": "2023-07-05T23:06:50.7722358Z" + } + }, + { + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.Storage/storageTasks/mytask2", + "name": "mytask2", + "type": "Microsoft.Storage/storageTasks", + "location": "westus", + "properties": { + "enabled": true, + "description": "Storage task", + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Cool')]]", + "operations": [ + { + "name": "SetBlobTier", + "parameters": { + "tier": "Hot" + }, + "onSuccess": "continue", + "onFailure": "break" + } + ] + }, + "else": { + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + }, + "taskVersion": 1, + "provisioningState": "Succeeded", + "creationTimeInUtc": "2023-07-06T00:24:59.1441663Z" + } + } + ] + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PatchStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PatchStorageTask.json new file mode 100644 index 000000000000..3868633a80b9 --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PatchStorageTask.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res4228", + "storageTaskName": "mytask1", + "api-version": "2023-01-01", + "monitor": "true", + "parameters": { + "properties": { + "enabled": true, + "description": "My Storage task", + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Cool')]]", + "operations": [ + { + "name": "SetBlobTier", + "parameters": { + "tier": "Hot" + }, + "onSuccess": "continue", + "onFailure": "break" + } + ] + }, + "else": { + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "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-01-01" + }, + "body": { + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.Storage/storageTasks/mytask1", + "name": "mytask1", + "type": "Microsoft.Storage/storageTasks", + "location": "westus", + "properties": { + "enabled": true, + "description": "Storage task", + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Cool')]]", + "operations": [ + { + "name": "SetBlobTier", + "parameters": { + "tier": "Hot" + }, + "onSuccess": "continue", + "onFailure": "break" + } + ] + }, + "else": { + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + }, + "taskVersion": 1, + "provisioningState": "Succeeded", + "creationTimeInUtc": "2023-07-06T00:24:59.1441663Z" + } + } + }, + "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-01-01" + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PutStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PutStorageTask.json new file mode 100644 index 000000000000..62232f710f13 --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PutStorageTask.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res4228", + "storageTaskName": "mytask1", + "api-version": "2023-01-01", + "monitor": "true", + "parameters": { + "location": "westus", + "properties": { + "enabled": true, + "description": "My Storage task", + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Cool')]]", + "operations": [ + { + "name": "SetBlobTier", + "parameters": { + "tier": "Hot" + }, + "onSuccess": "continue", + "onFailure": "break" + } + ] + }, + "else": { + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "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-01-01" + }, + "body": { + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.Storage/storageTasks/mytask1", + "name": "mytask1", + "type": "Microsoft.Storage/storageTasks", + "location": "westus", + "properties": { + "enabled": true, + "description": "Storage task", + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Cool')]]", + "operations": [ + { + "name": "SetBlobTier", + "parameters": { + "tier": "Hot" + }, + "onSuccess": "continue", + "onFailure": "break" + } + ] + }, + "else": { + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + }, + "taskVersion": 1, + "provisioningState": "Succeeded", + "creationTimeInUtc": "2023-07-06T00:24:59.1441663Z" + } + } + }, + "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-01-01" + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json new file mode 100644 index 000000000000..eafd0f5126e2 --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -0,0 +1,609 @@ +{ + "swagger": "2.0", + "info": { + "title": "StorageTaskManagementClient", + "description": "The Azure Storage Tasks Management API.", + "version": "2023-01-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageTasks/{storageTaskName}": { + "put": { + "tags": [ + "StorageTasks" + ], + "description": "Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already created and a subsequent create request is issued with different properties, the storage task properties will be updated. If a storage task is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.", + "operationId": "StorageTasks_Create", + "x-ms-examples": { + "PutStorageTask": { + "$ref": "./examples/storageTasks/PutStorageTask.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StorageTaskName" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/StorageTask" + }, + "description": "The parameters to create a Storage Task." + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- Update storage task with the same properties specified in the request body.", + "schema": { + "$ref": "#/definitions/StorageTask" + } + }, + "202": { + "description": "Accepted -- Create or update request accepted; operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "delete": { + "tags": [ + "StorageTasks" + ], + "description": "Delete the storage task resource.", + "operationId": "StorageTasks_Delete", + "x-ms-examples": { + "PutStorageTask": { + "$ref": "./examples/storageTasks/DeleteStorageTask.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StorageTaskName" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "Accepted -- Delete request accepted; operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "NoContent -- specified storage task does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "StorageTasks" + ], + "description": "Get the storage task properties", + "operationId": "StorageTasks_Get", + "x-ms-examples": { + "GetStorageTask": { + "$ref": "./examples/storageTasks/GetStorageTask.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StorageTaskName" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- properties retrieved successfully for the storage task.", + "schema": { + "$ref": "#/definitions/StorageTask" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "StorageTasks" + ], + "operationId": "StorageTasks_Update", + "description": "Update storage task properties", + "x-ms-examples": { + "PatchStorageTask": { + "$ref": "./examples/storageTasks/PatchStorageTask.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StorageTaskName" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/StorageTaskUpdateParameters" + }, + "description": "The parameters to provide to update the storage task resource." + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- returned when the update request body had no changes.", + "schema": { + "$ref": "#/definitions/StorageTask" + } + }, + "202": { + "description": "Accepted -- update request accepted; operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageTasks": { + "get": { + "tags": [ + "StorageTasks" + ], + "operationId": "StorageTasks_ListBySubscription", + "description": "Lists all the storage tasks available under the subscription.", + "x-ms-examples": { + "ListStorageTasksBySubscription": { + "$ref": "./examples/storageTasks/ListStorageTasksBySubscription.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- List of storage tasks was retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/StorageTasksListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageTasks": { + "get": { + "tags": [ + "StorageTasks" + ], + "operationId": "StorageTasks_ListByResourceGroup", + "description": "Lists all the storage tasks available under the given resource group.", + "x-ms-examples": { + "ListStorageTasksByResourceGroup": { + "$ref": "./examples/storageTasks/ListStorageTasksByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- List of storage tasks in the given resource group retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/StorageTasksListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "StorageTask": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "Gets or sets the location of the resource. location property cannot be changes for successfully provisioned storage tasks." + }, + "identity": { + "$ref": "#/definitions/StorageTaskIdentity", + "description": "The managed service identity of the resource." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/StorageTaskProperties", + "description": "Properties of the storage task." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + } + ], + "description": "Represents Storage Task." + }, + "StorageTaskUpdateParameters": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/definitions/StorageTaskIdentity", + "description": "The identity of the resource." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/StorageTaskProperties", + "description": "Properties of the storage task." + } + }, + "description": "Parameters of the storage task update request" + }, + "StorageTaskIdentity": { + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": [ + "None", + "SystemAssigned" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + } + }, + "required": [ + "type" + ], + "description": "Identity for the storage task." + }, + "StorageTaskProperties": { + "type": "object", + "properties": { + "taskVersion": { + "readOnly": true, + "type": "integer", + "minimum": 1, + "maximum": 1, + "format": "int64", + "description": "Storage task version." + }, + "enabled": { + "type": "boolean", + "description": "Storage Task is enabled when set to true and disabled when set to false" + }, + "description": { + "type": "string", + "description": "Text that describes the purpose of the storage task" + }, + "action": { + "$ref": "#/definitions/StorageTaskAction", + "description": "The storage task action that is executed" + }, + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "Represents the provisioning state of the storage task.", + "enum": [ + "ValidateSubscriptionQuotaBegin", + "ValidateSubscriptionQuotaEnd", + "Creating", + "Succeeded", + "Deleting", + "Canceled", + "Failed" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": false + } + }, + "creationTimeInUtc": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The creation date and time of the storage task in UTC." + } + }, + "required": [ + "enabled", + "description", + "action" + ], + "description": "Properties of the storage task." + }, + "StorageTaskAction": { + "type": "object", + "properties": { + "if": { + "$ref": "#/definitions/IfCondition", + "description": "The if block of storage task operation" + }, + "else": { + "$ref": "#/definitions/ElseCondition", + "description": "The else block of storage task operation" + } + }, + "required": [ + "if" + ], + "description": "The storage task action represents conditional statements and operations to be performed on target objects." + }, + "IfCondition": { + "type": "object", + "properties": { + "condition": { + "type": "string", + "description": "The condition predicate which is composed of object properties, eg: blob and container properties." + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskOperation" + }, + "x-ms-identifiers": [], + "description": "List of operations to execute when the condition predicate satisfies." + } + }, + "required": [ + "condition", + "operations" + ], + "description": "The if block of storage task operation" + }, + "ElseCondition": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskOperation" + }, + "x-ms-identifiers": [], + "description": "List of operations to execute in the else block" + } + }, + "required": [ + "operations" + ], + "description": "The else block of storage task operation" + }, + "StorageTaskOperation": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The operation to be performed on the object.", + "enum": [ + "SetBlobTier", + "SetBlobTags", + "SetBlobImmutabilityPolicy", + "SetBlobLegalHold", + "SetBlobExpiry", + "DeleteBlob", + "UndeleteBlob" + ], + "x-ms-enum": { + "name": "StorageTaskOperation", + "modelAsString": true + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Key-value parameters for the operation." + }, + "onSuccess": { + "type": "string", + "description": "Action to be taken when the operation is successful for a object.", + "enum": [ + "continue" + ], + "x-ms-enum": { + "name": "onSuccess", + "modelAsString": false + } + }, + "onFailure": { + "type": "string", + "description": "Action to be taken when the operation fails for a object.", + "enum": [ + "break" + ], + "x-ms-enum": { + "name": "onFailure", + "modelAsString": false + } + } + }, + "required": [ + "name" + ], + "description": "Represents an operation to be performed on the object" + }, + "StorageTasksListResult": { + "type": "object", + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/StorageTask" + }, + "description": "Gets the list of storage tasks and their properties." + }, + "nextLink": { + "type": "string", + "description": "Request URL that can be used to query next page of storage tasks. Returned when total number of requested storage tasks exceed maximum page size.", + "readOnly": true + } + }, + "description": "The response from the List Storage Tasks operation." + } + }, + "parameters": { + "ResourceGroupName": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group within the user's subscription. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method" + }, + "StorageTaskName": { + "name": "storageTaskName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only.", + "pattern": "^[a-z0-9]{3,18}$", + "maxLength": 18, + "minLength": 3, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/storagetasks/resource-manager/readme.az.md b/specification/storagetasks/resource-manager/readme.az.md new file mode 100644 index 000000000000..0fedbd2d5ab6 --- /dev/null +++ b/specification/storagetasks/resource-manager/readme.az.md @@ -0,0 +1,28 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. + +For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage. + +``` yaml $(az) && $(target-mode) != 'core' +az: + extensions: storagetasks + namespace: azure.mgmt.storagetasks + package-name: azure-mgmt-storagetasks +az-output-folder: $(azure-cli-extension-folder)/src/storagetasks +python-sdk-output-folder: "$(az-output-folder)/azext_storagetasks/vendored_sdks/storagetasks" +# add additional configuration here specific for Azure CLI +# refer to the faq.md for more details +``` + + + +This is for command modules that already in azure cli main repo. +``` yaml $(az) && $(target-mode) == 'core' +az: + extensions: storagetasks + namespace: azure.mgmt.storagetasks + package-name: azure-mgmt-storagetasks +az-output-folder: $(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/storagetasks +python-sdk-output-folder: "$(az-output-folder)/vendored_sdks/storagetasks" +``` \ No newline at end of file diff --git a/specification/storagetasks/resource-manager/readme.cli.md b/specification/storagetasks/resource-manager/readme.cli.md new file mode 100644 index 000000000000..c6cf6ad37ea4 --- /dev/null +++ b/specification/storagetasks/resource-manager/readme.cli.md @@ -0,0 +1 @@ +## CLI Common Settings for all the command line tools \ No newline at end of file diff --git a/specification/storagetasks/resource-manager/readme.csharp.md b/specification/storagetasks/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..37dfc2d9a40b --- /dev/null +++ b/specification/storagetasks/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.Azure.Management.StorageTasks + output-folder: $(csharp-sdks-folder)/StorageTasks/Microsoft.Azure.Management.StorageTasks/src/Generated +``` diff --git a/specification/storagetasks/resource-manager/readme.go.md b/specification/storagetasks/resource-manager/readme.go.md new file mode 100644 index 000000000000..935ff6020b90 --- /dev/null +++ b/specification/storagetasks/resource-manager/readme.go.md @@ -0,0 +1,11 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +module-name: sdk/resourcemanager/storagetasks/armstoragetasks +module: github.com/Azure/azure-sdk-for-go/$(module-name) +output-folder: $(go-sdk-folder)/$(module-name) +``` \ No newline at end of file diff --git a/specification/storagetasks/resource-manager/readme.md b/specification/storagetasks/resource-manager/readme.md new file mode 100644 index 000000000000..4aa4434d1739 --- /dev/null +++ b/specification/storagetasks/resource-manager/readme.md @@ -0,0 +1,75 @@ +# storagetasks + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for storagepool. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the storagetasks. + +```yaml +openapi-type: arm +tag: package-2023-01-01 +``` + +### Tag: package-2023-01-01 + +These settings apply only when `--tag=package-2023-01-01` is specified on the command line. + +```yaml $(tag) == 'package-2023-01-01' +input-file: + - Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-net-track2 + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_storagetasks'] +``` + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) \ No newline at end of file diff --git a/specification/storagetasks/resource-manager/readme.python.md b/specification/storagetasks/resource-manager/readme.python.md new file mode 100644 index 000000000000..ef3ca50efcf9 --- /dev/null +++ b/specification/storagetasks/resource-manager/readme.python.md @@ -0,0 +1,18 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(python) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-storagetasks +namespace: azure.mgmt.storagetasks +package-version: 1.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/storagetasks/azure-mgmt-storagetasks/azure/mgmt/storagetasks +``` diff --git a/specification/storagetasks/resource-manager/readme.typescript.md b/specification/storagetasks/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..a681fd6b799f --- /dev/null +++ b/specification/storagetasks/resource-manager/readme.typescript.md @@ -0,0 +1,13 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-storagetasks" + output-folder: "$(typescript-sdks-folder)/sdk/storagetaskss/arm-storagetasks" + payload-flattening-threshold: 1 + generate-metadata: true +``` From 3bb14ffb02c6ee0b39d68bf835ddb4e01960047b Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 12 Jul 2023 17:00:02 -0700 Subject: [PATCH 02/20] Rectify provider namespace to Microsoft.StorageTask and refactor examples into folders --- .../examples/misc/OperationsList.json | 49 +++++ .../DeleteStorageTask.json | 2 +- .../GetStorageTask.json | 4 +- .../PatchStorageTask.json | 8 +- .../PutStorageTask.json | 8 +- .../ListStorageTasksByResourceGroup.json | 8 +- .../ListStorageTasksBySubscription.json | 8 +- .../stable/2023-01-01/storagetasks.json | 181 +++++++++++++++++- 8 files changed, 239 insertions(+), 29 deletions(-) create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/OperationsList.json rename specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/{storageTasks => storageTasksCrud}/DeleteStorageTask.json (79%) rename specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/{storageTasks => storageTasksCrud}/GetStorageTask.json (90%) rename specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/{storageTasks => storageTasksCrud}/PatchStorageTask.json (87%) rename specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/{storageTasks => storageTasksCrud}/PutStorageTask.json (87%) rename specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/{storageTasks => storageTasksList}/ListStorageTasksByResourceGroup.json (89%) rename specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/{storageTasks => storageTasksList}/ListStorageTasksBySubscription.json (89%) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/OperationsList.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/OperationsList.json new file mode 100644 index 000000000000..db6d575e73e3 --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/OperationsList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-01-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.StorageTasks/storageTasks/write", + "display": { + "provider": "Microsoft StorageTasks", + "resource": "Storage Tasks", + "operation": "Create/Update Storage Task", + "description": "Creates a storage task with the specified parameters or update the properties or tags or adds custom domain for the specified storage task." + } + }, + { + "name": "Microsoft.StorageTasks/storageTasks/delete", + "display": { + "provider": "Microsoft StorageTasks", + "resource": "Storage Tasks", + "operation": "Delete Storage Task", + "description": "Deletes an existing storage task." + } + }, + { + "name": "Microsoft.StorageTasks/storageTasks/read", + "display": { + "provider": "Microsoft Storage", + "resource": "Storage Tasks", + "operation": "List/Get Storage Task(s)", + "description": "Returns the list of storage tasks or gets the properties for the specified storage task." + } + }, + { + "name": "Microsoft.StorageTasks/operations/read", + "display": { + "provider": "Microsoft StorageTasks", + "resource": "Operations", + "operation": "Poll Asynchronous Operation", + "description": "Polls the status of an asynchronous operation." + } + } + ] + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/DeleteStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json similarity index 79% rename from specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/DeleteStorageTask.json rename to specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json index 6af97a7d11af..49aa601bb4c4 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/DeleteStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json @@ -9,7 +9,7 @@ "responses": { "202": { "headers": { - "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/locations/westus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/westus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" } }, "204": {} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/GetStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/GetStorageTask.json similarity index 90% rename from specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/GetStorageTask.json rename to specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/GetStorageTask.json index 9d42e661204f..6099c3dee6cd 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/GetStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/GetStorageTask.json @@ -9,9 +9,9 @@ "responses": { "200": { "body": { - "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.Storage/storageTasks/mytask1", + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.StorageTasks/storageTasks/mytask1", "name": "mytask1", - "type": "Microsoft.Storage/storageTasks", + "type": "Microsoft.StorageTasks/storageTasks", "location": "westus", "properties": { "enabled": true, diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PatchStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PatchStorageTask.json similarity index 87% rename from specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PatchStorageTask.json rename to specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PatchStorageTask.json index 3868633a80b9..6122dbdaf845 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PatchStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PatchStorageTask.json @@ -39,12 +39,12 @@ "responses": { "200": { "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-01-01" + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" }, "body": { - "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.Storage/storageTasks/mytask1", + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.StorageTasks/storageTasks/mytask1", "name": "mytask1", - "type": "Microsoft.Storage/storageTasks", + "type": "Microsoft.StorageTasks/storageTasks", "location": "westus", "properties": { "enabled": true, @@ -81,7 +81,7 @@ }, "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-01-01" + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" } } } diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PutStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json similarity index 87% rename from specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PutStorageTask.json rename to specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json index 62232f710f13..246fc2420e10 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/PutStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json @@ -40,12 +40,12 @@ "responses": { "200": { "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-01-01" + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" }, "body": { - "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.Storage/storageTasks/mytask1", + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.StorageTasks/storageTasks/mytask1", "name": "mytask1", - "type": "Microsoft.Storage/storageTasks", + "type": "Microsoft.StorageTasks/storageTasks", "location": "westus", "properties": { "enabled": true, @@ -82,7 +82,7 @@ }, "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-01-01" + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" } } } diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksByResourceGroup.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksByResourceGroup.json similarity index 89% rename from specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksByResourceGroup.json rename to specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksByResourceGroup.json index 593adc6c52d6..27ad993b9189 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksByResourceGroup.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksByResourceGroup.json @@ -9,9 +9,9 @@ "body": { "value": [ { - "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.Storage/storageTasks/mytask1", + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.StorageTasks/storageTasks/mytask1", "name": "mytask1", - "type": "Microsoft.Storage/storageTasks", + "type": "Microsoft.StorageTasks/storageTasks", "location": "eastus", "identity": { "principalId": "2fd475e8-8923-4597-842f-7ce1adfc6c4a", @@ -39,9 +39,9 @@ } }, { - "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.Storage/storageTasks/mytask2", + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.StorageTasks/storageTasks/mytask2", "name": "mytask2", - "type": "Microsoft.Storage/storageTasks", + "type": "Microsoft.StorageTasks/storageTasks", "location": "westus", "properties": { "enabled": true, diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksBySubscription.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksBySubscription.json similarity index 89% rename from specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksBySubscription.json rename to specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksBySubscription.json index 29529dbd3c63..25809be15ccd 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasks/ListStorageTasksBySubscription.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksBySubscription.json @@ -8,9 +8,9 @@ "body": { "value": [ { - "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.Storage/storageTasks/mytask1", + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.StorageTasks/storageTasks/mytask1", "name": "mytask1", - "type": "Microsoft.Storage/storageTasks", + "type": "Microsoft.StorageTasks/storageTasks", "location": "eastus", "identity": { "principalId": "2fd475e8-8923-4597-842f-7ce1adfc6c4a", @@ -38,9 +38,9 @@ } }, { - "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.Storage/storageTasks/mytask2", + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res6117/providers/Microsoft.StorageTasks/storageTasks/mytask2", "name": "mytask2", - "type": "Microsoft.Storage/storageTasks", + "type": "Microsoft.StorageTasks/storageTasks", "location": "westus", "properties": { "enabled": true, diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index eafd0f5126e2..7e15f48fef0e 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "StorageTaskManagementClient", + "title": "StorageTasksManagementClient", "description": "The Azure Storage Tasks Management API.", "version": "2023-01-01" }, @@ -16,7 +16,37 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageTasks/{storageTaskName}": { + "/providers/Microsoft.StorageTasks/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available Storage Tasks Rest API operations.", + "operationId": "Operations_List", + "x-ms-examples": { + "OperationsList": { + "$ref": "./examples/misc/OperationsList.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}": { "put": { "tags": [ "StorageTasks" @@ -25,7 +55,7 @@ "operationId": "StorageTasks_Create", "x-ms-examples": { "PutStorageTask": { - "$ref": "./examples/storageTasks/PutStorageTask.json" + "$ref": "./examples/storageTasksCrud/PutStorageTask.json" } }, "parameters": [ @@ -86,7 +116,7 @@ "operationId": "StorageTasks_Delete", "x-ms-examples": { "PutStorageTask": { - "$ref": "./examples/storageTasks/DeleteStorageTask.json" + "$ref": "./examples/storageTasksCrud/DeleteStorageTask.json" } }, "parameters": [ @@ -135,7 +165,7 @@ "operationId": "StorageTasks_Get", "x-ms-examples": { "GetStorageTask": { - "$ref": "./examples/storageTasks/GetStorageTask.json" + "$ref": "./examples/storageTasksCrud/GetStorageTask.json" } }, "parameters": [ @@ -175,7 +205,7 @@ "description": "Update storage task properties", "x-ms-examples": { "PatchStorageTask": { - "$ref": "./examples/storageTasks/PatchStorageTask.json" + "$ref": "./examples/storageTasksCrud/PatchStorageTask.json" } }, "parameters": [ @@ -229,7 +259,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageTasks": { + "/subscriptions/{subscriptionId}/providers/Microsoft.StorageTasks/storageTasks": { "get": { "tags": [ "StorageTasks" @@ -238,7 +268,7 @@ "description": "Lists all the storage tasks available under the subscription.", "x-ms-examples": { "ListStorageTasksBySubscription": { - "$ref": "./examples/storageTasks/ListStorageTasksBySubscription.json" + "$ref": "./examples/storageTasksList/ListStorageTasksBySubscription.json" } }, "parameters": [ @@ -268,7 +298,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageTasks": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks": { "get": { "tags": [ "StorageTasks" @@ -277,7 +307,7 @@ "description": "Lists all the storage tasks available under the given resource group.", "x-ms-examples": { "ListStorageTasksByResourceGroup": { - "$ref": "./examples/storageTasks/ListStorageTasksByResourceGroup.json" + "$ref": "./examples/storageTasksList/ListStorageTasksByResourceGroup.json" } }, "parameters": [ @@ -580,6 +610,137 @@ } }, "description": "The response from the List Storage Tasks operation." + }, + "OperationListResult": { + "description": "Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of Storage operations supported by the Storage resource provider." + } + } + }, + "Operation": { + "description": "Storage REST API operation definition.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft Storage.", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed etc.", + "type": "string" + }, + "operation": { + "description": "Type of operation: get, read, delete, etc.", + "type": "string" + }, + "description": { + "description": "Description of the operation.", + "type": "string" + } + } + }, + "origin": { + "type": "string", + "description": "The origin of operations." + }, + "properties": { + "description": "Properties of operation, include metric specifications.", + "x-ms-client-flatten": true, + "x-ms-client-name": "OperationProperties", + "$ref": "#/definitions/OperationProperties" + } + } + }, + "OperationProperties": { + "description": "Properties of operation, include metric specifications.", + "properties": { + "serviceSpecification": { + "$ref": "#/definitions/ServiceSpecification", + "description": "One property of operation, include metric specifications." + } + } + }, + "ServiceSpecification": { + "description": "One property of operation, include metric specifications.", + "properties": { + "metricSpecifications": { + "description": "Metric specifications of operation.", + "type": "array", + "items": { + "$ref": "#/definitions/MetricSpecification" + } + } + } + }, + "MetricSpecification": { + "description": "Metric specification of operation.", + "properties": { + "name": { + "type": "string", + "description": "Name of metric specification." + }, + "displayName": { + "type": "string", + "description": "Display name of metric specification." + }, + "displayDescription": { + "type": "string", + "description": "Display description of metric specification." + }, + "unit": { + "type": "string", + "description": "Unit could be Bytes or Count." + }, + "dimensions": { + "description": "Dimensions of storage task parameters.", + "type": "array", + "items": { + "$ref": "#/definitions/Dimension" + } + }, + "aggregationType": { + "type": "string", + "description": "Aggregation type could be Average." + }, + "fillGapWithZero": { + "type": "boolean", + "description": "The property to decide fill gap with zero or not." + }, + "category": { + "type": "string", + "description": "The category this metric specification belong to, could be Capacity." + }, + "resourceIdDimensionNameOverride": { + "type": "string", + "description": "Account Resource Id." + } + } + }, + "Dimension": { + "description": "Dimensions of storage task parameters.", + "properties": { + "name": { + "type": "string", + "description": "Name of dimension parameter." + }, + "displayName": { + "type": "string", + "description": "Display name of dimension parameter." + } + } } }, "parameters": { From 44f0c0d57fead4b7a9f51145d1195bbb61077fb1 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 12 Jul 2023 17:26:19 -0700 Subject: [PATCH 03/20] Address Lint diff failure to use the model from common-types --- .../examples/misc/OperationsList.json | 42 +++--- .../stable/2023-01-01/storagetasks.json | 133 +----------------- 2 files changed, 19 insertions(+), 156 deletions(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/OperationsList.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/OperationsList.json index db6d575e73e3..ed1291b6c369 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/OperationsList.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/OperationsList.json @@ -7,39 +7,33 @@ "body": { "value": [ { - "name": "Microsoft.StorageTasks/storageTasks/write", - "display": { - "provider": "Microsoft StorageTasks", - "resource": "Storage Tasks", - "operation": "Create/Update Storage Task", - "description": "Creates a storage task with the specified parameters or update the properties or tags or adds custom domain for the specified storage task." - } - }, - { - "name": "Microsoft.StorageTasks/storageTasks/delete", + "name": "Microsoft.StorageTasks/storageTasks/read", + "isDataAction": false, "display": { - "provider": "Microsoft StorageTasks", - "resource": "Storage Tasks", - "operation": "Delete Storage Task", - "description": "Deletes an existing storage task." + "provider": "Microsoft StorageTask", + "resource": "StorageTasks", + "operation": "Get or List StorageTask resource(s).", + "description": "Gets or Lists existing StorageTask resource(s)." } }, { - "name": "Microsoft.StorageTasks/storageTasks/read", + "name": "Microsoft.StorageTasks/storageTasks/write", + "isDataAction": false, "display": { - "provider": "Microsoft Storage", - "resource": "Storage Tasks", - "operation": "List/Get Storage Task(s)", - "description": "Returns the list of storage tasks or gets the properties for the specified storage task." + "provider": "Microsoft StorageTask", + "resource": "StorageTasks", + "operation": "Create or Update StorageTask resource.", + "description": "Creates or Updates StorageTask resource." } }, { - "name": "Microsoft.StorageTasks/operations/read", + "name": "Microsoft.StorageTasks/storageTasks/delete", + "isDataAction": false, "display": { - "provider": "Microsoft StorageTasks", - "resource": "Operations", - "operation": "Poll Asynchronous Operation", - "description": "Polls the status of an asynchronous operation." + "provider": "Microsoft StorageTask", + "resource": "StorageTasks", + "operation": "Delete StorageTask resource.", + "description": "Deletes StorageTask resource." } } ] diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 7e15f48fef0e..b8c854fdc2cb 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -37,7 +37,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/OperationListResult" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" } } }, @@ -610,137 +610,6 @@ } }, "description": "The response from the List Storage Tasks operation." - }, - "OperationListResult": { - "description": "Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of results.", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "description": "List of Storage operations supported by the Storage resource provider." - } - } - }, - "Operation": { - "description": "Storage REST API operation definition.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}", - "type": "string" - }, - "display": { - "description": "Display metadata associated with the operation.", - "properties": { - "provider": { - "description": "Service provider: Microsoft Storage.", - "type": "string" - }, - "resource": { - "description": "Resource on which the operation is performed etc.", - "type": "string" - }, - "operation": { - "description": "Type of operation: get, read, delete, etc.", - "type": "string" - }, - "description": { - "description": "Description of the operation.", - "type": "string" - } - } - }, - "origin": { - "type": "string", - "description": "The origin of operations." - }, - "properties": { - "description": "Properties of operation, include metric specifications.", - "x-ms-client-flatten": true, - "x-ms-client-name": "OperationProperties", - "$ref": "#/definitions/OperationProperties" - } - } - }, - "OperationProperties": { - "description": "Properties of operation, include metric specifications.", - "properties": { - "serviceSpecification": { - "$ref": "#/definitions/ServiceSpecification", - "description": "One property of operation, include metric specifications." - } - } - }, - "ServiceSpecification": { - "description": "One property of operation, include metric specifications.", - "properties": { - "metricSpecifications": { - "description": "Metric specifications of operation.", - "type": "array", - "items": { - "$ref": "#/definitions/MetricSpecification" - } - } - } - }, - "MetricSpecification": { - "description": "Metric specification of operation.", - "properties": { - "name": { - "type": "string", - "description": "Name of metric specification." - }, - "displayName": { - "type": "string", - "description": "Display name of metric specification." - }, - "displayDescription": { - "type": "string", - "description": "Display description of metric specification." - }, - "unit": { - "type": "string", - "description": "Unit could be Bytes or Count." - }, - "dimensions": { - "description": "Dimensions of storage task parameters.", - "type": "array", - "items": { - "$ref": "#/definitions/Dimension" - } - }, - "aggregationType": { - "type": "string", - "description": "Aggregation type could be Average." - }, - "fillGapWithZero": { - "type": "boolean", - "description": "The property to decide fill gap with zero or not." - }, - "category": { - "type": "string", - "description": "The category this metric specification belong to, could be Capacity." - }, - "resourceIdDimensionNameOverride": { - "type": "string", - "description": "Account Resource Id." - } - } - }, - "Dimension": { - "description": "Dimensions of storage task parameters.", - "properties": { - "name": { - "type": "string", - "description": "Name of dimension parameter." - }, - "displayName": { - "type": "string", - "description": "Display name of dimension parameter." - } - } } }, "parameters": { From 1795f18205716b775bc6cc93e77c9362983f5cda Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 12 Jul 2023 17:33:27 -0700 Subject: [PATCH 04/20] Update Operations API with defaut response --- .../stable/2023-01-01/storagetasks.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index b8c854fdc2cb..8fafe305ff24 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -19,7 +19,7 @@ "/providers/Microsoft.StorageTasks/operations": { "get": { "tags": [ - "Operations" + "Storage Tasks Operations" ], "description": "Lists all of the available Storage Tasks Rest API operations.", "operationId": "Operations_List", @@ -39,6 +39,12 @@ "schema": { "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { From 01a06840b9b74b6db2e1f5fa3ea76f2c6864ea0b Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Thu, 13 Jul 2023 12:50:50 -0700 Subject: [PATCH 05/20] Add List Storage Task Assignment ARM Ids API --- .../ListStorageTaskAssignmentIds.json | 29 +++++++ .../stable/2023-01-01/storagetasks.json | 75 +++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json new file mode 100644 index 000000000000..b991ebc7935e --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res4228", + "storageTaskName": "mytask1", + "api-version": "2023-01-01", + "monitor": "true" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/microsoft.storage/storageaccounts/acc123/storagetaskassignments/assign123" + }, + { + "id": "subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/microsoft.storage/storageaccounts/acc123/storagetaskassignments/assign455" + }, + { + "id": "subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup3/providers/microsoft.storage/storageaccounts/accxx1/storagetaskassignments/assign123" + }, + { + "id": "subscriptions/28e089f2-9607-4285-a0d0-64dbe3771929/resourcegroups/rgroup4/providers/microsoft.storage/storageaccounts/accxx2/storagetaskassignments/assign123" + } + ] + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 8fafe305ff24..b82207b7d591 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -345,6 +345,51 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/storageTaskAssignments": { + "get": { + "tags": [ + "StorageTasks" + ], + "operationId": "ListStorageTaskAssignmentIds", + "description": "Lists all the storage tasks available under the given resource group.", + "x-ms-examples": { + "ListStorageTasksByResourceGroup": { + "$ref": "./examples/storageTasksList/ListStorageTaskAssignmentIds.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StorageTaskName" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- List of storage tasks in the given resource group retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/StorageTaskAssignmentsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -616,6 +661,36 @@ } }, "description": "The response from the List Storage Tasks operation." + }, + "StorageTaskAssignmentsListResult": { + "type": "object", + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskAssignmentId" + }, + "description": "Gets the list of storage task assignment Ids." + }, + "nextLink": { + "type": "string", + "description": "Request URL that can be used to query next page of storage task assignment Ids. Returned when total number of requested storage task assignment Ids exceed maximum page size.", + "readOnly": true + } + }, + "description": "The response from the List Storage Tasks operation." + }, + "StorageTaskAssignmentId": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ARM Id of the storage task assignments, associated with the storage tasks.", + "readOnly": true + } + }, + "description": "Fetch the Storage task assignment ARM ids." } }, "parameters": { From 5805049555a54a9605553f66fa32675c2c2b7380 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Thu, 13 Jul 2023 16:45:09 -0700 Subject: [PATCH 06/20] Add POST List Storage Task Run Report Summary API --- .../ListStorageTaskAssignmentIds.json | 2 +- .../ListStorageTasksRunReportSummary.json | 49 +++++ .../stable/2023-01-01/storagetasks.json | 176 +++++++++++++++++- 3 files changed, 225 insertions(+), 2 deletions(-) create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json index b991ebc7935e..a477e23341ce 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "{subscription-id}", - "resourceGroupName": "res4228", + "resourceGroupName": "rgroup1", "storageTaskName": "mytask1", "api-version": "2023-01-01", "monitor": "true" diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json new file mode 100644 index 000000000000..887ee21e4b50 --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "rgroup1", + "storageTaskName": "mytask1", + "api-version": "2023-01-01", + "monitor": "true" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign1", + "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", + "startTime": "2023-06-23T00:30:43.226744Z", + "finishTime": "2023-06-23T00:40:10.2931264Z", + "objectsTargetedCount": "150", + "objectsOperatedOnCount": "150", + "objectFailedCount": "0", + "objectsSucceededCount": "150", + "runStatusError": "0", + "runStatusEnum": "Finished", + "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", + "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", + "taskVersion": "1", + "runResult": "Succeeded" + }, + { + "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign2", + "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", + "startTime": "2023-06-23T00:30:43.226744Z", + "finishTime": "2023-06-23T00:40:10.2931264Z", + "objectsTargetedCount": "500", + "objectsOperatedOnCount": "500", + "objectFailedCount": "300", + "objectsSucceededCount": "200", + "runStatusError": "0", + "runStatusEnum": "Finished", + "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", + "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", + "taskVersion": "1", + "runResult": "Failed" + } + ] + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index b82207b7d591..7fad55fda252 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -365,6 +365,12 @@ { "$ref": "#/parameters/StorageTaskName" }, + { + "name": "$maxpagesize", + "in": "query", + "type": "string", + "description": "Optional, specifies the maximum number of storage task assignment Ids to be included in the list response." + }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, @@ -374,7 +380,7 @@ ], "responses": { "200": { - "description": "OK -- List of storage tasks in the given resource group retrieved and returned successfully.", + "description": "OK -- List of storage task assignment Ids retrieved and returned successfully.", "schema": { "$ref": "#/definitions/StorageTaskAssignmentsListResult" } @@ -390,6 +396,63 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/storageTaskAssignmentsExecutionSummary": { + "post": { + "tags": [ + "StorageTasks" + ], + "operationId": "ListStorageTasksRunReportSummary", + "description": "Fetch the storage tasks run report summary for each assignment.", + "x-ms-examples": { + "ListStorageTasksByResourceGroup": { + "$ref": "./examples/storageTasksList/ListStorageTasksRunReportSummary.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StorageTaskName" + }, + { + "name": "$maxpagesize", + "in": "query", + "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/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- Storage tasks run report summary retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/StorageTasksRunSummaryList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -691,6 +754,117 @@ } }, "description": "Fetch the Storage task assignment ARM ids." + }, + "StorageTasksRunSummaryList": { + "type": "object", + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskRunStatus" + }, + "description": "Gets storage tasks run result summary." + }, + "nextLink": { + "type": "string", + "description": "Request URL that can be used to query next page of storage task run results summary. Returned when the number of run instances and summary reports exceed maximum page size.", + "readOnly": true + } + }, + "description": "Fetch Storage Tasks Run Summary." + }, + "StorageTaskRunStatus": { + "type": "object", + "properties": { + "taskAssignmentId": { + "readOnly": true, + "type": "string", + "description": "Represents the Storage Task Assignment Id associated with the storage task that provided an execution context." + }, + "storageAccountId": { + "readOnly": true, + "type": "string", + "description": "Represents the Storage Account Id where the storage task definition was applied and executed." + }, + "startTime": { + "readOnly": true, + "type": "string", + "description": "Start time of the run instance. Filter options such startTime gt '2023-06-26T20:51:24.4494016Z' and other comparision operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + }, + "finishTime": { + "readOnly": true, + "type": "string", + "description": "End time of the run instance. Filter options such startTime gt '2023-06-26T20:51:24.4494016Z' and other comparision operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + }, + "objectsTargetedCount": { + "readOnly": true, + "type": "string", + "description": "Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparision operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + }, + "objectsOperatedOnCount": { + "readOnly": true, + "type": "string", + "description": "Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparision operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + }, + "objectFailedCount": { + "readOnly": true, + "type": "string", + "description": "Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparision operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + }, + "objectsSucceededCount": { + "readOnly": true, + "type": "string", + "description": "Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparision operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + }, + "runStatusError": { + "readOnly": true, + "type": "string", + "description": "Well known Azure Storage errorcode that represents the error encountered during execution of the run instance." + }, + "runStatusEnum": { + "readOnly": true, + "type": "string", + "enum": [ + "InProgress", + "Finished" + ], + "x-ms-enum": { + "name": "RunStatusEnum", + "modelAsString": true + }, + "description": "Represnets the status of the execution." + }, + "summaryReportPath": { + "readOnly": true, + "type": "string", + "description": "Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. " + }, + "taskId": { + "readOnly": true, + "type": "string", + "description": "Storage Task Arm Id." + }, + "taskVersion": { + "readOnly": true, + "type": "string", + "description": "Storage Task Version" + }, + "runResult": { + "readOnly": true, + "type": "string", + "enum": [ + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "RunResult", + "modelAsString": true + }, + "description": "Reprents the overall result of the execution for the run instance" + } + }, + "description": "Storage task execution report for a run instance." } }, "parameters": { From ec1fd91124948845d983d1a21a033188e7bf5b5c Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Thu, 13 Jul 2023 17:10:04 -0700 Subject: [PATCH 07/20] Adding x-ms-identifiers --- .../stable/2023-01-01/storagetasks.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 7fad55fda252..9b3aeff8300a 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -346,7 +346,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/storageTaskAssignments": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/storageTaskAssignments": { "get": { "tags": [ "StorageTasks" @@ -397,7 +397,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/storageTaskAssignmentsExecutionSummary": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/storageTaskAssignmentsExecutionSummary": { "post": { "tags": [ "StorageTasks" @@ -715,6 +715,7 @@ "items": { "$ref": "#/definitions/StorageTask" }, + "x-ms-identifiers": [], "description": "Gets the list of storage tasks and their properties." }, "nextLink": { @@ -734,6 +735,7 @@ "items": { "$ref": "#/definitions/StorageTaskAssignmentId" }, + "x-ms-identifiers": [], "description": "Gets the list of storage task assignment Ids." }, "nextLink": { @@ -764,6 +766,7 @@ "items": { "$ref": "#/definitions/StorageTaskRunStatus" }, + "x-ms-identifiers": [], "description": "Gets storage tasks run result summary." }, "nextLink": { From c587bebda92ab3bc4acee5ee4fc6ba077c1cd619 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Thu, 13 Jul 2023 17:11:53 -0700 Subject: [PATCH 08/20] Spell corrections --- .../stable/2023-01-01/storagetasks.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 9b3aeff8300a..f4a4f9f90349 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -793,32 +793,32 @@ "startTime": { "readOnly": true, "type": "string", - "description": "Start time of the run instance. Filter options such startTime gt '2023-06-26T20:51:24.4494016Z' and other comparision operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + "description": "Start time of the run instance. Filter options such startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" }, "finishTime": { "readOnly": true, "type": "string", - "description": "End time of the run instance. Filter options such startTime gt '2023-06-26T20:51:24.4494016Z' and other comparision operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + "description": "End time of the run instance. Filter options such startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" }, "objectsTargetedCount": { "readOnly": true, "type": "string", - "description": "Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparision operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + "description": "Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" }, "objectsOperatedOnCount": { "readOnly": true, "type": "string", - "description": "Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparision operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + "description": "Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" }, "objectFailedCount": { "readOnly": true, "type": "string", - "description": "Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparision operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + "description": "Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" }, "objectsSucceededCount": { "readOnly": true, "type": "string", - "description": "Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparision operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + "description": "Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" }, "runStatusError": { "readOnly": true, From fd76adacc95979581ce084f4fb4e2f67ee80aa75 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Thu, 13 Jul 2023 17:22:15 -0700 Subject: [PATCH 09/20] Fix spell check errors --- .../stable/2023-01-01/storagetasks.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index f4a4f9f90349..8882f3d996d4 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -823,7 +823,7 @@ "runStatusError": { "readOnly": true, "type": "string", - "description": "Well known Azure Storage errorcode that represents the error encountered during execution of the run instance." + "description": "Well known Azure Storage error code that represents the error encountered during execution of the run instance." }, "runStatusEnum": { "readOnly": true, @@ -836,7 +836,7 @@ "name": "RunStatusEnum", "modelAsString": true }, - "description": "Represnets the status of the execution." + "description": "Represents the status of the execution." }, "summaryReportPath": { "readOnly": true, @@ -864,7 +864,7 @@ "name": "RunResult", "modelAsString": true }, - "description": "Reprents the overall result of the execution for the run instance" + "description": "Represents the overall result of the execution for the run instance" } }, "description": "Storage task execution report for a run instance." From 29a97c870e6bd03212790b7a15b2f676868d3f1d Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Fri, 14 Jul 2023 16:27:55 -0700 Subject: [PATCH 10/20] Add 201 response code to PUT task operation --- .../storageTasksCrud/PutStorageTask.json | 42 +++++++++++++++++++ .../stable/2023-01-01/storagetasks.json | 8 +++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json index 246fc2420e10..9933ff0789ad 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json @@ -80,6 +80,48 @@ } } }, + "201": { + "headers": { + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" + }, + "body": { + "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.StorageTasks/storageTasks/mytask1", + "name": "mytask1", + "type": "Microsoft.StorageTasks/storageTasks", + "location": "westus", + "properties": { + "enabled": true, + "description": "Storage task", + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Cool')]]", + "operations": [ + { + "name": "SetBlobTier", + "parameters": { + "tier": "Hot" + }, + "onSuccess": "continue", + "onFailure": "break" + } + ] + }, + "else": { + "operations": [ + { + "name": "DeleteBlob", + "onSuccess": "continue", + "onFailure": "break" + } + ] + } + }, + "taskVersion": 1, + "provisioningState": "Succeeded", + "creationTimeInUtc": "2023-07-06T00:24:59.1441663Z" + } + } + }, "202": { "headers": { "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 8882f3d996d4..e587bdc41a08 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -94,6 +94,12 @@ "$ref": "#/definitions/StorageTask" } }, + "201": { + "description": "OK -- Create storage task with the same properties specified in the request body.", + "schema": { + "$ref": "#/definitions/StorageTask" + } + }, "202": { "description": "Accepted -- Create or update request accepted; operation will complete asynchronously.", "headers": { @@ -398,7 +404,7 @@ } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/storageTaskAssignmentsExecutionSummary": { - "post": { + "get": { "tags": [ "StorageTasks" ], From 6d34597506aa70b91a8327e45851fadb992c1956 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Tue, 25 Jul 2023 17:27:40 -0700 Subject: [PATCH 11/20] Address minor changes and comments to reuse existing schema, update examples --- .../storageTasksCrud/DeleteStorageTask.json | 5 +- .../storageTasksCrud/GetStorageTask.json | 4 +- .../storageTasksCrud/PatchStorageTask.json | 2 +- .../storageTasksCrud/PutStorageTask.json | 2 +- .../ListStorageTaskAssignmentIds.json | 10 +- .../ListStorageTasksByResourceGroup.json | 2 +- .../ListStorageTasksBySubscription.json | 2 +- .../ListStorageTasksRunReportSummary.json | 2 +- .../stable/2023-01-01/storagetasks.json | 101 +++++++++--------- 9 files changed, 65 insertions(+), 65 deletions(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json index 49aa601bb4c4..fa6531a47dab 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json @@ -1,6 +1,6 @@ { "parameters": { - "subscriptionId": "{subscription-id}", + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", "resourceGroupName": "res4228", "storageTaskName": "mytask1", "api-version": "2023-01-01", @@ -12,6 +12,7 @@ "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/westus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" } }, - "204": {} + "204": {}, + "200": {} } } diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/GetStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/GetStorageTask.json index 6099c3dee6cd..acb05eed3866 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/GetStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/GetStorageTask.json @@ -1,6 +1,6 @@ { "parameters": { - "subscriptionId": "{subscription-id}", + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", "resourceGroupName": "res4228", "storageTaskName": "mytask1", "api-version": "2023-01-01", @@ -9,7 +9,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.StorageTasks/storageTasks/mytask1", + "id": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageTasks/storageTasks/mytask1", "name": "mytask1", "type": "Microsoft.StorageTasks/storageTasks", "location": "westus", diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PatchStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PatchStorageTask.json index 6122dbdaf845..081c32bab6ad 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PatchStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PatchStorageTask.json @@ -1,6 +1,6 @@ { "parameters": { - "subscriptionId": "{subscription-id}", + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", "resourceGroupName": "res4228", "storageTaskName": "mytask1", "api-version": "2023-01-01", diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json index 9933ff0789ad..50a0f4477805 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/PutStorageTask.json @@ -1,6 +1,6 @@ { "parameters": { - "subscriptionId": "{subscription-id}", + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", "resourceGroupName": "res4228", "storageTaskName": "mytask1", "api-version": "2023-01-01", diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json index a477e23341ce..37d574aa316c 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTaskAssignmentIds.json @@ -1,6 +1,6 @@ { "parameters": { - "subscriptionId": "{subscription-id}", + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", "resourceGroupName": "rgroup1", "storageTaskName": "mytask1", "api-version": "2023-01-01", @@ -11,16 +11,16 @@ "body": { "value": [ { - "id": "subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/microsoft.storage/storageaccounts/acc123/storagetaskassignments/assign123" + "id": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/microsoft.storage/storageaccounts/acc123/storagetaskassignments/assign123" }, { - "id": "subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/microsoft.storage/storageaccounts/acc123/storagetaskassignments/assign455" + "id": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/microsoft.storage/storageaccounts/acc123/storagetaskassignments/assign455" }, { - "id": "subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup3/providers/microsoft.storage/storageaccounts/accxx1/storagetaskassignments/assign123" + "id": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup3/providers/microsoft.storage/storageaccounts/accxx1/storagetaskassignments/assign123" }, { - "id": "subscriptions/28e089f2-9607-4285-a0d0-64dbe3771929/resourcegroups/rgroup4/providers/microsoft.storage/storageaccounts/accxx2/storagetaskassignments/assign123" + "id": "/subscriptions/28e089f2-9607-4285-a0d0-64dbe3771929/resourcegroups/rgroup4/providers/microsoft.storage/storageaccounts/accxx2/storagetaskassignments/assign123" } ] } diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksByResourceGroup.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksByResourceGroup.json index 27ad993b9189..d99c8b061ac9 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksByResourceGroup.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksByResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "subscriptionId": "{subscription-id}", + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", "resourceGroupName": "res6117", "api-version": "2023-01-01" }, diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksBySubscription.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksBySubscription.json index 25809be15ccd..3102f296ae4b 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksBySubscription.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksBySubscription.json @@ -1,6 +1,6 @@ { "parameters": { - "subscriptionId": "{subscription-id}", + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", "api-version": "2023-01-01" }, "responses": { diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json index 887ee21e4b50..96c975397554 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json @@ -1,6 +1,6 @@ { "parameters": { - "subscriptionId": "{subscription-id}", + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", "resourceGroupName": "rgroup1", "storageTaskName": "mytask1", "api-version": "2023-01-01", diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index e587bdc41a08..a4963dc49ef8 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -30,7 +30,7 @@ }, "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -66,7 +66,7 @@ }, "parameters": [ { - "$ref": "#/parameters/ResourceGroupName" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/StorageTaskName" @@ -81,10 +81,10 @@ "description": "The parameters to create a Storage Task." }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -133,16 +133,16 @@ }, "parameters": [ { - "$ref": "#/parameters/ResourceGroupName" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/StorageTaskName" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -154,6 +154,9 @@ } } }, + "200": { + "description": "Accepted -- Resource was deleted." + }, "204": { "description": "NoContent -- specified storage task does not exist." }, @@ -182,16 +185,16 @@ }, "parameters": [ { - "$ref": "#/parameters/ResourceGroupName" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/StorageTaskName" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -222,7 +225,7 @@ }, "parameters": [ { - "$ref": "#/parameters/ResourceGroupName" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/StorageTaskName" @@ -237,10 +240,10 @@ "description": "The parameters to provide to update the storage task resource." }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -285,10 +288,10 @@ }, "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -324,13 +327,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ResourceGroupName" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -366,7 +369,7 @@ }, "parameters": [ { - "$ref": "#/parameters/ResourceGroupName" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/StorageTaskName" @@ -378,10 +381,10 @@ "description": "Optional, specifies the maximum number of storage task assignment Ids to be included in the list response." }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -417,7 +420,7 @@ }, "parameters": [ { - "$ref": "#/parameters/ResourceGroupName" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/StorageTaskName" @@ -435,10 +438,10 @@ "description": "Optional. When specified, it can be used to query using reporting properties." }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -465,21 +468,10 @@ "StorageTask": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "Gets or sets the location of the resource. location property cannot be changes for successfully provisioned storage tasks." - }, "identity": { "$ref": "#/definitions/StorageTaskIdentity", "description": "The managed service identity of the resource." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters." - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/StorageTaskProperties", @@ -488,7 +480,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" } ], "description": "Represents Storage Task." @@ -497,7 +489,7 @@ "type": "object", "properties": { "identity": { - "$ref": "#/definitions/StorageTaskIdentity", + "$ref": "../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/SystemAssignedServiceIdentity", "description": "The identity of the resource." }, "tags": { @@ -673,7 +665,7 @@ "UndeleteBlob" ], "x-ms-enum": { - "name": "StorageTaskOperation", + "name": "StorageTaskOperationName", "modelAsString": true } }, @@ -739,7 +731,7 @@ "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/StorageTaskAssignmentId" + "$ref": "#/definitions/StorageTaskAssignment" }, "x-ms-identifiers": [], "description": "Gets the list of storage task assignment Ids." @@ -752,11 +744,12 @@ }, "description": "The response from the List Storage Tasks operation." }, - "StorageTaskAssignmentId": { + "StorageTaskAssignment": { "type": "object", "properties": { "id": { "type": "string", + "format": "arm-id", "description": "ARM Id of the storage task assignments, associated with the storage tasks.", "readOnly": true } @@ -789,11 +782,20 @@ "taskAssignmentId": { "readOnly": true, "type": "string", + "format": "arm-id", "description": "Represents the Storage Task Assignment Id associated with the storage task that provided an execution context." }, "storageAccountId": { "readOnly": true, "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Storage/storageAccounts" + } + ] + }, "description": "Represents the Storage Account Id where the storage task definition was applied and executed." }, "startTime": { @@ -852,6 +854,14 @@ "taskId": { "readOnly": true, "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.StorageTasks/storageTasks" + } + ] + }, "description": "Storage Task Arm Id." }, "taskVersion": { @@ -877,17 +887,6 @@ } }, "parameters": { - "ResourceGroupName": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription. The name is case insensitive.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - }, "StorageTaskName": { "name": "storageTaskName", "in": "path", From d62f7f1a4bb72e182dc90bebdbb7b9b9b46bb7bc Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 26 Jul 2023 11:02:34 -0700 Subject: [PATCH 12/20] Add request body to List Summary Report API, Add Example. Remove 200 status code from Delete Async --- .../storageTasksCrud/DeleteStorageTask.json | 3 +- ...torageTasksRunReportSummaryWithFilter.json | 53 +++++++++++++++++++ .../stable/2023-01-01/storagetasks.json | 48 ++++++++++------- 3 files changed, 83 insertions(+), 21 deletions(-) create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json index fa6531a47dab..ec59c890f854 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksCrud/DeleteStorageTask.json @@ -12,7 +12,6 @@ "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageTasks/locations/westus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01" } }, - "204": {}, - "200": {} + "204": {} } } diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json new file mode 100644 index 000000000000..360d49007706 --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", + "resourceGroupName": "rgroup1", + "storageTaskName": "mytask1", + "api-version": "2023-01-01", + "monitor": "true", + "parameters": { + "filterCondition": "startTime gt '2023-06-22T21:48:04.2982632Z'", + "maxPageSize": 50 + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign1", + "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", + "startTime": "2023-06-23T00:30:43.226744Z", + "finishTime": "2023-06-23T00:40:10.2931264Z", + "objectsTargetedCount": "150", + "objectsOperatedOnCount": "150", + "objectFailedCount": "0", + "objectsSucceededCount": "150", + "runStatusError": "0", + "runStatusEnum": "Finished", + "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", + "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", + "taskVersion": "1", + "runResult": "Succeeded" + }, + { + "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign2", + "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", + "startTime": "2023-06-23T00:30:43.226744Z", + "finishTime": "2023-06-23T00:40:10.2931264Z", + "objectsTargetedCount": "500", + "objectsOperatedOnCount": "500", + "objectFailedCount": "300", + "objectsSucceededCount": "200", + "runStatusError": "0", + "runStatusEnum": "Finished", + "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", + "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", + "taskVersion": "1", + "runResult": "Failed" + } + ] + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index a4963dc49ef8..586a1eac18af 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -154,9 +154,6 @@ } } }, - "200": { - "description": "Accepted -- Resource was deleted." - }, "204": { "description": "NoContent -- specified storage task does not exist." }, @@ -406,8 +403,8 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/storageTaskAssignmentsExecutionSummary": { - "get": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/fetchReportSummary": { + "post": { "tags": [ "StorageTasks" ], @@ -425,23 +422,20 @@ { "$ref": "#/parameters/StorageTaskName" }, - { - "name": "$maxpagesize", - "in": "query", - "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" }, { "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/StorageTaskReportParameters" + }, + "description": "The parameters to create a Storage Task." } ], "responses": { @@ -756,6 +750,22 @@ }, "description": "Fetch the Storage task assignment ARM ids." }, + "StorageTaskReportParameters": { + "type": "object", + "properties": { + "filterCondition": { + "type": "string", + "description": "Filter the response based on the condition provided. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + }, + "maxPageSize": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "format": "int64", + "description": "Request for a max page size." + } + } + }, "StorageTasksRunSummaryList": { "type": "object", "properties": { @@ -801,12 +811,12 @@ "startTime": { "readOnly": true, "type": "string", - "description": "Start time of the run instance. Filter options such startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + "description": "Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" }, "finishTime": { "readOnly": true, "type": "string", - "description": "End time of the run instance. Filter options such startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" + "description": "End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" }, "objectsTargetedCount": { "readOnly": true, From 523649e2d05ff4c425c05c4936493a483fadead0 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 26 Jul 2023 11:12:35 -0700 Subject: [PATCH 13/20] Add example reference to API file --- .../ListStorageTasksRunReportSummaryWithFilter.json | 3 ++- .../stable/2023-01-01/storagetasks.json | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json index 360d49007706..29e55fa93224 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json @@ -46,7 +46,8 @@ "taskVersion": "1", "runResult": "Failed" } - ] + ], + "nextLink": "nextlink" } } } diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 586a1eac18af..535d4b2c9882 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -48,7 +48,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } }, @@ -413,6 +413,9 @@ "x-ms-examples": { "ListStorageTasksByResourceGroup": { "$ref": "./examples/storageTasksList/ListStorageTasksRunReportSummary.json" + }, + "ListStorageTasksRunReportSummaryWithFilter": { + "$ref": "./examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json" } }, "parameters": [ From 9953b7274c8dfaec24cb74ecac1dbd6b45bee58c Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 26 Jul 2023 13:00:01 -0700 Subject: [PATCH 14/20] Adding Storage task action preview API with example --- .../PerformStorageTaskActionsPreview.json | 291 ++++++++++++++++++ .../stable/2023-01-01/storagetasks.json | 198 +++++++++++- 2 files changed, 488 insertions(+), 1 deletion(-) create mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/PerformStorageTaskActionsPreview.json diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/PerformStorageTaskActionsPreview.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/PerformStorageTaskActionsPreview.json new file mode 100644 index 000000000000..5ae8ec3a123c --- /dev/null +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/misc/PerformStorageTaskActionsPreview.json @@ -0,0 +1,291 @@ +{ + "parameters": { + "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", + "api-version": "2023-01-01", + "monitor": "true", + "parameters": { + "properties": { + "container": { + "name": "firstContainer", + "metadata": [ + { + "key": "mContainerKey1", + "value": "mContainerValue1" + } + ] + }, + "blobs": [ + { + "name": "folder1/file1.txt", + "properties": [ + { + "key": "Creation-Time", + "value": "Wed, 07 Jun 2023 05:23:29 GMT" + }, + { + "key": "Last-Modified", + "value": "Wed, 07 Jun 2023 05:23:29 GMT" + }, + { + "key": "Etag", + "value": "0x8DB67175454D36D" + }, + { + "key": "Content-Length", + "value": "38619" + }, + { + "key": "Content-Type", + "value": "text/xml" + }, + { + "key": "Content-Encoding", + "value": "" + }, + { + "key": "Content-Language", + "value": "" + }, + { + "key": "Content-CRC64", + "value": "" + }, + { + "key": "Content-MD5", + "value": "njr6iDrmU9+FC89WMK22EA==" + }, + { + "key": "Cache-Control", + "value": "" + }, + { + "key": "Content-Disposition", + "value": "" + }, + { + "key": "BlobType", + "value": "BlockBlob" + }, + { + "key": "AccessTier", + "value": "Hot" + }, + { + "key": "AccessTierInferred", + "value": "true" + }, + { + "key": "LeaseStatus", + "value": "unlocked" + }, + { + "key": "LeaseState", + "value": "available" + }, + { + "key": "ServerEncrypted", + "value": "true" + }, + { + "key": "TagCount", + "value": "1" + } + ], + "metadata": [ + { + "key": "mKey1", + "value": "mValue1" + } + ], + "tags": [ + { + "key": "tKey1", + "value": "tValue1" + } + ] + }, + { + "name": "folder2/file1.txt", + "properties": [ + { + "key": "Creation-Time", + "value": "Wed, 06 Jun 2023 05:23:29 GMT" + }, + { + "key": "Last-Modified", + "value": "Wed, 06 Jun 2023 05:23:29 GMT" + }, + { + "key": "Etag", + "value": "0x6FB67175454D36D" + } + ], + "metadata": [ + { + "key": "mKey2", + "value": "mValue2" + } + ], + "tags": [ + { + "key": "tKey2", + "value": "tValue2" + } + ] + } + ], + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Hot')]]" + }, + "elseBlockExists": true + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "container": { + "name": "firstContainer", + "metadata": [ + { + "key": "mContainerKey1", + "value": "mContainerValue1" + } + ] + }, + "blobs": [ + { + "name": "folder1/file1.txt", + "matchedBlock": "If", + "properties": [ + { + "key": "Creation-Time", + "value": "Wed, 07 Jun 2023 05:23:29 GMT" + }, + { + "key": "Last-Modified", + "value": "Wed, 07 Jun 2023 05:23:29 GMT" + }, + { + "key": "Etag", + "value": "0x8DB67175454D36D" + }, + { + "key": "Content-Length", + "value": "38619" + }, + { + "key": "Content-Type", + "value": "text/xml" + }, + { + "key": "Content-Encoding", + "value": "" + }, + { + "key": "Content-Language", + "value": "" + }, + { + "key": "Content-CRC64", + "value": "" + }, + { + "key": "Content-MD5", + "value": "njr6iDrmU9+FC89WMK22EA==" + }, + { + "key": "Cache-Control", + "value": "" + }, + { + "key": "Content-Disposition", + "value": "" + }, + { + "key": "BlobType", + "value": "BlockBlob" + }, + { + "key": "AccessTier", + "value": "Hot" + }, + { + "key": "AccessTierInferred", + "value": "true" + }, + { + "key": "LeaseStatus", + "value": "unlocked" + }, + { + "key": "LeaseState", + "value": "available" + }, + { + "key": "ServerEncrypted", + "value": "true" + }, + { + "key": "TagCount", + "value": "1" + } + ], + "metadata": [ + { + "key": "mKey1", + "value": "mValue1" + } + ], + "tags": [ + { + "key": "tKey1", + "value": "tValue1" + } + ] + }, + { + "name": "folder2/file1.txt", + "matchedBlock": "Else", + "properties": [ + { + "key": "Creation-Time", + "value": "Wed, 06 Jun 2023 05:23:29 GMT" + }, + { + "key": "Last-Modified", + "value": "Wed, 06 Jun 2023 05:23:29 GMT" + }, + { + "key": "Etag", + "value": "0x6FB67175454D36D" + } + ], + "metadata": [ + { + "key": "mKey2", + "value": "mValue2" + } + ], + "tags": [ + { + "key": "tKey2", + "value": "tValue2" + } + ] + } + ], + "action": { + "if": { + "condition": "[[equals(AccessTier, 'Hot')]]" + }, + "elseBlockExists": true + } + } + } + } + } +} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 535d4b2c9882..fba958fbba84 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -438,7 +438,7 @@ "schema": { "$ref": "#/definitions/StorageTaskReportParameters" }, - "description": "The parameters to create a Storage Task." + "description": "Optional filter conditions." } ], "responses": { @@ -459,6 +459,51 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.StorageTasks/previewActions": { + "post": { + "tags": [ + "StorageTasks" + ], + "operationId": "StorageTaskActionsPreview", + "description": "Runs the input conditions against input object metadata properties and designates matched objects in response.", + "x-ms-examples": { + "PerformStorageTaskActionsPreview": { + "$ref": "./examples/misc/PerformStorageTaskActionsPreview.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/StorageTaskPreviewAction" + }, + "description": "The parameters to preview action condition." + } + ], + "responses": { + "200": { + "description": "OK -- Storage tasks preview action was performed and returned successfully.", + "schema": { + "$ref": "#/definitions/StorageTaskPreviewAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -897,6 +942,157 @@ } }, "description": "Storage task execution report for a run instance." + }, + "StorageTaskPreviewAction": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/StorageTaskPreviewActionProperties", + "description": "Properties of the storage task preview." + } + }, + "required": [ + "properties" + ], + "description": "Storage Task Preview Action." + }, + "StorageTaskPreviewActionProperties": { + "type": "object", + "properties": { + "container": { + "type": "object", + "$ref": "#/definitions/StorageTaskPreviewContainerProperties", + "description": "Preview action container properties to be tested for a match with the provided condition." + }, + "blobs": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskPreviewBlobProperties" + }, + "x-ms-identifiers": [], + "description": "Preview action container properties to be tested for a match with the provided condition." + }, + "action": { + "type": "object", + "$ref": "#/definitions/StorageTaskPreviewActionCondition", + "description": "Preview action container properties to be tested for a match with the provided condition." + } + }, + "required": [ + "container", + "blobs", + "action" + ], + "description": "Storage task preview action properties." + }, + "StorageTaskPreviewActionCondition": { + "type": "object", + "properties": { + "if": { + "$ref": "#/definitions/StorageTaskPreviewActionIfCondition", + "description": "The condition to be tested for a match with container and blob properties." + }, + "elseBlockExists": { + "type": "boolean", + "description": "Specify whether the else block is present in the condition." + } + }, + "required": [ + "if", + "elseBlockExists" + ], + "description": "Represents the storage task conditions to be tested for a match with container and blob properties." + }, + "StorageTaskPreviewActionIfCondition": { + "type": "object", + "properties": { + "condition": { + "type": "string", + "description": "Storage task condition to bes tested for a match." + } + }, + "description": "Represents storage task preview action condition." + }, + "StorageTaskPreviewContainerProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "property for the container name." + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskPreviewKeyValueProperties" + }, + "x-ms-identifiers": [], + "description": "metadata key value pairs to be tested for a match againsg the provided condition." + } + }, + "description": "Storage task preview container properties" + }, + "StorageTaskPreviewBlobProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "property for the container name." + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskPreviewKeyValueProperties" + }, + "x-ms-identifiers": [], + "description": "properties key value pairs to be tested for a match againsg the provided condition." + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskPreviewKeyValueProperties" + }, + "x-ms-identifiers": [], + "description": "metadata key value pairs to be tested for a match againsg the provided condition." + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageTaskPreviewKeyValueProperties" + }, + "x-ms-identifiers": [], + "description": "tags key value pairs to be tested for a match againsg the provided condition." + }, + "matchedBlock": { + "type": "string", + "readOnly": true, + "enum": [ + "If", + "Else", + "None" + ], + "x-ms-enum": { + "name": "matchedBlockName", + "modelAsString": true + }, + "description": "Represents the condition block name that matched blob properties." + } + }, + "description": "Storage task preview container properties" + }, + "StorageTaskPreviewKeyValueProperties": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Represents the key property of the pair." + }, + "value": { + "type": "string", + "description": "Represents the value property of the pair." + } + }, + "description": "Storage task preview object key value pair properties." } }, "parameters": { From b5db2bd5f9703aad754d57934bb490153d600f9a Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 26 Jul 2023 13:05:30 -0700 Subject: [PATCH 15/20] Correct spelling --- .../stable/2023-01-01/storagetasks.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index fba958fbba84..b8c4354420a3 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -1027,7 +1027,7 @@ "$ref": "#/definitions/StorageTaskPreviewKeyValueProperties" }, "x-ms-identifiers": [], - "description": "metadata key value pairs to be tested for a match againsg the provided condition." + "description": "metadata key value pairs to be tested for a match against the provided condition." } }, "description": "Storage task preview container properties" @@ -1045,7 +1045,7 @@ "$ref": "#/definitions/StorageTaskPreviewKeyValueProperties" }, "x-ms-identifiers": [], - "description": "properties key value pairs to be tested for a match againsg the provided condition." + "description": "properties key value pairs to be tested for a match against the provided condition." }, "metadata": { "type": "array", @@ -1053,7 +1053,7 @@ "$ref": "#/definitions/StorageTaskPreviewKeyValueProperties" }, "x-ms-identifiers": [], - "description": "metadata key value pairs to be tested for a match againsg the provided condition." + "description": "metadata key value pairs to be tested for a match against the provided condition." }, "tags": { "type": "array", @@ -1061,7 +1061,7 @@ "$ref": "#/definitions/StorageTaskPreviewKeyValueProperties" }, "x-ms-identifiers": [], - "description": "tags key value pairs to be tested for a match againsg the provided condition." + "description": "tags key value pairs to be tested for a match against the provided condition." }, "matchedBlock": { "type": "string", From 93ca09e2a075eaa4e175237982a685b0a4d51569 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Wed, 26 Jul 2023 15:11:14 -0700 Subject: [PATCH 16/20] Addig allowed resource type constraint --- .../stable/2023-01-01/storagetasks.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index b8c4354420a3..dd8b30dfbd43 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -841,6 +841,13 @@ "readOnly": true, "type": "string", "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Storage/storageAccounts/storageTaskAssignments" + } + ] + }, "description": "Represents the Storage Task Assignment Id associated with the storage task that provided an execution context." }, "storageAccountId": { From b56f6ae2b782e877d2d6f9b1531e66cec9dbe896 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Thu, 27 Jul 2023 16:52:23 -0700 Subject: [PATCH 17/20] Change the Reporting API to GET with Arm resource type Microsoft.StorageTasks/storageTasks/reports --- .../ListStorageTasksRunReportSummary.json | 69 +++++++----- ...torageTasksRunReportSummaryWithFilter.json | 54 ---------- .../stable/2023-01-01/storagetasks.json | 101 ++++++------------ 3 files changed, 74 insertions(+), 150 deletions(-) delete mode 100644 specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json index 96c975397554..c84f901139da 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummary.json @@ -11,38 +11,49 @@ "body": { "value": [ { - "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign1", - "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", - "startTime": "2023-06-23T00:30:43.226744Z", - "finishTime": "2023-06-23T00:40:10.2931264Z", - "objectsTargetedCount": "150", - "objectsOperatedOnCount": "150", - "objectFailedCount": "0", - "objectsSucceededCount": "150", - "runStatusError": "0", - "runStatusEnum": "Finished", - "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", - "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", - "taskVersion": "1", - "runResult": "Succeeded" + "id": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/myTaskName/reports/instance1", + "name": "instance1", + "type": "Microsoft.StorageTasks/storageTasks/reports", + "properties": { + "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign1", + "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", + "startTime": "2023-06-23T00:30:43.226744Z", + "finishTime": "2023-06-23T00:40:10.2931264Z", + "objectsTargetedCount": "150", + "objectsOperatedOnCount": "150", + "objectFailedCount": "0", + "objectsSucceededCount": "150", + "runStatusError": "0", + "runStatusEnum": "Finished", + "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", + "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", + "taskVersion": "1", + "runResult": "Succeeded" + } }, { - "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign2", - "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", - "startTime": "2023-06-23T00:30:43.226744Z", - "finishTime": "2023-06-23T00:40:10.2931264Z", - "objectsTargetedCount": "500", - "objectsOperatedOnCount": "500", - "objectFailedCount": "300", - "objectsSucceededCount": "200", - "runStatusError": "0", - "runStatusEnum": "Finished", - "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", - "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", - "taskVersion": "1", - "runResult": "Failed" + "id": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/myTaskName/reports/instance2", + "name": "instance2", + "type": "Microsoft.StorageTasks/storageTasks/reports", + "properties": { + "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign1", + "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", + "startTime": "2023-06-23T00:30:43.226744Z", + "finishTime": "2023-06-23T00:40:10.2931264Z", + "objectsTargetedCount": "150", + "objectsOperatedOnCount": "150", + "objectFailedCount": "0", + "objectsSucceededCount": "150", + "runStatusError": "0", + "runStatusEnum": "Finished", + "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", + "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", + "taskVersion": "1", + "runResult": "Succeeded" + } } - ] + ], + "nextLink": "{nextlink}" } } } diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json deleted file mode 100644 index 29e55fa93224..000000000000 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "parameters": { - "subscriptionId": "1f31ba14-ce16-4281-b9b4-3e78da6e1616", - "resourceGroupName": "rgroup1", - "storageTaskName": "mytask1", - "api-version": "2023-01-01", - "monitor": "true", - "parameters": { - "filterCondition": "startTime gt '2023-06-22T21:48:04.2982632Z'", - "maxPageSize": 50 - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign1", - "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", - "startTime": "2023-06-23T00:30:43.226744Z", - "finishTime": "2023-06-23T00:40:10.2931264Z", - "objectsTargetedCount": "150", - "objectsOperatedOnCount": "150", - "objectFailedCount": "0", - "objectsSucceededCount": "150", - "runStatusError": "0", - "runStatusEnum": "Finished", - "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", - "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", - "taskVersion": "1", - "runResult": "Succeeded" - }, - { - "taskAssignmentId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123/storageTaskAssignments/assign2", - "storageAccountId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.Storage/storageAccounts/acc123", - "startTime": "2023-06-23T00:30:43.226744Z", - "finishTime": "2023-06-23T00:40:10.2931264Z", - "objectsTargetedCount": "500", - "objectsOperatedOnCount": "500", - "objectFailedCount": "300", - "objectsSucceededCount": "200", - "runStatusError": "0", - "runStatusEnum": "Finished", - "summaryReportPath": "https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json", - "taskId": "/subscriptions/9d6baee9-681f-44d8-99f7-d06d180af6bb/resourcegroups/rgroup1/providers/Microsoft.StorageTasks/storageTasks/mytask1", - "taskVersion": "1", - "runResult": "Failed" - } - ], - "nextLink": "nextlink" - } - } - } -} diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index dd8b30dfbd43..ff2d60957d08 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -403,8 +403,8 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/fetchReportSummary": { - "post": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageTasks/storageTasks/{storageTaskName}/reports": { + "get": { "tags": [ "StorageTasks" ], @@ -413,9 +413,6 @@ "x-ms-examples": { "ListStorageTasksByResourceGroup": { "$ref": "./examples/storageTasksList/ListStorageTasksRunReportSummary.json" - }, - "ListStorageTasksRunReportSummaryWithFilter": { - "$ref": "./examples/storageTasksList/ListStorageTasksRunReportSummaryWithFilter.json" } }, "parameters": [ @@ -426,26 +423,29 @@ "$ref": "#/parameters/StorageTaskName" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "name": "$maxpagesize", + "in": "query", + "type": "string", + "description": "Optional, specifies the maximum number of storage task assignment Ids to be included in the list response." }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "name": "$filter", + "in": "query", + "type": "string", + "description": "Optional. When specified, it can be used to query using reporting properties." }, { - "name": "parameters", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/StorageTaskReportParameters" - }, - "description": "Optional filter conditions." + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK -- Storage tasks run report summary retrieved and returned successfully.", "schema": { - "$ref": "#/definitions/StorageTasksRunSummaryList" + "$ref": "#/definitions/StorageTaskReportSummary" } }, "default": { @@ -511,7 +511,7 @@ "type": "object", "properties": { "identity": { - "$ref": "#/definitions/StorageTaskIdentity", + "$ref": "../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/ManagedServiceIdentity", "description": "The managed service identity of the resource." }, "properties": { @@ -531,7 +531,7 @@ "type": "object", "properties": { "identity": { - "$ref": "../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/SystemAssignedServiceIdentity", + "$ref": "../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/ManagedServiceIdentity", "description": "The identity of the resource." }, "tags": { @@ -549,37 +549,6 @@ }, "description": "Parameters of the storage task update request" }, - "StorageTaskIdentity": { - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal ID of resource identity." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID of resource." - }, - "type": { - "type": "string", - "description": "The identity type.", - "enum": [ - "None", - "SystemAssigned" - ], - "x-ms-enum": { - "name": "IdentityType", - "modelAsString": true - } - } - }, - "required": [ - "type" - ], - "description": "Identity for the storage task." - }, "StorageTaskProperties": { "type": "object", "properties": { @@ -798,30 +767,14 @@ }, "description": "Fetch the Storage task assignment ARM ids." }, - "StorageTaskReportParameters": { - "type": "object", - "properties": { - "filterCondition": { - "type": "string", - "description": "Filter the response based on the condition provided. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators" - }, - "maxPageSize": { - "type": "integer", - "minimum": 1, - "maximum": 200, - "format": "int64", - "description": "Request for a max page size." - } - } - }, - "StorageTasksRunSummaryList": { + "StorageTaskReportSummary": { "type": "object", "properties": { "value": { "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/StorageTaskRunStatus" + "$ref": "#/definitions/StorageTaskReportInstance" }, "x-ms-identifiers": [], "description": "Gets storage tasks run result summary." @@ -834,7 +787,21 @@ }, "description": "Fetch Storage Tasks Run Summary." }, - "StorageTaskRunStatus": { + "StorageTaskReportInstance": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/StorageTaskReportProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + } + ], + "description": "Storage Tasks run report instance" + }, + "StorageTaskReportProperties": { "type": "object", "properties": { "taskAssignmentId": { From e36123027b97e81cd0332dc730508d0c0d7b5584 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Fri, 28 Jul 2023 10:06:09 -0700 Subject: [PATCH 18/20] Address PR comments, correct and rephrease operation ids --- .../stable/2023-01-01/storagetasks.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index ff2d60957d08..94302f73407d 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -127,7 +127,7 @@ "description": "Delete the storage task resource.", "operationId": "StorageTasks_Delete", "x-ms-examples": { - "PutStorageTask": { + "DeleteStorageTask": { "$ref": "./examples/storageTasksCrud/DeleteStorageTask.json" } }, @@ -357,10 +357,10 @@ "tags": [ "StorageTasks" ], - "operationId": "ListStorageTaskAssignmentIds", + "operationId": "StorageTaskAssigment_List", "description": "Lists all the storage tasks available under the given resource group.", "x-ms-examples": { - "ListStorageTasksByResourceGroup": { + "ListStorageTaskAssignmentsByResourceGroup": { "$ref": "./examples/storageTasksList/ListStorageTaskAssignmentIds.json" } }, @@ -408,7 +408,7 @@ "tags": [ "StorageTasks" ], - "operationId": "ListStorageTasksRunReportSummary", + "operationId": "StorageTasksReport_List", "description": "Fetch the storage tasks run report summary for each assignment.", "x-ms-examples": { "ListStorageTasksByResourceGroup": { @@ -465,7 +465,7 @@ "tags": [ "StorageTasks" ], - "operationId": "StorageTaskActionsPreview", + "operationId": "StorageTasks_PreviewActions", "description": "Runs the input conditions against input object metadata properties and designates matched objects in response.", "x-ms-examples": { "PerformStorageTaskActionsPreview": { From 2896f21d60907841814c4bd37347c2128242143c Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Fri, 28 Jul 2023 10:12:03 -0700 Subject: [PATCH 19/20] Change to proxy resource --- .../Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 94302f73407d..29c548ab49b3 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -796,7 +796,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ], "description": "Storage Tasks run report instance" From cb238c16441321111fbd96d04ea2f97965d5cd76 Mon Sep 17 00:00:00 2001 From: Himanshu Chhabra Date: Fri, 28 Jul 2023 10:18:20 -0700 Subject: [PATCH 20/20] Fix typo --- .../Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json index 29c548ab49b3..4727ca81d16e 100644 --- a/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json +++ b/specification/storagetasks/resource-manager/Microsoft.StorageTasks/stable/2023-01-01/storagetasks.json @@ -357,7 +357,7 @@ "tags": [ "StorageTasks" ], - "operationId": "StorageTaskAssigment_List", + "operationId": "StorageTaskAssignment_List", "description": "Lists all the storage tasks available under the given resource group.", "x-ms-examples": { "ListStorageTaskAssignmentsByResourceGroup": {