共用方式為


Servers - Get

取得伺服器。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}?api-version=2023-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}?$expand={$expand}&api-version=2023-08-01

URI 參數

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

string

包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。

serverName
path True

string

伺服器的名稱。

subscriptionId
path True

string

識別 Azure 訂用帳戶的訂用帳戶標識碼。

api-version
query True

string

要用於要求的 API 版本。

$expand
query

string

要包含在回應中的子資源。

回應

名稱 類型 Description
200 OK

Server

已成功擷取指定的伺服器。

Other Status Codes

ErrorResponse

錯誤回應: ***

  • 404 SubscriptionNotFound - 找不到要求的訂用帳戶。

  • 404 ResourceNotFound - 找不到要求的資源。

  • 429 SubscriptionTooManyRequests - 超出可用資源可處理之最大要求的要求。

  • 503 TooManyRequests - 超出可用資源可處理之最大要求的要求。

範例

Get server
Get server with $expand=administrators/activedirectory

Get server

範例要求

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

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
  "name": "sqlcrudtest-4645",
  "type": "Microsoft.Sql/servers",
  "location": "japaneast",
  "kind": "v12.0",
  "properties": {
    "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
    "administratorLogin": "dummylogin",
    "version": "12.0",
    "state": "Ready",
    "workspaceFeature": "Connected",
    "publicNetworkAccess": "Enabled",
    "restrictOutboundNetworkAccess": "Enabled",
    "isIPv6Enabled": "Enabled",
    "externalGovernanceStatus": "Enabled",
    "privateEndpointConnections": [
      {
        "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
        "properties": {
          "provisioningState": "Ready",
          "privateEndpoint": {
            "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
          },
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "description": "Auto-approved",
            "actionsRequired": "None"
          }
        }
      }
    ]
  }
}

Get server with $expand=administrators/activedirectory

範例要求

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

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
  "name": "sqlcrudtest-4645",
  "type": "Microsoft.Sql/servers",
  "location": "japaneast",
  "kind": "v12.0",
  "properties": {
    "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
    "administratorLogin": "dummylogin",
    "version": "12.0",
    "state": "Ready",
    "workspaceFeature": "Connected",
    "publicNetworkAccess": "Enabled",
    "restrictOutboundNetworkAccess": "Enabled",
    "isIPv6Enabled": "Enabled",
    "externalGovernanceStatus": "Enabled",
    "administrators": {
      "principalType": "User",
      "login": "bob@contoso.com",
      "sid": "00000011-1111-2222-2222-123456789111",
      "tenantId": "00000011-1111-2222-2222-123456789111",
      "azureADOnlyAuthentication": true
    },
    "privateEndpointConnections": [
      {
        "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
        "properties": {
          "provisioningState": "Ready",
          "privateEndpoint": {
            "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
          },
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "description": "Auto-approved",
            "actionsRequired": "None"
          }
        }
      }
    ]
  }
}

定義

名稱 Description
AdministratorType

伺服器管理員的類型。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

ExternalGovernanceStatus

外部治理的狀態。

IdentityType

識別類型。 將此設定為 『SystemAssigned』,以自動建立和指派資源的 Azure Active Directory 主體。

MinimalTlsVersion

最低 TLS 版本。 允許的值:'None'、1.0'、'1.1'、'1.2'、'1.3'

PrincipalType

伺服器管理員的主體類型。

PrivateEndpointConnectionProperties

私人端點連線的屬性。

PrivateEndpointProperty
PrivateEndpointProvisioningState

私人端點連線的狀態。

PrivateLinkServiceConnectionStateActionsRequire

私人鏈接服務連線所需的動作。

PrivateLinkServiceConnectionStateProperty
PrivateLinkServiceConnectionStateStatus

私人鏈接服務連線狀態。

ResourceIdentity

資源的 Azure Active Directory 身分識別設定。

Server

Azure SQL Database 伺服器。

ServerExternalAdministrator

Active Directory 系統管理員的屬性。

ServerNetworkAccessFlag

是否要限制此伺服器的輸出網路存取。 值為選擇性值,但如果傳入,則必須是 'Enabled' 或 'Disabled'

ServerPrivateEndpointConnection

伺服器底下的私人端點連線

ServerPublicNetworkAccessFlag

此伺服器是否允許公用端點存取。 值為選擇性值,但如果傳入,必須是 'Enabled' 或 'Disabled' 或 'SecuredByPerimeter'

ServerWorkspaceFeature

現有伺服器是否已建立工作區,以及是否允許從工作區進行連線

UserIdentity

資源的 Azure Active Directory 身分識別設定。

AdministratorType

伺服器管理員的類型。

Description
ActiveDirectory

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

ExternalGovernanceStatus

外部治理的狀態。

Description
Disabled
Enabled

IdentityType

識別類型。 將此設定為 『SystemAssigned』,以自動建立和指派資源的 Azure Active Directory 主體。

Description
None
SystemAssigned
SystemAssigned,UserAssigned
UserAssigned

MinimalTlsVersion

最低 TLS 版本。 允許的值:'None'、1.0'、'1.1'、'1.2'、'1.3'

Description
1.0
1.1
1.2
1.3
None

PrincipalType

伺服器管理員的主體類型。

Description
Application
Group
User

PrivateEndpointConnectionProperties

私人端點連線的屬性。

名稱 類型 Description
groupIds

string[]

群組標識碼。

privateEndpoint

PrivateEndpointProperty

線上所屬的私人端點。

privateLinkServiceConnectionState

PrivateLinkServiceConnectionStateProperty

私人端點連線的連接狀態。

provisioningState

PrivateEndpointProvisioningState

私人端點連線的狀態。

PrivateEndpointProperty

名稱 類型 Description
id

string

私人端點的資源標識碼。

PrivateEndpointProvisioningState

私人端點連線的狀態。

Description
Approving
Dropping
Failed
Ready
Rejecting

PrivateLinkServiceConnectionStateActionsRequire

私人鏈接服務連線所需的動作。

Description
None

PrivateLinkServiceConnectionStateProperty

名稱 類型 Description
actionsRequired

PrivateLinkServiceConnectionStateActionsRequire

私人鏈接服務連線所需的動作。

description

string

私人鏈接服務連線描述。

status

PrivateLinkServiceConnectionStateStatus

私人鏈接服務連線狀態。

PrivateLinkServiceConnectionStateStatus

私人鏈接服務連線狀態。

Description
Approved
Disconnected
Pending
Rejected

ResourceIdentity

資源的 Azure Active Directory 身分識別設定。

名稱 類型 Description
principalId

string (uuid)

Azure Active Directory 主體標識符。

tenantId

string (uuid)

Azure Active Directory 租用戶標識符。

type

IdentityType

識別類型。 將此設定為 『SystemAssigned』,以自動建立和指派資源的 Azure Active Directory 主體。

userAssignedIdentities

<string,  UserIdentity>

要使用的使用者指派身分識別的資源標識碼

Server

Azure SQL Database 伺服器。

名稱 類型 Description
id

string

資源標識碼。

identity

ResourceIdentity

伺服器的 Azure Active Directory 身分識別。

kind

string

SQL Server 的種類。 這是用於 Azure 入口網站體驗的元數據。

location

string

資源位置。

name

string

資源名稱。

properties.administratorLogin

string

伺服器的系統管理員用戶名稱。 建立之後就無法變更。

properties.administratorLoginPassword

string

系統管理員登入密碼 (伺服器建立所需的密碼)。

properties.administrators

ServerExternalAdministrator

伺服器的 Azure Active Directory 系統管理員。 這隻能在伺服器建立時間使用。 如果用於伺服器更新,則會忽略它,否則會導致錯誤。 若要更新個別 API,則必須使用。

properties.externalGovernanceStatus

ExternalGovernanceStatus

外部治理的狀態。

properties.federatedClientId

string (uuid)

用於跨租使用者 CMK 案例的用戶端標識碼

properties.fullyQualifiedDomainName

string

伺服器的完整功能變數名稱。

properties.isIPv6Enabled

ServerNetworkAccessFlag

是否要啟用此伺服器的 IPv6 支援。 值為選擇性值,但如果傳入,則必須是 'Enabled' 或 'Disabled'

properties.keyId

string

要用於加密之金鑰的 CMK URI。

properties.minimalTlsVersion

MinimalTlsVersion

最低 TLS 版本。 允許的值:'None'、1.0'、'1.1'、'1.2'、'1.3'

properties.primaryUserAssignedIdentityId

string

預設會使用之使用者指派身分識別的資源標識碼。

properties.privateEndpointConnections

ServerPrivateEndpointConnection[]

伺服器上的私人端點連線清單

properties.publicNetworkAccess

ServerPublicNetworkAccessFlag

此伺服器是否允許公用端點存取。 值為選擇性值,但如果傳入,必須是 'Enabled' 或 'Disabled' 或 'SecuredByPerimeter'

properties.restrictOutboundNetworkAccess

ServerNetworkAccessFlag

是否要限制此伺服器的輸出網路存取。 值為選擇性值,但如果傳入,則必須是 'Enabled' 或 'Disabled'

properties.state

string

伺服器的狀態。

properties.version

string

伺服器的版本。

properties.workspaceFeature

ServerWorkspaceFeature

現有伺服器是否已建立工作區,以及是否允許從工作區進行連線

tags

object

資源標籤。

type

string

資源類型。

ServerExternalAdministrator

Active Directory 系統管理員的屬性。

名稱 類型 Description
administratorType

AdministratorType

伺服器管理員的類型。

azureADOnlyAuthentication

boolean

僅啟用 Azure Active Directory 驗證。

login

string

伺服器管理員的登入名稱。

principalType

PrincipalType

伺服器管理員的主體類型。

sid

string (uuid)

伺服器管理員的 SID (物件識別符)。

tenantId

string (uuid)

系統管理員的租用戶標識碼。

ServerNetworkAccessFlag

是否要限制此伺服器的輸出網路存取。 值為選擇性值,但如果傳入,則必須是 'Enabled' 或 'Disabled'

Description
Disabled
Enabled

ServerPrivateEndpointConnection

伺服器底下的私人端點連線

名稱 類型 Description
id

string

資源標識碼。

properties

PrivateEndpointConnectionProperties

私人端點連線屬性

ServerPublicNetworkAccessFlag

此伺服器是否允許公用端點存取。 值為選擇性值,但如果傳入,必須是 'Enabled' 或 'Disabled' 或 'SecuredByPerimeter'

Description
Disabled
Enabled
SecuredByPerimeter

ServerWorkspaceFeature

現有伺服器是否已建立工作區,以及是否允許從工作區進行連線

Description
Connected
Disconnected

UserIdentity

資源的 Azure Active Directory 身分識別設定。

名稱 類型 Description
clientId

string (uuid)

Azure Active Directory 用戶端標識符。

principalId

string (uuid)

Azure Active Directory 主體標識符。