Job Target Groups - Get
取得目標群組。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}?api-version=2025-01-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
job
|
path | True |
string |
要擷取之作業代理程序的名稱。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
server
|
path | True |
string |
伺服器的名稱。 |
|
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
|
target
|
path | True |
string |
目標組的名稱。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
回覆
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
Azure 運作順利完成。 |
|
| Other Status Codes |
未預期的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow.
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 模擬您的用戶帳戶 |
範例
Get a target group.
範例要求
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1?api-version=2025-01-01
範例回覆
{
"name": "targetGroup1",
"type": "Microsoft.Sql/servers/jobAgents/targetGroups",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1",
"properties": {
"members": [
{
"type": "SqlDatabase",
"databaseName": "database1",
"membershipType": "Exclude",
"serverName": "server1"
},
{
"type": "SqlServer",
"membershipType": "Include",
"refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential",
"serverName": "server1"
},
{
"type": "SqlElasticPool",
"elasticPoolName": "pool1",
"membershipType": "Include",
"refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential",
"serverName": "server2"
},
{
"type": "SqlShardMap",
"membershipType": "Include",
"refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential",
"serverName": "server3",
"shardMapName": "shardMap1"
}
]
}
}
定義
| 名稱 | Description |
|---|---|
|
created |
建立資源的身分識別類型。 |
|
Error |
資源管理錯誤附加資訊。 |
|
Error |
錯誤詳細資料。 |
|
Error |
錯誤回應 |
|
Job |
作業目標,例如在作業執行期間評估的特定資料庫或資料庫的容器。 |
|
Job |
一組工作目標。 |
|
Job |
目標是否包含或排除在群組中。 |
|
Job |
目標的類型。 |
|
system |
與建立和上次修改資源相關的元數據。 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
資源管理錯誤附加資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
object |
附加資訊。 |
| type |
string |
其他資訊類型。 |
ErrorDetail
錯誤詳細資料。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤附加資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳情 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤物件。 |
JobTarget
作業目標,例如在作業執行期間評估的特定資料庫或資料庫的容器。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| databaseName |
string |
目標資料庫名稱。 |
|
| elasticPoolName |
string |
目標彈性集區名稱。 |
|
| membershipType | Include |
目標是否包含或排除在群組中。 |
|
| refreshCredential |
string |
在作業執行期間用來連線到目標並判斷目標內資料庫清單的認證資源標識碼。 |
|
| serverName |
string |
目標伺服器名稱。 |
|
| shardMapName |
string |
目標分區對應。 |
|
| type |
目標型別。 |
JobTargetGroup
一組工作目標。
| 名稱 | 類型 | Description |
|---|---|---|
| id |
string (arm-id) |
資源的完整資源標識碼。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
資源的名稱 |
| properties.members |
目標群組的成員。 |
|
| systemData |
Azure Resource Manager 包含 createdBy 與 modifiedBy 資訊的元資料。 |
|
| type |
string |
資源的類型。 例如:「Microsoft。運算/虛擬機器」或「Microsoft」。儲存/儲存帳號」 |
JobTargetGroupMembershipType
目標是否包含或排除在群組中。
| 值 | Description |
|---|---|
| Include |
包括 |
| Exclude |
排除 |
JobTargetType
目標的類型。
| 值 | Description |
|---|---|
| TargetGroup |
目標群組 |
| SqlDatabase |
SqlDatabase |
| SqlElasticPool |
SqlElasticPool |
| SqlShardMap |
SqlShardMap |
| SqlServer |
SqlServer |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
資源上次修改的時間戳記 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |