Server Operations - List By Server

取得伺服器上執行的作業清單。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/operations?api-version=2025-01-01

URI 參數

名稱 位於 必要 類型 Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

serverName
path True

string

伺服器的名稱。

subscriptionId
path True

string (uuid)

目標訂用帳戶的標識碼。 此值必須是 UUID。

api-version
query True

string

minLength: 1

用於此作業的 API 版本。

回應

名稱 類型 Description
200 OK

ServerOperationListResult

Azure 運作順利完成。

Other Status Codes

ErrorResponse

未預期的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow.

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

List the server management operations

範例要求

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations?api-version=2025-01-01

範例回覆

{
  "value": [
    {
      "name": "11111111-1111-1111-1111-111111111111",
      "type": "Microsoft.Sql/servers/operations",
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111",
      "properties": {
        "operation": "MakeAllLogicalDatabasesAccessible",
        "operationFriendlyName": "MAKE ALL DBS ACCESSIBLE",
        "percentComplete": 0,
        "serverName": "sqlcrudtest-4645",
        "startTime": "2017-06-01T09:10:08.1Z",
        "state": "InProgress"
      }
    },
    {
      "name": "22222222-2222-2222-2222-222222222222",
      "type": "Microsoft.Sql/servers/operations",
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222",
      "properties": {
        "operation": "MakeAllLogicalDatabasesAccessible",
        "operationFriendlyName": "MAKE ALL DBS ACCESSIBLE",
        "percentComplete": 100,
        "serverName": "sqlcrudtest-4645",
        "startTime": "2017-06-01T09:00:08.1Z",
        "state": "Succeeded"
      }
    }
  ]
}

定義

名稱 Description
createdByType

建立資源的身分識別類型。

ErrorAdditionalInfo

資源管理錯誤附加資訊。

ErrorDetail

錯誤詳細資料。

ErrorResponse

錯誤回應

ManagementOperationState

作業狀態。

ServerOperation

伺服器作業。

ServerOperationListResult

ServerOperation 清單操作的回應。

systemData

與建立和上次修改資源相關的元數據。

createdByType

建立資源的身分識別類型。

值 Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

資源管理錯誤附加資訊。

名稱 類型 Description
info

object

附加資訊。

type

string

其他資訊類型。

ErrorDetail

錯誤詳細資料。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤附加資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳情

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

錯誤物件。

ManagementOperationState

作業狀態。

值 Description
Pending

等待中

InProgress

進行中

Succeeded

成功

Failed

失敗

CancelInProgress

取消進行中

Cancelled

已取消

ServerOperation

伺服器作業。

名稱 類型 Description
id

string (arm-id)

資源的完整資源標識碼。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

資源的名稱

properties.description

string

作業描述。

properties.errorCode

integer (int32)

作業錯誤碼。

properties.errorDescription

string

作業錯誤描述。

properties.errorSeverity

integer (int32)

作業錯誤嚴重性。

properties.estimatedCompletionTime

string (date-time)

作業的預估完成時間。

properties.isCancellable

boolean

是否可以取消作業。

properties.isUserError

boolean

錯誤是否為用戶錯誤。

properties.operation

string

作業的名稱。

properties.operationFriendlyName

string

作業的易記名稱。

properties.percentComplete

integer (int32)

作業完成的百分比。

properties.serverName

string

伺服器的名稱。

properties.startTime

string (date-time)

作業開始時間。

properties.state

ManagementOperationState

作業狀態。

systemData

systemData

Azure Resource Manager 包含 createdBy 與 modifiedBy 資訊的元資料。

type

string

資源的類型。 例如:「Microsoft。運算/虛擬機器」或「Microsoft」。儲存/儲存帳號」

ServerOperationListResult

ServerOperation 清單操作的回應。

名稱 類型 Description
nextLink

string (uri)

專案下一頁的連結

value

ServerOperation[]

本頁的 ServerOperation 項目

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string (date-time)

資源上次修改的時間戳記 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。