From dd9434fffe46359ddab47c77cbfc71aff337798c Mon Sep 17 00:00:00 2001 From: visingl Date: Thu, 16 Sep 2021 15:42:15 -0700 Subject: [PATCH 1/6] Enabling Customer Initiated Log Collection Enabling Customer Initiated Log Collection --- .../2020-03-01-preview/deviceupdate.json | 35 +++++++++++++++++++ .../examples/Instances/Instances_Create.json | 13 +++++-- .../examples/Instances/Instances_Get.json | 8 +++-- .../Instances/Instances_ListByAccount.json | 14 ++++++-- .../examples/Instances/Instances_Update.json | 8 +++-- 5 files changed, 69 insertions(+), 9 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index fc3fbfbe8030..61c788dd57d4 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -1087,6 +1087,11 @@ "enableDiagnostics": { "description": "Enables or Disables the diagnostic logs collection", "type": "boolean" + }, + "diagnosticStorageProperties": { + "description": "Customer initiated diagnostic log collection storage properties", + "type": "object", + "$ref": "#/definitions/DiagnosticStorageProperties" } } } @@ -1095,6 +1100,36 @@ "properties" ] }, + "DiagnosticStorageProperties": { + "description": "Customer-initiated diagnostic log collection storage properties", + "type": "object", + "properties": { + "authenticationType": { + "description": "Authentication Type", + "enum": [ + "KeyBased" + ], + "type": "string", + "readOnly": false, + "x-ms-enum": { + "name": "AuthenticationType", + "modelAsString": true + } + }, + "connectionString": { + "description": "ConnectionString of the diagnostic storage account", + "type": "string" + }, + "resourceId": { + "description": "ResourceId of the diagnostic storage account", + "type": "string" + } + }, + "required": [ + "authenticationType", + "resourceId" + ] + }, "InstanceList": { "description": "List of Instances.", "type": "object", diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json index dc732514328b..26cb01c03bc9 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json @@ -15,7 +15,12 @@ "eventHubConnectionString": "string" } ], - "enableDiagnostics": false + "enableDiagnostics": false, + "diagnosticStorageProperties": { + "authenticationType": "KeyBased", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adu-resource-group/providers/Microsoft.Storage/storageAccounts/testAccount", + "connectionString": "string" + } } } }, @@ -35,8 +40,12 @@ } ], "enableDiagnostics": false + }, + "diagnosticStorageProperties": { + "authenticationType": "KeyBased", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adu-resource-group/providers/Microsoft.Storage/storageAccounts/testAccount" } } } } -} +} \ No newline at end of file diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json index 23b2706d98a3..8628f5bc498b 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json @@ -21,9 +21,13 @@ "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" } ], - "enableDiagnostics": false + "enableDiagnostics": false, + "diagnosticStorageProperties": { + "authenticationType": "KeyBased", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adu-resource-group/providers/Microsoft.Storage/storageAccounts/testAccount" + } } } } } -} +} \ No newline at end of file diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json index 162edb2678ee..ff16003dfd5b 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json @@ -23,7 +23,11 @@ "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" } ], - "enableDiagnostics": false + "enableDiagnostics": false, + "diagnosticStorageProperties": { + "authenticationType": "KeyBased", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adu-resource-group/providers/Microsoft.Storage/storageAccounts/testAccount" + } } }, { @@ -39,11 +43,15 @@ "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/red-contoso-hub" } ], - "enableDiagnostics": false + "enableDiagnostics": false, + "diagnosticStorageProperties": { + "authenticationType": "KeyBased", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adu-resource-group/providers/Microsoft.Storage/storageAccounts/testAccount" + } } } ] } } } -} +} \ No newline at end of file diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json index 850030cfa1c0..3389bb296bfe 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json @@ -25,7 +25,11 @@ "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" } ], - "enableDiagnostics": false + "enableDiagnostics": false, + "diagnosticStorageProperties": { + "authenticationType": "KeyBased", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adu-resource-group/providers/Microsoft.Storage/storageAccounts/testAccount" + } }, "tags": { "tagKey": "tagValue" @@ -33,4 +37,4 @@ } } } -} +} \ No newline at end of file From 2426fefa8518da90938a4a9030533b9cd528e1c2 Mon Sep 17 00:00:00 2001 From: visingl Date: Thu, 16 Sep 2021 15:48:58 -0700 Subject: [PATCH 2/6] Update deviceupdate.json --- .../preview/2020-03-01-preview/deviceupdate.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index 61c788dd57d4..1e5658773ffc 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -1118,6 +1118,7 @@ }, "connectionString": { "description": "ConnectionString of the diagnostic storage account", + "x-ms-secret": true, "type": "string" }, "resourceId": { From d059fb33157eb6662c7f8aa97293bee81e802425 Mon Sep 17 00:00:00 2001 From: visingl Date: Thu, 16 Sep 2021 16:07:23 -0700 Subject: [PATCH 3/6] Update Instances_Create.json --- .../examples/Instances/Instances_Create.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json index 26cb01c03bc9..7062f866535a 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json @@ -39,13 +39,13 @@ "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" } ], - "enableDiagnostics": false - }, - "diagnosticStorageProperties": { - "authenticationType": "KeyBased", - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adu-resource-group/providers/Microsoft.Storage/storageAccounts/testAccount" + "enableDiagnostics": false, + "diagnosticStorageProperties": { + "authenticationType": "KeyBased", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adu-resource-group/providers/Microsoft.Storage/storageAccounts/testAccount" + } } } } } -} \ No newline at end of file +} From 0a051cee6994da6f729830ab3a336452fca04a89 Mon Sep 17 00:00:00 2001 From: visingl Date: Thu, 16 Sep 2021 16:16:31 -0700 Subject: [PATCH 4/6] pretty --- .../2020-03-01-preview/examples/Instances/Instances_Get.json | 2 +- .../examples/Instances/Instances_ListByAccount.json | 2 +- .../2020-03-01-preview/examples/Instances/Instances_Update.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json index 8628f5bc498b..2a81fb866f14 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json @@ -30,4 +30,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json index ff16003dfd5b..86d68699867b 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json @@ -54,4 +54,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json index 3389bb296bfe..8157a3e3f3c6 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json @@ -37,4 +37,4 @@ } } } -} \ No newline at end of file +} From 642870a4677c48b87c71fc1075f679b30dd84dd7 Mon Sep 17 00:00:00 2001 From: visingl Date: Tue, 28 Sep 2021 17:43:30 -0700 Subject: [PATCH 5/6] Update deviceupdate.json --- .../preview/2020-03-01-preview/deviceupdate.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index 1e5658773ffc..90519f37292b 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -1089,8 +1089,6 @@ "type": "boolean" }, "diagnosticStorageProperties": { - "description": "Customer initiated diagnostic log collection storage properties", - "type": "object", "$ref": "#/definitions/DiagnosticStorageProperties" } } From 7c86853bf95516f2e8b201c729251beb79d8c5c9 Mon Sep 17 00:00:00 2001 From: visingl Date: Wed, 29 Sep 2021 10:21:06 -0700 Subject: [PATCH 6/6] Update readme.go.md --- specification/deviceupdate/resource-manager/readme.go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/deviceupdate/resource-manager/readme.go.md b/specification/deviceupdate/resource-manager/readme.go.md index 1cd6ddaed47b..dbf931401e66 100644 --- a/specification/deviceupdate/resource-manager/readme.go.md +++ b/specification/deviceupdate/resource-manager/readme.go.md @@ -5,6 +5,7 @@ These settings apply only when `--go` is specified on the command line. ```yaml $(go) go: license-header: MICROSOFT_MIT_NO_VERSION + namespace: deviceupdate clear-output-folder: true ``` @@ -21,6 +22,5 @@ These settings apply only when `--tag=package-2020-03-01-preview --go` is specif Please also specify `--go-sdks-folder=`. ```yaml $(tag) == 'package-2020-03-01-preview' && $(go) -namespace: deviceupdate output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-03-01-preview/$(namespace) ```