你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Servers - Get

获取有关服务器的信息。

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

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

资源组的名称。 此名称不区分大小写。

serverName
path True

string

服务器的名称。

subscriptionId
path True

string

目标订阅的 ID。

api-version
query True

string

要用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

Server

确定

Other Status Codes

CloudError

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

ServerGet

Sample Request

GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4?api-version=2017-12-01

Sample Response

{
  "sku": {
    "name": "GP_Gen4_2",
    "tier": "GeneralPurpose",
    "family": "Gen4",
    "capacity": 2
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 7,
      "geoRedundantBackup": "Enabled"
    },
    "version": "5.7",
    "sslEnforcement": "Enabled",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "mysqltestsvc4.mysql.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00",
    "replicationRole": "None",
    "masterServerId": "",
    "replicaCapacity": 5,
    "publicNetworkAccess": "Enabled",
    "privateEndpointConnections": [
      {
        "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
        "properties": {
          "provisioningState": "Ready",
          "privateEndpoint": {
            "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
          },
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "description": "Auto-approved",
            "actionsRequired": "None"
          }
        }
      }
    ]
  },
  "location": "westus",
  "tags": {
    "ElasticServer": "1"
  },
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/mysqltestsvc4",
  "name": "mysqltestsvc4",
  "type": "Microsoft.DBforMySQL/servers"
}

定义

名称 说明
CloudError

来自 Batch 服务的错误响应。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorResponse

错误响应

GeoRedundantBackup

为服务器备份启用异地冗余或不启用异地冗余。

IdentityType

标识类型。 将其设置为“SystemAssigned”,以便自动为资源创建和分配 Azure Active Directory 主体。

InfrastructureEncryption

使用新的加密算法为数据添加第二层加密,以提供额外的数据保护。 值是可选的,但如果传入,则必须为“Disabled”或“Enabled”。

MinimalTlsVersionEnum

为服务器强制实施最低 Tls 版本。

PrivateEndpointProperty
PrivateEndpointProvisioningState

专用终结点连接的状态。

PrivateLinkServiceConnectionStateActionsRequire

专用链接服务连接所需的操作。

PrivateLinkServiceConnectionStateStatus

专用链接服务连接状态。

PublicNetworkAccessEnum

是否允许此服务器访问公用网络。 值是可选的,但如果传入,则必须为“Enabled”或“Disabled”

ResourceIdentity

资源的 Azure Active Directory 标识配置。

Server

表示服务器。

ServerPrivateEndpointConnection

服务器下的专用终结点连接

ServerPrivateEndpointConnectionProperties

专用终结点连接的属性。

ServerPrivateLinkServiceConnectionStateProperty
ServerState

用户可见的服务器的状态。

ServerVersion

服务器的版本。

Sku

服务器的计费信息相关属性。

SkuTier

特定 SKU 的层,例如基本。

SslEnforcementEnum

连接到服务器时是否启用 ssl 强制实施。

StorageAutogrow

启用存储自动增长。

StorageProfile

服务器的存储配置文件属性

CloudError

来自 Batch 服务的错误响应。

名称 类型 说明
error

ErrorResponse

错误响应
对所有 Azure 资源管理器 API 的常见错误响应,可返回失败操作的错误详细信息。 (这也遵循 OData 错误响应格式。)

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorResponse

错误响应

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorResponse[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

GeoRedundantBackup

为服务器备份启用异地冗余或不启用异地冗余。

名称 类型 说明
Disabled

string

Enabled

string

IdentityType

标识类型。 将其设置为“SystemAssigned”,以便自动为资源创建和分配 Azure Active Directory 主体。

名称 类型 说明
SystemAssigned

string

InfrastructureEncryption

使用新的加密算法为数据添加第二层加密,以提供额外的数据保护。 值是可选的,但如果传入,则必须为“Disabled”或“Enabled”。

名称 类型 说明
Disabled

string

静态数据的其他 (第二) 层加密

Enabled

string

静态数据单层加密的默认值。

MinimalTlsVersionEnum

为服务器强制实施最低 Tls 版本。

名称 类型 说明
TLS1_0

string

TLS1_1

string

TLS1_2

string

TLSEnforcementDisabled

string

PrivateEndpointProperty

名称 类型 说明
id

string

专用终结点的资源 ID。

PrivateEndpointProvisioningState

专用终结点连接的状态。

名称 类型 说明
Approving

string

Dropping

string

Failed

string

Ready

string

Rejecting

string

PrivateLinkServiceConnectionStateActionsRequire

专用链接服务连接所需的操作。

名称 类型 说明
None

string

PrivateLinkServiceConnectionStateStatus

专用链接服务连接状态。

名称 类型 说明
Approved

string

Disconnected

string

Pending

string

Rejected

string

PublicNetworkAccessEnum

是否允许此服务器访问公用网络。 值是可选的,但如果传入,则必须为“Enabled”或“Disabled”

名称 类型 说明
Disabled

string

Enabled

string

ResourceIdentity

资源的 Azure Active Directory 标识配置。

名称 类型 说明
principalId

string

Azure Active Directory 主体 ID。

tenantId

string

Azure Active Directory 租户 ID。

type

IdentityType

标识类型。 将其设置为“SystemAssigned”,以便自动为资源创建和分配 Azure Active Directory 主体。

Server

表示服务器。

名称 类型 说明
id

string

资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

ResourceIdentity

服务器的 Azure Active Directory 标识。

location

string

资源所在的地理位置

name

string

资源的名称

properties.administratorLogin

string

服务器的管理员登录名。 只能在 (创建服务器时指定,并且需要创建) 。

properties.byokEnforcement

string

显示是否使用客户管理的密钥启用服务器数据加密的状态。

properties.earliestRestoreDate

string

最早的还原点创建时间 (ISO8601 格式)

properties.fullyQualifiedDomainName

string

服务器的完全限定域名。

properties.infrastructureEncryption

InfrastructureEncryption

显示服务器是否启用了基础结构加密的状态。

properties.masterServerId

string

副本 (replica) 服务器的主服务器 ID。

properties.minimalTlsVersion

MinimalTlsVersionEnum

为服务器强制实施最低 Tls 版本。

properties.privateEndpointConnections

ServerPrivateEndpointConnection[]

服务器上的专用终结点连接列表

properties.publicNetworkAccess

PublicNetworkAccessEnum

是否允许此服务器访问公用网络。 值是可选的,但如果传入,则必须为“Enabled”或“Disabled”

properties.replicaCapacity

integer

主服务器可以具有的最大副本数。

properties.replicationRole

string

服务器的复制角色。

properties.sslEnforcement

SslEnforcementEnum

连接到服务器时是否启用 ssl 强制实施。

properties.storageProfile

StorageProfile

服务器的存储配置文件。

properties.userVisibleState

ServerState

用户可见的服务器的状态。

properties.version

ServerVersion

服务器版本。

sku

Sku

服务器的 SKU (定价层) 。

tags

object

资源标记。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

ServerPrivateEndpointConnection

服务器下的专用终结点连接

名称 类型 说明
id

string

专用终结点连接的资源 ID。

properties

ServerPrivateEndpointConnectionProperties

专用终结点连接属性

ServerPrivateEndpointConnectionProperties

专用终结点连接的属性。

名称 类型 说明
privateEndpoint

PrivateEndpointProperty

连接所属的专用终结点。

privateLinkServiceConnectionState

ServerPrivateLinkServiceConnectionStateProperty

专用终结点连接的连接状态。

provisioningState

PrivateEndpointProvisioningState

专用终结点连接的状态。

ServerPrivateLinkServiceConnectionStateProperty

名称 类型 说明
actionsRequired

PrivateLinkServiceConnectionStateActionsRequire

专用链接服务连接所需的操作。

description

string

专用链接服务连接说明。

status

PrivateLinkServiceConnectionStateStatus

专用链接服务连接状态。

ServerState

用户可见的服务器的状态。

名称 类型 说明
Disabled

string

Dropping

string

Inaccessible

string

Ready

string

ServerVersion

服务器的版本。

名称 类型 说明
5.6

string

5.7

string

8.0

string

Sku

服务器的计费信息相关属性。

名称 类型 说明
capacity

integer

纵向扩展/横向扩展容量,表示服务器的计算单位。

family

string

硬件系列。

name

string

sku 的名称,通常为层 + 系列 + 核心,例如B_Gen4_1、GP_Gen5_8。

size

string

要由资源根据需要解释的大小代码。

tier

SkuTier

特定 SKU 的层,例如基本。

SkuTier

特定 SKU 的层,例如基本。

名称 类型 说明
Basic

string

GeneralPurpose

string

MemoryOptimized

string

SslEnforcementEnum

连接到服务器时是否启用 ssl 强制实施。

名称 类型 说明
Disabled

string

Enabled

string

StorageAutogrow

启用存储自动增长。

名称 类型 说明
Disabled

string

Enabled

string

StorageProfile

服务器的存储配置文件属性

名称 类型 说明
backupRetentionDays

integer

服务器的备份保留天数。

geoRedundantBackup

GeoRedundantBackup

为服务器备份启用异地冗余或不启用异地冗余。

storageAutogrow

StorageAutogrow

启用存储自动增长。

storageMB

integer

服务器允许的最大存储。