Skip to content

Commit

Permalink
Merge pull request Azure#6 from wu5bocheng/data-model-for-portal-sql
Browse files Browse the repository at this point in the history
[Add] Add command group `microsoft.sql/servers` and `microsoft.sql/servers/databases`
  • Loading branch information
jsntcy authored Mar 13, 2023
2 parents 6e115ae + 06ec152 commit 3360959
Show file tree
Hide file tree
Showing 3 changed files with 528 additions and 0 deletions.
227 changes: 227 additions & 0 deletions data-model-for-portal/Microsoft.Sql/Databases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
{
"resourceType": "Databases",
"apiVersion": "2021-11-01",
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/db"
},
"commands": [
{
"name": "az sql db list",
"description": "List databases on a server or elastic pool.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases",
"confirmation": false,
"help": {
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/db#az-sql-db-list"
},
"parameterSets": [
{
"parameters": [
"[--elastic-pool]",
"[--ids]",
"[--resource-group]",
"[--server]",
"[--subscription]"
]
}
]
},
"examples": [
{
"description": "List databases on a server or elastic pool.",
"parameters": [
{
"name": "--subscription",
"value": "[path.subscriptionId]"
},
{
"name": "--resource-group",
"value": "[path.resourceGroupName]"
},
{
"name": "--server",
"value": "[path.serverName]"
}
]
}
]
},
{
"name": "az sql db show",
"description": "Get the details for a database.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}",
"confirmation": false,
"help": {
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/db#az-sql-db-show"
},
"parameterSets": [
{
"parameters": [
"[--ids]",
"[--name]",
"[--resource-group]",
"[--server]",
"[--subscription]"
]
}
]
},
"examples": [
{
"description": "Get the details for a database.",
"parameters": [
{
"name": "--subscription",
"value": "[path.subscriptionId]"
},
{
"name": "--name",
"value": "[path.databaseName]"
},
{
"name": "--resource-group",
"value": "[path.resourceGroupName]"
},
{
"name": "--server",
"value": "[path.serverName]"
}
]
}
]
},
{
"name": "az sql db delete",
"description": "Delete a database.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}",
"confirmation": true,
"help": {
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/db#az-sql-db-delete"
},
"parameterSets": [
{
"parameters": [
"[--ids]",
"[--name]",
"[--no-wait]",
"[--resource-group]",
"[--server]",
"[--subscription]",
"[--yes]"
]
}
]
},
"examples": [
{
"description": "Delete a database.",
"parameters": [
{
"name": "--subscription",
"value": "[path.subscriptionId]"
},
{
"name": "--name",
"value": "[path.databaseName]"
},
{
"name": "--resource-group",
"value": "[path.resourceGroupName]"
},
{
"name": "--server",
"value": "[path.serverName]"
}
]
}
]
},
{
"name": "az sql dw list",
"description": "List data warehouses for a server.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases",
"confirmation": false,
"help": {
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/dw#az-sql-dw-list"
},
"parameterSets": [
{
"parameters": [
"[--ids]",
"[--resource-group]",
"[--server]",
"[--subscription]"
]
}
]
},
"examples": [
{
"description": "List data warehouses for a server.",
"parameters": [
{
"name": "--subscription",
"value": "[path.subscriptionId]"
},
{
"name": "--resource-group",
"value": "[path.resourceGroupName]"
},
{
"name": "--server",
"value": "[path.serverName]"
}
]
}
]
},
{
"name": "az sql dw show",
"description": "Get the details for a data warehouse.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}",
"confirmation": false,
"help": {
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/dw#az-sql-dw-show"
},
"parameterSets": [
{
"parameters": [
"[--ids]",
"[--name]",
"[--resource-group]",
"[--server]",
"[--subscription]"
]
}
]
},
"examples": [
{
"description": "Get the details for a data warehouse.",
"parameters": [
{
"name": "--subscription",
"value": "[path.subscriptionId]"
},
{
"name": "--name",
"value": "[path.databaseName]"
},
{
"name": "--resource-group",
"value": "[path.resourceGroupName]"
},
{
"name": "--server",
"value": "[path.serverName]"
}
]
}
]
}
]
}
95 changes: 95 additions & 0 deletions data-model-for-portal/Microsoft.Sql/ElasticPools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"resourceType": "ElasticPools",
"apiVersion": "2021-11-01",
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/elastic-pool"
},
"commands": [
{
"name": "az sql elastic-pool list",
"description": "Gets all elastic pools in a server.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools",
"confirmation": false,
"help": {
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/elastic-pool#az-sql-elastic-pool-list"
},
"parameterSets": [
{
"parameters": [
"[--ids]",
"[--resource-group]",
"[--server]",
"[--skip]",
"[--subscription]"
]
}
]
},
"examples": [
{
"description": "List all elastic pools in a server.",
"parameters": [
{
"name": "--subscription",
"value": "[path.subscriptionId]"
},
{
"name": "--resource-group",
"value": "[path.resourceGroupName]"
},
{
"name": "--server",
"value": "[path.serverName]"
}
]
}
]
},
{
"name": "az sql elastic-pool show",
"description": "Gets an elastic pool.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}",
"confirmation": false,
"help": {
"learnMore": {
"url": "https://docs.microsoft.com/cli/azure/sql/elastic-pool#az-sql-elastic-pool-show"
},
"parameterSets": [
{
"parameters": [
"[--ids]",
"[--name]",
"[--resource-group]",
"[--server]",
"[--subscription]"
]
}
]
},
"examples": [
{
"description": "Get the details for a specific elastic pool.",
"parameters": [
{
"name": "--subscription",
"value": "[path.subscriptionId]"
},
{
"name": "--name",
"value": "[path.elasticPoolName]"
},
{
"name": "--resource-group",
"value": "[path.resourceGroupName]"
},
{
"name": "--server",
"value": "[path.serverName]"
}
]
}
]
}
]
}
Loading

0 comments on commit 3360959

Please sign in to comment.