建立伺服器群組
適用于:Windows Azure Pack
建立伺服器群組。
要求
以您的服務管理 API 端點位址取代 < ServiceMgmt > 。
方法 |
要求 URI |
HTTP 版本 |
---|---|---|
POST |
HTTPs:// < ServiceMgmt > :30004/services/sqlservers/serverGroups |
HTTP/1.1 |
URI 參數
無。
要求標頭
下表描述必要的和選用的要求標頭。
要求標頭 |
描述 |
---|---|
授權:持有人 |
必要。 授權持有人權杖。 |
x-ms-principal-id |
必要。 主體識別碼。 |
x-ms-client-request-id |
選擇性。 用戶端要求識別碼。 |
x-ms-client-session-id |
選擇性。 用戶端會話識別碼。 |
x-ms-principal-liveid |
選擇性。 主體 Live 識別碼。 |
要求本文
下表說明要求主體的元素。
元素名稱 |
描述 |
---|---|
SqlServerGroup |
要建立的伺服器群組SQL。 如需詳細資訊,請參閱 SqlServerGroup (物件) 。 |
回應
回應包括 HTTP 狀態碼、一組回應標頭和回應主體。
狀態碼
成功的作業會傳回狀態碼 200 (OK)。
回應標頭
此作業的回應包括標準 HTTP 標頭。 所有標準標頭都符合 HTTP/1.1 通訊協定規格。
回應本文
下表描述回應主體的重要元素:
元素名稱 |
描述 |
---|---|
SqlServerGroup |
新的伺服器群組。 如需詳細資訊,請參閱 SqlServerGroup (物件) 。 |
範例
下列程式碼範例顯示 建立伺服器群組 要求。
POST https://:30004/services/sqlservers/serverGroups HTTP/1.1
x-ms-version: 2012-03-01
Accept: application/json
Authorization: Bearer
x-ms-client-request-id: bf339d44-6e8d-4329-bce4-533fe2fd4737-2013-08-27 00:48:29Z
x-ms-client-session-id: d6272660-6ee3-45d5-8cb9-cc79a20799cc
x-ms-principal-id: <SERVICEMGMT>%5cAdministrator
Accept-Language: es-ES
Content-Type: application/json; charset=utf-8
Host: :30004
Content-Length: 110
Expect: 100-continue
{
"GroupId": null,
"GroupName": "newgroup",
"AlwaysOnEnabled": false,
"SharedFileServer": null,
"HostingServerCount": 0
}
下列程式碼範例顯示 建立伺服器群組 回應。
{
"GroupId": "tcnwmq",
"GroupName": "newgroup",
"AlwaysOnEnabled": false,
"SharedFileServer": null,
"HostingServerCount": 0
}