Skip to content

Commit

Permalink
Update Microsoft.Sql ARM API with "format: arm-id" where appropriate …
Browse files Browse the repository at this point in the history
…and x-ms-secret where appropriate (Azure#22677)

* SQL ARM IDs

* Secrets

* Examples fix

* Fix examples
  • Loading branch information
matthchr authored and Kayla Ames committed Mar 17, 2023
1 parent 932ae14 commit defa916
Show file tree
Hide file tree
Showing 27 changed files with 133 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,15 @@
"storageAccountResourceId": {
"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.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"sqlServerResourceId": {
"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.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
},
"storageAccountAccessKey": {
"description": "Specifies the identifier key of the Threat Detection audit storage account.",
"x-ms-secret": true,
"type": "string"
},
"retentionDays": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@
"storageContainerSasKey": {
"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",
"type": "string",
"x-ms-secret": true,
"x-ms-mutability": [
"create",
"update"
Expand All @@ -319,6 +320,7 @@
"storageAccountAccessKey": {
"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",
"type": "string",
"x-ms-secret": true,
"x-ms-mutability": [
"create",
"update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1029,11 +1029,20 @@
},
"elasticPoolId": {
"description": "The resource identifier of the elastic pool containing this database.",
"type": "string"
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.Sql/servers/elasticPools"
}
]
}
},
"sourceDatabaseId": {
"description": "The resource identifier of the source database associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down Expand Up @@ -1124,27 +1133,38 @@
"recoveryServicesRecoveryPointId": {
"description": "The resource identifier of the recovery point associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"longTermRetentionBackupResourceId": {
"description": "The resource identifier of the long term retention backup associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.Sql/locations/longTermRetentionBackups"
}
]
},
"x-ms-mutability": [
"create"
]
},
"recoverableDatabaseId": {
"description": "The resource identifier of the recoverable database associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"restorableDroppedDatabaseId": {
"description": "The resource identifier of the restorable dropped database associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down Expand Up @@ -1327,6 +1347,7 @@
"sourceResourceId": {
"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 ",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down Expand Up @@ -1439,11 +1460,20 @@
},
"elasticPoolId": {
"description": "The resource identifier of the elastic pool containing this database.",
"type": "string"
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.Sql/servers/elasticPools"
}
]
}
},
"sourceDatabaseId": {
"description": "The resource identifier of the source database associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down Expand Up @@ -1534,13 +1564,22 @@
"recoveryServicesRecoveryPointId": {
"description": "The resource identifier of the recovery point associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"longTermRetentionBackupResourceId": {
"description": "The resource identifier of the long term retention backup associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.Sql/locations/longTermRetentionBackups"
}
]
},
"x-ms-mutability": [
"create"
]
Expand All @@ -1555,6 +1594,7 @@
"restorableDroppedDatabaseId": {
"description": "The resource identifier of the restorable dropped database associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down Expand Up @@ -1987,13 +2027,15 @@
"storageAccountResourceId": {
"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.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"sqlServerResourceId": {
"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.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,15 @@
"description": "List of databases in the failover group.",
"type": "array",
"items": {
"type": "string"
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.Sql/servers/databases"
}
]
}
}
}
}
Expand Down Expand Up @@ -595,7 +603,8 @@
"properties": {
"id": {
"description": "Resource identifier of the partner server.",
"type": "string"
"type": "string",
"format": "arm-id"
},
"location": {
"description": "Geo location of the partner server.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
"databaseId": {
"description": "Resource ID of the database to store job metadata in.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"read",
"create"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@
"properties": {
"destinationManagedDatabaseId": {
"description": "The destination managed database ID",
"type": "string"
"type": "string",
"format": "arm-id"
}
}
},
Expand Down Expand Up @@ -706,27 +707,31 @@
"sourceDatabaseId": {
"description": "The resource identifier of the source database associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"crossSubscriptionSourceDatabaseId": {
"description": "The resource identifier of the cross-subscription source database associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"restorableDroppedDatabaseId": {
"description": "The restorable dropped database resource id to restore when creating this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"crossSubscriptionRestorableDroppedDatabaseId": {
"description": "The restorable cross-subscription dropped database resource id to restore when creating this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand All @@ -753,13 +758,15 @@
"recoverableDatabaseId": {
"description": "The resource identifier of the recoverable database associated with create operation of this database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"longTermRetentionBackupResourceId": {
"description": "The name of the Long Term Retention backup to be used for restore of this managed database.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down Expand Up @@ -804,7 +811,8 @@
"properties": {
"destinationManagedDatabaseId": {
"description": "The destination managed database ID",
"type": "string"
"type": "string",
"format": "arm-id"
},
"operationMode": {
"description": "The move operation mode.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,15 @@
},
"subnetId": {
"description": "Subnet resource ID for the managed instance.",
"type": "string"
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.Network/virtualNetworks/subnets"
}
]
}
},
"state": {
"description": "The state of the managed instance.",
Expand Down Expand Up @@ -988,6 +996,7 @@
"dnsZonePartner": {
"description": "The resource id of another managed instance whose DNS zone this managed instance will share after creation.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand All @@ -999,6 +1008,7 @@
"sourceManagedInstanceId": {
"description": "The resource identifier of the source managed instance associated with create operation of this instance.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down Expand Up @@ -1091,7 +1101,15 @@
},
"primaryUserAssignedIdentityId": {
"description": "The resource id of a user assigned identity to be used by default.",
"type": "string"
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.ManagedIdentity/userAssignedIdentities"
}
]
}
},
"keyId": {
"description": "A CMK URI of the key to use for encryption.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
},
"storageAccountAccessKey": {
"description": "Specifies the identifier key of the Threat Detection audit storage account.",
"x-ms-secret": true,
"type": "string"
},
"retentionDays": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
"storageContainerSasKey": {
"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",
"type": "string",
"x-ms-secret": true,
"x-ms-mutability": [
"create",
"update"
Expand All @@ -306,6 +307,7 @@
"storageAccountAccessKey": {
"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",
"type": "string",
"x-ms-secret": true,
"x-ms-mutability": [
"create",
"update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,13 +697,15 @@
"storageAccountResourceId": {
"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.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
},
"sqlServerResourceId": {
"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.",
"type": "string",
"format": "arm-id",
"x-ms-mutability": [
"create"
]
Expand Down Expand Up @@ -1057,7 +1059,15 @@
},
"primaryUserAssignedIdentityId": {
"description": "The resource id of a user assigned identity to be used by default.",
"type": "string"
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.ManagedIdentity/userAssignedIdentities"
}
]
}
},
"federatedClientId": {
"format": "uuid",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@
},
"syncDatabaseId": {
"description": "ARM resource id of the sync database in the sync agent.",
"type": "string"
"type": "string",
"format": "arm-id"
},
"lastAliveTime": {
"format": "date-time",
Expand Down
Loading

0 comments on commit defa916

Please sign in to comment.