Job Agents - Create Or Update
建立或更新作業代理程式。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}?api-version=2023-08-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
job
|
path | True |
string |
要建立或更新之作業代理程序的名稱。 |
resource
|
path | True |
string |
包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。 |
server
|
path | True |
string |
伺服器的名稱。 |
subscription
|
path | True |
string |
識別 Azure 訂用帳戶的訂用帳戶標識碼。 |
api-version
|
query | True |
string |
要用於要求的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
location | True |
string |
資源位置。 |
properties.databaseId | True |
string (arm-id) |
要儲存作業元數據的資料庫資源標識碼。 |
identity |
作業代理程式的身分識別。 |
||
sku |
SKU 的名稱和層。 |
||
tags |
object |
資源標籤。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
已成功更新作業代理程式。 |
|
201 Created |
已成功建立作業代理程式。 |
|
202 Accepted |
接受 標題 Location: string |
|
Other Status Codes |
錯誤回應: ***
|
範例
Create or update a job agent |
Create or update a job agent with identity |
Create or update a job agent with sku. |
Create or update a job agent
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1?api-version=2023-08-01
{
"location": "southeastasia",
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
範例回覆
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1",
"name": "agent1",
"type": "Microsoft.Sql/servers/jobAgents",
"location": "southeastasia",
"sku": {
"name": "JA100",
"capacity": 100
},
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1",
"name": "agent1",
"type": "Microsoft.Sql/servers/jobAgents",
"location": "southeastasia",
"sku": {
"name": "JA100",
"capacity": 100
},
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
Create or update a job agent with identity
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1?api-version=2023-08-01
{
"location": "southeastasia",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi": {}
}
},
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
範例回覆
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1",
"name": "agent1",
"type": "Microsoft.Sql/servers/jobAgents",
"location": "southeastasia",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi": {
"clientId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7",
"principalId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7"
}
}
},
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1",
"name": "agent1",
"type": "Microsoft.Sql/servers/jobAgents",
"location": "southeastasia",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi": {
"clientId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7",
"principalId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7"
}
}
},
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
Create or update a job agent with sku.
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1?api-version=2023-08-01
{
"location": "southeastasia",
"sku": {
"name": "JA400"
},
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
範例回覆
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1",
"name": "agent1",
"type": "Microsoft.Sql/servers/jobAgents",
"location": "southeastasia",
"sku": {
"name": "JA400",
"capacity": 400
},
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1",
"name": "agent1",
"type": "Microsoft.Sql/servers/jobAgents",
"location": "southeastasia",
"sku": {
"name": "JA400",
"capacity": 400
},
"properties": {
"databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"
}
}
定義
名稱 | Description |
---|---|
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Job |
Azure SQL 作業代理程式。 |
Job |
資源的 Azure Active Directory 身分識別設定。 |
Job |
作業代理程式身分識別類型 |
Job |
作業代理程序的狀態。 |
Job |
資源的 Azure Active Directory 身分識別設定。 |
Sku |
ARM 資源 SKU。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
名稱 | 類型 | Description |
---|---|---|
info |
object |
其他資訊。 |
type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
additionalInfo |
錯誤其他資訊。 |
|
code |
string |
錯誤碼。 |
details |
錯誤詳細數據。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
JobAgent
Azure SQL 作業代理程式。
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源標識碼。 |
identity |
作業代理程式的身分識別。 |
|
location |
string |
資源位置。 |
name |
string |
資源名稱。 |
properties.databaseId |
string (arm-id) |
要儲存作業元數據的資料庫資源標識碼。 |
properties.state |
作業代理程序的狀態。 |
|
sku |
SKU 的名稱和層。 |
|
tags |
object |
資源標籤。 |
type |
string |
資源類型。 |
JobAgentIdentity
資源的 Azure Active Directory 身分識別設定。
名稱 | 類型 | Description |
---|---|---|
tenantId |
string (uuid) |
作業代理程式身分識別租用戶標識碼 |
type |
作業代理程式身分識別類型 |
|
userAssignedIdentities |
<string,
Job |
要使用的使用者指派身分識別的資源標識碼 |
JobAgentIdentityType
作業代理程式身分識別類型
值 | Description |
---|---|
None | |
SystemAssigned | |
SystemAssignedUserAssigned | |
UserAssigned |
JobAgentState
作業代理程序的狀態。
值 | Description |
---|---|
Creating | |
Deleting | |
Disabled | |
Ready | |
Updating |
JobAgentUserAssignedIdentity
資源的 Azure Active Directory 身分識別設定。
名稱 | 類型 | Description |
---|---|---|
clientId |
string (uuid) |
Azure Active Directory 用戶端標識符。 |
principalId |
string (uuid) |
Azure Active Directory 主體標識符。 |
Sku
ARM 資源 SKU。
名稱 | 類型 | Description |
---|---|---|
capacity |
integer (int32) |
特定 SKU 的容量。 |
family |
string |
如果服務有不同世代的硬體,針對相同的 SKU,則可以在這裡擷取。 |
name |
string |
SKU 的名稱,通常是字母 + 數位碼,例如 P3。 |
size |
string |
特定 SKU 的大小 |
tier |
string |
特定 SKU 的階層或版本,例如基本、進階。 |