From d77efd8e5e5d814edfd7ac622335a0a275acfb20 Mon Sep 17 00:00:00 2001 From: Oleg Terner Date: Mon, 23 Mar 2020 13:46:56 +0200 Subject: [PATCH 1/4] Change storage type to enum --- .../componentLinkedStorageAccounts_API.json | 23 ++++++++++++------- ...tLinkedStorageAccountsCreateAndUpdate.json | 2 +- .../ComponentLinkedStorageAccountsDelete.json | 2 +- .../ComponentLinkedStorageAccountsGet.json | 2 +- .../ComponentLinkedStorageAccountsUpdate.json | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json index 6bdbfd715db4..7189f08cf19b 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json @@ -34,7 +34,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{dataSourceType}": { "get": { "description": "Returns the current linked storage settings for an Application Insights component.", "operationId": "ComponentLinkedStorageAccounts_Get", @@ -52,7 +52,7 @@ "$ref": "#/parameters/ResourceNameParameter" }, { - "$ref": "#/parameters/StorageTypeParameter" + "$ref": "#/parameters/DataSourceTypeParameter" } ], "responses": { @@ -92,7 +92,7 @@ "$ref": "#/parameters/ResourceNameParameter" }, { - "$ref": "#/parameters/StorageTypeParameter" + "$ref": "#/parameters/DataSourceTypeParameter" }, { "name": "LinkedStorageAccountsProperties", @@ -141,7 +141,7 @@ "$ref": "#/parameters/ResourceNameParameter" }, { - "$ref": "#/parameters/StorageTypeParameter" + "$ref": "#/parameters/DataSourceTypeParameter" }, { "name": "LinkedStorageAccountsProperties", @@ -190,7 +190,7 @@ "$ref": "#/parameters/ResourceNameParameter" }, { - "$ref": "#/parameters/StorageTypeParameter" + "$ref": "#/parameters/DataSourceTypeParameter" } ], "responses": { @@ -277,12 +277,19 @@ "description": "The name of the Application Insights component resource.", "x-ms-parameter-location": "method" }, - "StorageTypeParameter": { - "name": "storageType", + "DataSourceTypeParameter": { + "name": "dataSourceType", "in": "path", "required": true, "type": "string", - "description": "The type of the Application Insights component linked storage account.", + "enum": [ + "ServiceProfiler" + ], + "x-ms-enum": { + "name": "DataSourceType", + "modelAsString": false + }, + "description": "The type of the Application Insights component data source for the linked storage account.", "x-ms-parameter-location": "method" } } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json index b7b464c0f018..39697cfff27a 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json @@ -4,7 +4,7 @@ "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", "resourceGroupName": "someResourceGroupName", "resourceName": "myComponent", - "storageType": "serviceprofiler", + "dataSourceType": "ServiceProfiler", "LinkedStorageAccountsProperties": { "properties": { "linkedStorageAccount": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname" diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json index 55cba7ebe2a9..c999de837105 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json @@ -4,7 +4,7 @@ "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", "resourceGroupName": "someResourceGroupName", "resourceName": "myComponent", - "storageType": "serviceprofiler" + "dataSourceType": "ServiceProfiler" }, "responses": { "200": {}, diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json index 6f36db8d5000..e11283453161 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json @@ -4,7 +4,7 @@ "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", "resourceGroupName": "someResourceGroupName", "resourceName": "myComponent", - "storageType": "serviceprofiler" + "dataSourceType": "ServiceProfiler" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json index 4b73bb4c01da..34c90974a094 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json @@ -4,7 +4,7 @@ "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", "resourceGroupName": "someResourceGroupName", "resourceName": "myComponent", - "storageType": "serviceprofiler", + "dataSourceType": "ServiceProfiler", "LinkedStorageAccountsProperties": { "properties": { "linkedStorageAccount": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname" From 0f2e35d449dcaebafa37c5441490f94e42d3e54d Mon Sep 17 00:00:00 2001 From: Oleg Terner Date: Mon, 23 Mar 2020 14:07:57 +0200 Subject: [PATCH 2/4] Update parameter names --- .../componentLinkedStorageAccounts_API.json | 16 ++++++++-------- ...nentLinkedStorageAccountsCreateAndUpdate.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json index 7189f08cf19b..8da12165ad03 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json @@ -34,7 +34,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{dataSourceType}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}": { "get": { "description": "Returns the current linked storage settings for an Application Insights component.", "operationId": "ComponentLinkedStorageAccounts_Get", @@ -52,7 +52,7 @@ "$ref": "#/parameters/ResourceNameParameter" }, { - "$ref": "#/parameters/DataSourceTypeParameter" + "$ref": "#/parameters/StorageTypeParameter" } ], "responses": { @@ -92,7 +92,7 @@ "$ref": "#/parameters/ResourceNameParameter" }, { - "$ref": "#/parameters/DataSourceTypeParameter" + "$ref": "#/parameters/StorageTypeParameter" }, { "name": "LinkedStorageAccountsProperties", @@ -141,7 +141,7 @@ "$ref": "#/parameters/ResourceNameParameter" }, { - "$ref": "#/parameters/DataSourceTypeParameter" + "$ref": "#/parameters/StorageTypeParameter" }, { "name": "LinkedStorageAccountsProperties", @@ -190,7 +190,7 @@ "$ref": "#/parameters/ResourceNameParameter" }, { - "$ref": "#/parameters/DataSourceTypeParameter" + "$ref": "#/parameters/StorageTypeParameter" } ], "responses": { @@ -277,8 +277,8 @@ "description": "The name of the Application Insights component resource.", "x-ms-parameter-location": "method" }, - "DataSourceTypeParameter": { - "name": "dataSourceType", + "StorageTypeParameter": { + "name": "storageType", "in": "path", "required": true, "type": "string", @@ -286,7 +286,7 @@ "ServiceProfiler" ], "x-ms-enum": { - "name": "DataSourceType", + "name": "StorageType", "modelAsString": false }, "description": "The type of the Application Insights component data source for the linked storage account.", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json index 39697cfff27a..8283ea527f45 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json @@ -4,7 +4,7 @@ "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", "resourceGroupName": "someResourceGroupName", "resourceName": "myComponent", - "dataSourceType": "ServiceProfiler", + "storageType": "ServiceProfiler", "LinkedStorageAccountsProperties": { "properties": { "linkedStorageAccount": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname" From 73531427aa6e437efb1feee737ab0ff028dfe67d Mon Sep 17 00:00:00 2001 From: Oleg Terner Date: Mon, 23 Mar 2020 14:20:37 +0200 Subject: [PATCH 3/4] Update parameter names 2 --- .../examples/ComponentLinkedStorageAccountsDelete.json | 2 +- .../examples/ComponentLinkedStorageAccountsGet.json | 2 +- .../examples/ComponentLinkedStorageAccountsUpdate.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json index c999de837105..1dfd3f4e1e99 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json @@ -4,7 +4,7 @@ "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", "resourceGroupName": "someResourceGroupName", "resourceName": "myComponent", - "dataSourceType": "ServiceProfiler" + "storageType": "ServiceProfiler" }, "responses": { "200": {}, diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json index e11283453161..dedc1b4aa6f0 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json @@ -4,7 +4,7 @@ "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", "resourceGroupName": "someResourceGroupName", "resourceName": "myComponent", - "dataSourceType": "ServiceProfiler" + "storageType": "ServiceProfiler" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json index 34c90974a094..e73f9d2db797 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json @@ -4,7 +4,7 @@ "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", "resourceGroupName": "someResourceGroupName", "resourceName": "myComponent", - "dataSourceType": "ServiceProfiler", + "storageType": "ServiceProfiler", "LinkedStorageAccountsProperties": { "properties": { "linkedStorageAccount": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname" From 9deb3f724cfbef96606d17c314011334d00a2561 Mon Sep 17 00:00:00 2001 From: Oleg Terner Date: Mon, 23 Mar 2020 16:54:13 +0200 Subject: [PATCH 4/4] Change enum modeling --- .../2020-03-01-preview/componentLinkedStorageAccounts_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json index 8da12165ad03..68751bbebe02 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json @@ -287,7 +287,7 @@ ], "x-ms-enum": { "name": "StorageType", - "modelAsString": false + "modelAsString": true }, "description": "The type of the Application Insights component data source for the linked storage account.", "x-ms-parameter-location": "method"