From 74a82de784baacadede746695f5283dbd2bdd44c Mon Sep 17 00:00:00 2001 From: Shuo Li Date: Thu, 31 Mar 2022 13:15:11 -0700 Subject: [PATCH 1/4] Changing AD structure so the secret can be created properly --- .../sqlManagedInstances.json | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json index 424ded0f571b..2d543e98fbbd 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json @@ -123,14 +123,10 @@ "readOnly": true, "description": "The provisioning state of the Arc-enabled SQL Managed Instance resource." }, - "keytab": { - "type": "string", - "description": "A base64-encoded keytab.", - "x-ms-mutability": [ - "create", - "update" - ], - "x-ms-secret": true + "activeDirectoryInformation": { + "type": "object", + "description": "Active Directory information related to this SQL Managed Instance.", + "$ref": "#/definitions/ActiveDirectoryInformation" }, "licenseType": { "type": "string", @@ -245,6 +241,33 @@ "type": "object" } }, + "KeytabInformation": { + "type": "object", + "properties": { + "keytab": { + "type": "string", + "description": "A base64-encoded keytab.", + "x-ms-mutability": [ + "create", + "update" + ], + "x-ms-secret": true + } + }, + "required": [ + "keytab" + ] + }, + "ActiveDirectoryInformation": { + "type": "object", + "properties": { + "keytabInformation": { + "type": "object", + "description": "Keytab information that is used for the Sql Managed Instance when Active Directory authentication is used.", + "$ref": "#/definitions/KeytabInformation" + } + } + }, "SqlManagedInstanceListResult": { "description": "A list of SqlManagedInstance.", "type": "object", From 59fc30ddc1b8bb03dab56ea638e818ab016cc3b7 Mon Sep 17 00:00:00 2001 From: Shuo Li Date: Thu, 31 Mar 2022 13:23:10 -0700 Subject: [PATCH 2/4] update examples --- .../examples/CreateOrUpdateSqlManagedInstance.json | 13 +++++++++++++ .../examples/GetSqlManagedInstance.json | 4 ++++ .../ListByResourceGroupSqlManagedInstance.json | 8 ++++++++ .../ListSubscriptionSqlManagedInstance.json | 8 ++++++++ .../examples/UpdateSqlManagedInstance.json | 4 ++++ .../2022-03-01-preview/sqlManagedInstances.json | 5 +---- 6 files changed, 38 insertions(+), 4 deletions(-) diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.json index 429450e7d703..b8fece517f91 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.json @@ -26,6 +26,11 @@ "username": "username", "password": "********" }, + "activeDirectoryInformation": { + "keytabInformation": { + "keytab": "********" + } + }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", "extensionId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension", @@ -64,6 +69,10 @@ "basicLoginInformation": { "username": "username" }, + "activeDirectoryInformation": { + "keytabInformation": { + } + }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", "extensionId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension", @@ -125,6 +134,10 @@ "basicLoginInformation": { "username": "username" }, + "activeDirectoryInformation": { + "keytabInformation": { + } + }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", "extensionId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json index 2e25b0ceed61..059133345e6a 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json @@ -15,6 +15,10 @@ "basicLoginInformation": { "username": "username" }, + "activeDirectoryInformation": { + "keytabInformation": { + } + }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", "extensionId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json index 09812f7dd8d0..3a5bed029604 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json @@ -16,6 +16,10 @@ "basicLoginInformation": { "username": "username" }, + "activeDirectoryInformation": { + "keytabInformation": { + } + }, "licenseType": "LicenseIncluded", "k8sRaw": { "additionalProperty": 1234, @@ -73,6 +77,10 @@ "basicLoginInformation": { "username": "username" }, + "activeDirectoryInformation": { + "keytabInformation": { + } + }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", "extensionId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json index 746ec75061e6..d3aff16ff210 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json @@ -15,6 +15,10 @@ "basicLoginInformation": { "username": "username" }, + "activeDirectoryInformation": { + "keytabInformation": { + } + }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", "extensionId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension", @@ -74,6 +78,10 @@ "basicLoginInformation": { "username": "username" }, + "activeDirectoryInformation": { + "keytabInformation": { + } + }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", "extensionId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.json index c82498320e8f..0bda5fb525f9 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.json @@ -20,6 +20,10 @@ "basicLoginInformation": { "username": "username" }, + "activeDirectoryInformation": { + "keytabInformation": { + } + }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", "extensionId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json index 2d543e98fbbd..18efef507939 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json @@ -253,10 +253,7 @@ ], "x-ms-secret": true } - }, - "required": [ - "keytab" - ] + } }, "ActiveDirectoryInformation": { "type": "object", From bb8691670408106f86c9883fec540f227f38fcad Mon Sep 17 00:00:00 2001 From: Shuo Li Date: Thu, 31 Mar 2022 14:00:12 -0700 Subject: [PATCH 3/4] prettier fix --- .../examples/CreateOrUpdateSqlManagedInstance.json | 6 ++---- .../2022-03-01-preview/examples/GetSqlManagedInstance.json | 3 +-- .../examples/ListByResourceGroupSqlManagedInstance.json | 6 ++---- .../examples/ListSubscriptionSqlManagedInstance.json | 6 ++---- .../examples/UpdateSqlManagedInstance.json | 3 +-- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.json index b8fece517f91..ededbb901aec 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.json @@ -70,8 +70,7 @@ "username": "username" }, "activeDirectoryInformation": { - "keytabInformation": { - } + "keytabInformation": {} }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", @@ -135,8 +134,7 @@ "username": "username" }, "activeDirectoryInformation": { - "keytabInformation": { - } + "keytabInformation": {} }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json index 059133345e6a..467eaf8e9773 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json @@ -16,8 +16,7 @@ "username": "username" }, "activeDirectoryInformation": { - "keytabInformation": { - } + "keytabInformation": {} }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json index 3a5bed029604..2cd8e7aebe2a 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json @@ -17,8 +17,7 @@ "username": "username" }, "activeDirectoryInformation": { - "keytabInformation": { - } + "keytabInformation": {} }, "licenseType": "LicenseIncluded", "k8sRaw": { @@ -78,8 +77,7 @@ "username": "username" }, "activeDirectoryInformation": { - "keytabInformation": { - } + "keytabInformation": {} }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json index d3aff16ff210..660f5fa8d4e7 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json @@ -16,8 +16,7 @@ "username": "username" }, "activeDirectoryInformation": { - "keytabInformation": { - } + "keytabInformation": {} }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", @@ -79,8 +78,7 @@ "username": "username" }, "activeDirectoryInformation": { - "keytabInformation": { - } + "keytabInformation": {} }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.json index 0bda5fb525f9..3de853d76c88 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.json @@ -21,8 +21,7 @@ "username": "username" }, "activeDirectoryInformation": { - "keytabInformation": { - } + "keytabInformation": {} }, "licenseType": "LicenseIncluded", "clusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s", From 6cb8bedf38a74fecffba44f4438cd8f757bee140 Mon Sep 17 00:00:00 2001 From: Shuo Li Date: Thu, 31 Mar 2022 14:28:51 -0700 Subject: [PATCH 4/4] Adding descriptions --- .../preview/2022-03-01-preview/sqlManagedInstances.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json index 18efef507939..9eefaf492164 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/sqlManagedInstances.json @@ -243,6 +243,7 @@ }, "KeytabInformation": { "type": "object", + "description": "Keytab used for authenticate with Active Directory.", "properties": { "keytab": { "type": "string", @@ -257,6 +258,7 @@ }, "ActiveDirectoryInformation": { "type": "object", + "description": "Active Directory information that related to the resource.", "properties": { "keytabInformation": { "type": "object",