Skip to content

Commit c3daf5a

Browse files
authored
Update Microsoft.Sql ARM API with "format: arm-id" where appropriate and x-ms-secret where appropriate (#22292)
* Azure SQL ARM ID annotations * Fix secret annotations * Fix samples
1 parent 9fdc7e3 commit c3daf5a

23 files changed

+126
-23
lines changed

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/DatabaseExtensions.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,15 @@
399399
"storageAccountResourceId": {
400400
"description": "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter.",
401401
"type": "string",
402+
"format": "arm-id",
402403
"x-ms-mutability": [
403404
"create"
404405
]
405406
},
406407
"sqlServerResourceId": {
407408
"description": "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation.",
408409
"type": "string",
410+
"format": "arm-id",
409411
"x-ms-mutability": [
410412
"create"
411413
]

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/DatabaseSecurityAlertPolicies.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@
298298
},
299299
"storageAccountAccessKey": {
300300
"description": "Specifies the identifier key of the Threat Detection audit storage account.",
301+
"x-ms-secret": true,
301302
"type": "string"
302303
},
303304
"retentionDays": {

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/DatabaseVulnerabilityAssessments.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@
311311
"storageContainerSasKey": {
312312
"description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall",
313313
"type": "string",
314+
"x-ms-secret": true,
314315
"x-ms-mutability": [
315316
"create",
316317
"update"
@@ -319,6 +320,7 @@
319320
"storageAccountAccessKey": {
320321
"description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall",
321322
"type": "string",
323+
"x-ms-secret": true,
322324
"x-ms-mutability": [
323325
"create",
324326
"update"

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/Databases.json

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,11 +926,20 @@
926926
},
927927
"elasticPoolId": {
928928
"description": "The resource identifier of the elastic pool containing this database.",
929-
"type": "string"
929+
"type": "string",
930+
"format": "arm-id",
931+
"x-ms-arm-id-details": {
932+
"allowedResources": [
933+
{
934+
"type": "Microsoft.Sql/servers/elasticPools"
935+
}
936+
]
937+
}
930938
},
931939
"sourceDatabaseId": {
932940
"description": "The resource identifier of the source database associated with create operation of this database.",
933941
"type": "string",
942+
"format": "arm-id",
934943
"x-ms-mutability": [
935944
"create"
936945
]
@@ -1021,27 +1030,38 @@
10211030
"recoveryServicesRecoveryPointId": {
10221031
"description": "The resource identifier of the recovery point associated with create operation of this database.",
10231032
"type": "string",
1033+
"format": "arm-id",
10241034
"x-ms-mutability": [
10251035
"create"
10261036
]
10271037
},
10281038
"longTermRetentionBackupResourceId": {
10291039
"description": "The resource identifier of the long term retention backup associated with create operation of this database.",
10301040
"type": "string",
1041+
"format": "arm-id",
1042+
"x-ms-arm-id-details": {
1043+
"allowedResources": [
1044+
{
1045+
"type": "Microsoft.Sql/locations/longTermRetentionBackups"
1046+
}
1047+
]
1048+
},
10311049
"x-ms-mutability": [
10321050
"create"
10331051
]
10341052
},
10351053
"recoverableDatabaseId": {
10361054
"description": "The resource identifier of the recoverable database associated with create operation of this database.",
10371055
"type": "string",
1056+
"format": "arm-id",
10381057
"x-ms-mutability": [
10391058
"create"
10401059
]
10411060
},
10421061
"restorableDroppedDatabaseId": {
10431062
"description": "The resource identifier of the restorable dropped database associated with create operation of this database.",
10441063
"type": "string",
1064+
"format": "arm-id",
10451065
"x-ms-mutability": [
10461066
"create"
10471067
]
@@ -1200,6 +1220,7 @@
12001220
"sourceResourceId": {
12011221
"description": "The resource identifier of the source associated with the create operation of this database.\r\n\r\nThis property is only supported for DataWarehouse edition and allows to restore across subscriptions.\r\n\r\nWhen sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover.\r\n\r\nWhen createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified.\r\n\r\nWhen createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool.\r\n\r\nWhen createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool.\r\n\r\nWhen source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant ",
12021222
"type": "string",
1223+
"format": "arm-id",
12031224
"x-ms-mutability": [
12041225
"create"
12051226
]
@@ -1290,11 +1311,20 @@
12901311
},
12911312
"elasticPoolId": {
12921313
"description": "The resource identifier of the elastic pool containing this database.",
1293-
"type": "string"
1314+
"type": "string",
1315+
"format": "arm-id",
1316+
"x-ms-arm-id-details": {
1317+
"allowedResources": [
1318+
{
1319+
"type": "Microsoft.Sql/servers/elasticPools"
1320+
}
1321+
]
1322+
}
12941323
},
12951324
"sourceDatabaseId": {
12961325
"description": "The resource identifier of the source database associated with create operation of this database.",
12971326
"type": "string",
1327+
"format": "arm-id",
12981328
"x-ms-mutability": [
12991329
"create"
13001330
]
@@ -1385,13 +1415,22 @@
13851415
"recoveryServicesRecoveryPointId": {
13861416
"description": "The resource identifier of the recovery point associated with create operation of this database.",
13871417
"type": "string",
1418+
"format": "arm-id",
13881419
"x-ms-mutability": [
13891420
"create"
13901421
]
13911422
},
13921423
"longTermRetentionBackupResourceId": {
13931424
"description": "The resource identifier of the long term retention backup associated with create operation of this database.",
13941425
"type": "string",
1426+
"format": "arm-id",
1427+
"x-ms-arm-id-details": {
1428+
"allowedResources": [
1429+
{
1430+
"type": "Microsoft.Sql/locations/longTermRetentionBackups"
1431+
}
1432+
]
1433+
},
13951434
"x-ms-mutability": [
13961435
"create"
13971436
]
@@ -1406,6 +1445,7 @@
14061445
"restorableDroppedDatabaseId": {
14071446
"description": "The resource identifier of the restorable dropped database associated with create operation of this database.",
14081447
"type": "string",
1448+
"format": "arm-id",
14091449
"x-ms-mutability": [
14101450
"create"
14111451
]
@@ -1806,13 +1846,15 @@
18061846
"storageAccountResourceId": {
18071847
"description": "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter.",
18081848
"type": "string",
1849+
"format": "arm-id",
18091850
"x-ms-mutability": [
18101851
"create"
18111852
]
18121853
},
18131854
"sqlServerResourceId": {
18141855
"description": "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation.",
18151856
"type": "string",
1857+
"format": "arm-id",
18161858
"x-ms-mutability": [
18171859
"create"
18181860
]

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/FailoverGroups.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,15 @@
498498
"description": "List of databases in the failover group.",
499499
"type": "array",
500500
"items": {
501-
"type": "string"
501+
"type": "string",
502+
"format": "arm-id",
503+
"x-ms-arm-id-details": {
504+
"allowedResources": [
505+
{
506+
"type": "Microsoft.Sql/servers/databases"
507+
}
508+
]
509+
}
502510
}
503511
}
504512
}
@@ -595,6 +603,7 @@
595603
"properties": {
596604
"id": {
597605
"description": "Resource identifier of the partner server.",
606+
"format": "arm-id",
598607
"type": "string"
599608
},
600609
"location": {

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/JobAgents.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@
326326
"databaseId": {
327327
"description": "Resource ID of the database to store job metadata in.",
328328
"type": "string",
329+
"format": "arm-id",
329330
"x-ms-mutability": [
330331
"read",
331332
"create"

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/ManagedDatabases.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@
589589
"properties": {
590590
"destinationManagedDatabaseId": {
591591
"description": "The destination managed database ID",
592-
"type": "string"
592+
"type": "string",
593+
"format": "arm-id"
593594
}
594595
}
595596
},
@@ -692,13 +693,15 @@
692693
"sourceDatabaseId": {
693694
"description": "The resource identifier of the source database associated with create operation of this database.",
694695
"type": "string",
696+
"format": "arm-id",
695697
"x-ms-mutability": [
696698
"create"
697699
]
698700
},
699701
"restorableDroppedDatabaseId": {
700702
"description": "The restorable dropped database resource id to restore when creating this database.",
701703
"type": "string",
704+
"format": "arm-id",
702705
"x-ms-mutability": [
703706
"create"
704707
]
@@ -718,13 +721,15 @@
718721
"recoverableDatabaseId": {
719722
"description": "The resource identifier of the recoverable database associated with create operation of this database.",
720723
"type": "string",
724+
"format": "arm-id",
721725
"x-ms-mutability": [
722726
"create"
723727
]
724728
},
725729
"longTermRetentionBackupResourceId": {
726730
"description": "The name of the Long Term Retention backup to be used for restore of this managed database.",
727731
"type": "string",
732+
"format": "arm-id",
728733
"x-ms-mutability": [
729734
"create"
730735
]
@@ -754,7 +759,8 @@
754759
"properties": {
755760
"destinationManagedDatabaseId": {
756761
"description": "The destination managed database ID",
757-
"type": "string"
762+
"type": "string",
763+
"format": "arm-id"
758764
},
759765
"operationMode": {
760766
"description": "The move operation mode.",

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/ManagedInstances.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,15 @@
863863
},
864864
"subnetId": {
865865
"description": "Subnet resource ID for the managed instance.",
866-
"type": "string"
866+
"type": "string",
867+
"format": "arm-id",
868+
"x-ms-arm-id-details": {
869+
"allowedResources": [
870+
{
871+
"type": "Microsoft.Network/virtualNetworks/subnets"
872+
}
873+
]
874+
}
867875
},
868876
"state": {
869877
"description": "The state of the managed instance.",
@@ -907,6 +915,7 @@
907915
},
908916
"dnsZonePartner": {
909917
"description": "The resource id of another managed instance whose DNS zone this managed instance will share after creation.",
918+
"format": "arm-id",
910919
"type": "string",
911920
"x-ms-mutability": [
912921
"create"
@@ -919,6 +928,7 @@
919928
"sourceManagedInstanceId": {
920929
"description": "The resource identifier of the source managed instance associated with create operation of this instance.",
921930
"type": "string",
931+
"format": "arm-id",
922932
"x-ms-mutability": [
923933
"create"
924934
]
@@ -1011,7 +1021,15 @@
10111021
},
10121022
"primaryUserAssignedIdentityId": {
10131023
"description": "The resource id of a user assigned identity to be used by default.",
1014-
"type": "string"
1024+
"type": "string",
1025+
"format": "arm-id",
1026+
"x-ms-arm-id-details": {
1027+
"allowedResources": [
1028+
{
1029+
"type": "Microsoft.ManagedIdentity/userAssignedIdentities"
1030+
}
1031+
]
1032+
}
10151033
},
10161034
"keyId": {
10171035
"description": "A CMK URI of the key to use for encryption.",

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/ServerSecurityAlertPolicies.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@
242242
},
243243
"storageAccountAccessKey": {
244244
"description": "Specifies the identifier key of the Threat Detection audit storage account.",
245+
"x-ms-secret": true,
245246
"type": "string"
246247
},
247248
"retentionDays": {

specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/ServerVulnerabilityAssessments.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@
298298
"storageContainerSasKey": {
299299
"description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall",
300300
"type": "string",
301+
"x-ms-secret": true,
301302
"x-ms-mutability": [
302303
"create",
303304
"update"
@@ -306,6 +307,7 @@
306307
"storageAccountAccessKey": {
307308
"description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall",
308309
"type": "string",
310+
"x-ms-secret": true,
309311
"x-ms-mutability": [
310312
"create",
311313
"update"

0 commit comments

Comments
 (0)