From 8a2edcc47478a3e216df5e246e1fc04cb0219264 Mon Sep 17 00:00:00 2001 From: Chris Furmanczyk Date: Fri, 3 Sep 2021 21:54:59 +0000 Subject: [PATCH 1/5] Apply PowerBIDedicated correctness fixes to 2021-01-01 --- .../2021-01-01/examples/createCapacity.json | 33 ++++ .../stable/2021-01-01/powerbidedicated.json | 141 ++++++++++++++++++ 2 files changed, 174 insertions(+) diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json index 253e4a6c0f9a..98f2eaaf47f4 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json @@ -89,6 +89,39 @@ "lastModifiedAt": "2021-01-01T00:00:19.1234567Z" } } + }, + "202": { + "headers": {}, + "body": { + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/servers/azsdktest", + "location": "West US", + "name": "azsdktest", + "properties": { + "administration": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Transitioning", + "state": "Transitioning" + }, + "sku": { + "name": "A1", + "tier": "PBIE_Azure" + }, + "tags": { + "testKey": "testValue" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T00:00:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-01T00:00:19.1234567Z" + } + } } } } diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json index e646c27aec9c..23627a82d2dc 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json @@ -139,6 +139,12 @@ "$ref": "#/definitions/DedicatedCapacity" } }, + "202": { + "description": "InProgress. The operation is still in progress.", + "schema": { + "$ref": "#/definitions/DedicatedCapacity" + } + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -655,6 +661,97 @@ "description": "Operation type: create, update, delete, etc.", "type": "string", "readOnly": true + }, + "description": { + "type": "string", + "description": "Localized description of the operation." + } + } + }, + "origin": { + "type": "string", + "description": "Origin of the operation." + }, + "properties": { + "type": "object", + "description": "Additional properties to expose performance metrics to shoebox.", + "properties": { + "serviceSpecification": { + "type": "object", + "description": "Service specification for exposing performance metrics to shoebox.", + "properties": { + "metricSpecifications": { + "type": "array", + "description": "Metric specification for exposing performance metrics to shoebox.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Metric name" + }, + "displayName": { + "type": "string", + "description": "Localizable metric name" + }, + "displayDescription": { + "type": "string", + "description": "Localizable description of metric" + }, + "unit": { + "type": "string", + "description": "Unit for the metric" + }, + "aggregationType": { + "type": "string", + "description": "Aggregation type for the metric" + }, + "metricFilterPattern": { + "type": "string", + "description": "Pattern used to filter the metric" + }, + "dimensions": { + "type": "array", + "description": "For describing multi dimensional metrics", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Dimension of the metric" + }, + "displayName": { + "type": "string", + "description": "Localizable dimension of the metric" + } + } + } + } + } + } + }, + "logSpecifications": { + "type": "array", + "description": "Log specification for exposing diagnostic logs to shoebox.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the log" + }, + "displayName": { + "type": "string", + "description": "Localizable name of the log" + }, + "blobDuration": { + "type": "string", + "description": "Blob duration for the log" + } + } + } + } + } } } } @@ -842,6 +939,11 @@ "modelAsString": true }, "description": "The name of the Azure pricing tier to which the SKU applies." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "The capacity of the SKU." } }, "required": [ @@ -867,6 +969,14 @@ "name": "Mode", "modelAsString": true } + }, + "tenantId": { + "type": "string", + "description": "Tenant ID for the capacity. Used for creating Pro Plus capacity." + }, + "friendlyName": { + "type": "string", + "description": "Capacity name" } } }, @@ -914,6 +1024,10 @@ "description": "An object that represents SKU details for existing resources", "type": "object", "properties": { + "resourceType": { + "type": "string", + "description": "The resource type" + }, "sku": { "$ref": "#/definitions/CapacitySku", "description": "The SKU in SKU details for existing resources." @@ -931,9 +1045,36 @@ "type": "string", "description": "Error code" }, + "subCode": { + "type": "integer", + "format": "int32", + "description": "Error sub code" + }, + "httpStatusCode": { + "type": "string", + "description": "HTTP status code returned" + }, "message": { "type": "string", "description": "Error message indicating why the operation failed." + }, + "timestamp": { + "type": "string", + "description": "Timestamp for the error" + }, + "details": { + "type": "object", + "description": "The details object", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "message": { + "type": "string", + "description": "Error message indicating why the operation failed." + } + } } } } From b3b5841c0be3d91bcad7d6b6da64649118252643 Mon Sep 17 00:00:00 2001 From: Chris Furmanczyk Date: Wed, 15 Sep 2021 18:41:04 +0000 Subject: [PATCH 2/5] Move PowerBIDedicated properties to new definitions --- .../stable/2021-01-01/powerbidedicated.json | 176 ++++++++++-------- 1 file changed, 99 insertions(+), 77 deletions(-) diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json index 23627a82d2dc..7aa96cad6de7 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json @@ -670,88 +670,16 @@ }, "origin": { "type": "string", - "description": "Origin of the operation." + "description": "Origin of the operation.", + "readOnly": true }, "properties": { "type": "object", "description": "Additional properties to expose performance metrics to shoebox.", "properties": { "serviceSpecification": { - "type": "object", "description": "Service specification for exposing performance metrics to shoebox.", - "properties": { - "metricSpecifications": { - "type": "array", - "description": "Metric specification for exposing performance metrics to shoebox.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Metric name" - }, - "displayName": { - "type": "string", - "description": "Localizable metric name" - }, - "displayDescription": { - "type": "string", - "description": "Localizable description of metric" - }, - "unit": { - "type": "string", - "description": "Unit for the metric" - }, - "aggregationType": { - "type": "string", - "description": "Aggregation type for the metric" - }, - "metricFilterPattern": { - "type": "string", - "description": "Pattern used to filter the metric" - }, - "dimensions": { - "type": "array", - "description": "For describing multi dimensional metrics", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Dimension of the metric" - }, - "displayName": { - "type": "string", - "description": "Localizable dimension of the metric" - } - } - } - } - } - } - }, - "logSpecifications": { - "type": "array", - "description": "Log specification for exposing diagnostic logs to shoebox.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the log" - }, - "displayName": { - "type": "string", - "description": "Localizable name of the log" - }, - "blobDuration": { - "type": "string", - "description": "Blob duration for the log" - } - } - } - } - } + "$ref": "#/definitions/ServiceSpecification" } } } @@ -972,11 +900,13 @@ }, "tenantId": { "type": "string", - "description": "Tenant ID for the capacity. Used for creating Pro Plus capacity." + "description": "Tenant ID for the capacity. Used for creating Pro Plus capacity.", + "readOnly": true }, "friendlyName": { "type": "string", - "description": "Capacity name" + "description": "Capacity name", + "readOnly": true } } }, @@ -1116,6 +1046,98 @@ } } }, + "ServiceSpecification": { + "type": "object", + "description": "Service specification for exposing performance metrics to shoebox.", + "properties": { + "metricSpecifications": { + "type": "array", + "description": "Metric specifications for exposing performance metrics to shoebox.", + "items": { + "$ref": "#/definitions/MetricSpecification" + } + }, + "logSpecifications": { + "type": "array", + "description": "Log specifications for exposing diagnostic logs to shoebox.", + "items": { + "$ref": "#/definitions/LogSpecification" + } + } + } + }, + "MetricSpecification": { + "type": "object", + "description": "Metric specification for exposing performance metrics to shoebox.", + "properties": { + "name": { + "type": "string", + "description": "Metric name", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "Localizable metric name" + }, + "displayDescription": { + "type": "string", + "description": "Localizable description of metric" + }, + "unit": { + "type": "string", + "description": "Unit for the metric", + "readOnly": true + }, + "aggregationType": { + "type": "string", + "description": "Aggregation type for the metric", + "readOnly": true + }, + "metricFilterPattern": { + "type": "string", + "description": "Pattern used to filter the metric", + "readOnly": true + }, + "dimensions": { + "type": "array", + "description": "For describing multi dimensional metrics", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Dimension of the metric", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "Localizable dimension of the metric" + } + } + } + } + } + }, + "LogSpecification": { + "description": "Log specification for exposing diagnostic logs to shoebox.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the log", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "Localizable name of the log" + }, + "blobDuration": { + "type": "string", + "description": "Blob duration for the log", + "readOnly": true + } + } + }, "SystemData": { "description": "Metadata pertaining to creation and last modification of the resource.", "type": "object", From 5e3d3c204360a822444fa86ae05c70eed4c6533b Mon Sep 17 00:00:00 2001 From: Chris Furmanczyk Date: Mon, 22 Nov 2021 16:16:14 +0000 Subject: [PATCH 3/5] Keep ErrorResponse inline with documented expectation --- .../2021-01-01/examples/createCapacity.json | 33 ------------------- .../stable/2021-01-01/powerbidedicated.json | 33 ------------------- 2 files changed, 66 deletions(-) diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json index 98f2eaaf47f4..253e4a6c0f9a 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json @@ -89,39 +89,6 @@ "lastModifiedAt": "2021-01-01T00:00:19.1234567Z" } } - }, - "202": { - "headers": {}, - "body": { - "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/servers/azsdktest", - "location": "West US", - "name": "azsdktest", - "properties": { - "administration": { - "members": [ - "azsdktest@microsoft.com", - "azsdktest2@microsoft.com" - ] - }, - "provisioningState": "Transitioning", - "state": "Transitioning" - }, - "sku": { - "name": "A1", - "tier": "PBIE_Azure" - }, - "tags": { - "testKey": "testValue" - }, - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2021-01-01T00:00:19.1234567Z", - "lastModifiedBy": "user2", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-01-01T00:00:19.1234567Z" - } - } } } } diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json index 7aa96cad6de7..018fd0f70b97 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json @@ -139,12 +139,6 @@ "$ref": "#/definitions/DedicatedCapacity" } }, - "202": { - "description": "InProgress. The operation is still in progress.", - "schema": { - "$ref": "#/definitions/DedicatedCapacity" - } - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -975,36 +969,9 @@ "type": "string", "description": "Error code" }, - "subCode": { - "type": "integer", - "format": "int32", - "description": "Error sub code" - }, - "httpStatusCode": { - "type": "string", - "description": "HTTP status code returned" - }, "message": { "type": "string", "description": "Error message indicating why the operation failed." - }, - "timestamp": { - "type": "string", - "description": "Timestamp for the error" - }, - "details": { - "type": "object", - "description": "The details object", - "properties": { - "code": { - "type": "string", - "description": "Error code" - }, - "message": { - "type": "string", - "description": "Error message indicating why the operation failed." - } - } } } } From 9a8e985e5fab713a65edb0fb29bba03f12873d93 Mon Sep 17 00:00:00 2001 From: Chris Furmanczyk Date: Wed, 22 Dec 2021 19:34:43 +0000 Subject: [PATCH 4/5] Update for ModelValidation failures --- .../2021-01-01/examples/operations.json | 26 +++++++++++++++++++ .../2021-01-01/examples/updateCapacity.json | 5 +++- .../2021-01-01/examples/updateToGen2.json | 5 +++- .../stable/2021-01-01/powerbidedicated.json | 5 ++++ 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json new file mode 100644 index 000000000000..18d931ad522d --- /dev/null +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60", + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "Microsoft.PowerBIDedicated/checkNameAvailability/action", + "isDataAction": false, + "display": { + "provider": "Microsoft.PowerBIDedicated", + "resource": "checkNameAvailability", + "operation": "Capacities_CheckNameAvailability", + "description": "Checks that given Power BI Dedicated Capacity name is valid and not in use." + } + } + ] + } + } + } +} + diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateCapacity.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateCapacity.json index daaf221c3a8d..9da54157b9ca 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateCapacity.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateCapacity.json @@ -57,7 +57,10 @@ } }, "202": { - "headers": {}, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/providers/Microsoft.PowerBIDedicated/locations/westus/operationstatuses/7e4f488e-f071-4b1a-ae84-e25682d09e4c?api-version=2021-01-01", + "Location": "https://management.azure.com/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/providers/Microsoft.PowerBIDedicated/locations/westus/operationresults/7e4f488e-f071-4b1a-ae84-e25682d09e4c?api-version=2021-01-01" + }, "body": { "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/capacities/azsdktest", "location": "West US", diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateToGen2.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateToGen2.json index a1ab3ae18b2b..50a68dbad4d1 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateToGen2.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateToGen2.json @@ -53,7 +53,10 @@ } }, "202": { - "headers": {}, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/providers/Microsoft.PowerBIDedicated/locations/westus/operationstatuses/7e4f488e-f071-4b1a-ae84-e25682d09e4c?api-version=2021-01-01", + "Location": "https://management.azure.com/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/providers/Microsoft.PowerBIDedicated/locations/westus/operationresults/7e4f488e-f071-4b1a-ae84-e25682d09e4c?api-version=2021-01-01" + }, "body": { "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/capacities/azsdktest", "location": "West US", diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json index 501e698a34a1..56f0049b4da0 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/powerbidedicated.json @@ -557,6 +557,11 @@ }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List operations": { + "$ref": "./examples/operations.json" + } } } }, From a8e684971c65f1763f535990620558b6d0df9ced Mon Sep 17 00:00:00 2001 From: Chris Furmanczyk Date: Wed, 22 Dec 2021 19:47:07 +0000 Subject: [PATCH 5/5] cleanup operations example --- .../stable/2021-01-01/examples/operations.json | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json index 18d931ad522d..2bfeff417c5b 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json @@ -9,13 +9,12 @@ "body": { "value": [ { - "name": "Microsoft.PowerBIDedicated/checkNameAvailability/action", - "isDataAction": false, - "display": { - "provider": "Microsoft.PowerBIDedicated", - "resource": "checkNameAvailability", - "operation": "Capacities_CheckNameAvailability", - "description": "Checks that given Power BI Dedicated Capacity name is valid and not in use." + "name": "Microsoft.PowerBIDedicated/checkNameAvailability/action", + "display": { + "provider": "Microsoft.PowerBIDedicated", + "resource": "checkNameAvailability", + "operation": "Capacities_CheckNameAvailability", + "description": "Checks that given Power BI Dedicated Capacity name is valid and not in use." } } ] @@ -23,4 +22,3 @@ } } } -