Job Steps - Get
取得作業目前版本中的作業步驟。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}?api-version=2025-01-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
job
|
path | True |
string |
作業代理程式的名稱。 |
|
job
|
path | True |
string |
作業的名稱。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
server
|
path | True |
string |
伺服器的名稱。 |
|
step
|
path | True |
string |
作業步驟的名稱。 |
|
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
|
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 the latest version of a job step.
範例要求
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1?api-version=2025-01-01
範例回覆
{
"name": "step1",
"type": "Microsoft.Sql/servers/jobAgents/jobs/steps",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1",
"properties": {
"action": {
"type": "TSql",
"source": "Inline",
"value": "select 2"
},
"credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1",
"executionOptions": {
"initialRetryIntervalSeconds": 11,
"maximumRetryIntervalSeconds": 222,
"retryAttempts": 42,
"retryIntervalBackoffMultiplier": 3,
"timeoutSeconds": 1234
},
"output": {
"type": "SqlDatabase",
"credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0",
"databaseName": "database3",
"resourceGroupName": "group3",
"schemaName": "myschema1234",
"serverName": "server3",
"subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a",
"tableName": "mytable5678"
},
"stepId": 1,
"targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"
}
}
定義
| 名稱 | Description |
|---|---|
|
created |
建立資源的身分識別類型。 |
|
Error |
資源管理錯誤附加資訊。 |
|
Error |
錯誤詳細資料。 |
|
Error |
錯誤回應 |
|
Job |
作業步驟。 |
|
Job |
作業步驟所要執行的動作。 |
|
Job |
要執行的動作來源。 |
|
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 |
錯誤物件。 |
JobStep
作業步驟。
| 名稱 | 類型 | Description |
|---|---|---|
| id |
string (arm-id) |
資源的完整資源標識碼。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
資源的名稱 |
| properties.action |
作業步驟的動作承載。 |
|
| properties.credential |
string |
將用來連線到目標之作業認證的資源標識碼。 |
| properties.executionOptions |
作業步驟的執行選項。 |
|
| properties.output |
作業步驟的輸出目的地屬性。 |
|
| properties.stepId |
integer (int32) |
作業步驟在作業內的索引。 如果在建立作業步驟時未指定,則會建立為最後一個步驟。 如果在更新作業步驟時未指定,則不會修改步驟標識符。 |
| properties.targetGroup |
string |
將執行作業步驟的目標群組資源標識碼。 |
| systemData |
Azure Resource Manager 包含 createdBy 與 modifiedBy 資訊的元資料。 |
|
| type |
string |
資源的類型。 例如:「Microsoft。運算/虛擬機器」或「Microsoft」。儲存/儲存帳號」 |
JobStepAction
作業步驟所要執行的動作。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| source | Inline |
要執行的動作來源。 |
|
| type | TSql |
作業步驟所執行的動作類型。 |
|
| value |
string |
動作值,例如要執行的 T-SQL 腳本文字。 |
JobStepActionSource
要執行的動作來源。
| 值 | Description |
|---|---|
| Inline |
內嵌 |
JobStepActionType
作業步驟所執行的動作類型。
| 值 | Description |
|---|---|
| TSql |
TSql |
JobStepExecutionOptions
作業步驟的執行選項。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| initialRetryIntervalSeconds |
integer (int32) |
1 |
作業步驟執行重試之間的初始延遲。 |
| maximumRetryIntervalSeconds |
integer (int32) |
120 |
重試作業步驟執行之間的等候時間上限。 |
| retryAttempts |
integer (int32) |
10 |
如果第一次嘗試失敗,將會重新嘗試作業步驟的次數上限。 |
| retryIntervalBackoffMultiplier |
number (float) |
2 |
重試之間的時間輪詢乘數。 |
| timeoutSeconds |
integer (int32) |
43200 |
作業步驟的執行逾時。 |
JobStepOutput
作業步驟的輸出組態。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| credential |
string |
要用來連線到輸出目的地的認證資源標識碼。 |
|
| databaseName |
string |
輸出目的地資料庫。 |
|
| resourceGroupName |
string |
輸出目的地資源群組。 |
|
| schemaName |
string |
dbo |
輸出目的地架構。 |
| serverName |
string |
輸出目的地伺服器名稱。 |
|
| subscriptionId |
string (uuid) |
輸出目的地訂用帳戶標識碼。 |
|
| tableName |
string |
輸出目的地數據表。 |
|
| type | SqlDatabase |
輸出目的地類型。 |
JobStepOutputType
輸出目的地類型。
| 值 | Description |
|---|---|
| SqlDatabase |
SqlDatabase |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
資源上次修改的時間戳記 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |