Managed Database Queries - Get
Get query by query id.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}?api-version=2021-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
database
|
path | True |
string |
The name of the database. |
managed
|
path | True |
string |
The name of the managed instance. |
query
|
path | True |
string |
|
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully retrieved query text. |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Obtain query properties
Sample request
Sample response
{
"id": "42",
"type": "Microsoft.Sql/managedInstances/databases/queries",
"properties": {
"queryText": "select * from DUMMY_TABLE"
}
}
Definitions
ManagedInstanceQuery
Database query.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Resource name. |
properties.queryText |
string |
Query text. |
type |
string |
Resource type. |