Validate a MySQL Database
Applies To: Windows Azure Pack
Validates a MySQL Database.
Request
Replace <ServiceMgmt> with your Service Management API endpoint address, <TenantAPI> with the Windows Azure Pack tenant API endpoint, and <SubscriptionId> with the tenant subscription identifier.
Method |
Request URI |
HTTP version |
---|---|---|
POST |
https://<TenantAPI>:30005/<SubscriptionId>/services/mysqlservers/databases |
HTTP/1.1 |
URI Parameters
The following table describes the URI parameters.
URI Parameter |
Description |
---|---|
Validate |
Required. Set to True to start validation. |
Request Headers
The following table describes required and optional request headers.
Request header |
Description |
---|---|
Authorization: Bearer |
Required. The authorization bearer token. |
x-ms-principal-id |
Required. The principal identifier. |
x-ms-client-request-id |
Optional. The client request identifier. |
x-ms-client-session-id |
Optional. The client session identifier. |
x-ms-principal-liveid |
Optional. The principal Live identifier. |
Request Body
The following table describes the elements of the request body.
Element name |
Description |
---|---|
HostingServer |
The hosting server to validate. For more information, see HostingServer (MySQL Object). |
Response
The response includes an HTTP status code, a set of response headers, and a response body.
Status Code
A successful operation returns status code 200 (OK). If the database is not verified successfully, 400 (Bad Request) is returned.
Response Headers
The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
Response Body
The following table describes the key elements of the response body:
Element name |
Description |
---|---|
HostingServer |
The validated hosting server. For more information, see HostingServer (MySQL Object). |
Example
The following code example shows a Validate a Hosting Server request.
POST https://<TenantAPI>:30005/<SubscriptionId>/services/mysqlservers/databases?Validate=True HTTP/1.1
x-ms-version: 2012-03-01
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImVvM0I5a3ZRVHZzeDVvMVlIRkQwbXY0ZHF2WSJ9.eyJpc3MiOiJodHRwOi8vYXp1cmVzZXJ2aWNlcy9BdXRoU2l0ZSIsImF1ZCI6Imh0dHA6Ly9henVyZXNlcnZpY2VzL1RlbmFudFNpdGUiLCJuYmYiOjEzNzc3MTQwNzAsImV4cCI6MTM3Nzc0Mjg3MCwidXBuIjoia2h5YXRpQGxpdmUuY29tIn0.dFdmaC4xjRe4KkuY2K_FxttCVfTGMEcnnuMSsQfjrVjS7JZhN9h06zPkORFBWLRDgKURs0_T5uppXmsfUbhKIW-t9qCb5z6DlXbQmmEoyoOhTsFHs66AGLEPWGhVKh1XTg3XNUbv7NSi5DpcMI4R7QsJp2yBss0wa5U2TYi6RN_A0WjY7708RYU133Ml4hxuvL1bibSEeyo3OxcT9767w7Ryh2om2HHczzAw1ThhrcbHlOo98g8Z0OCCXcxFt1KU29JXRKsAK7HWB6w1wk3ovopGrcLId42NlPEfeJIpF_8_JzWfOY0Uhp-hH4RJ8S1dlG-gocUBpq-RJ11LBqR7qg
x-ms-principal-id: person%40contoso.com
Accept-Language: es-ES
Content-Type: application/json; charset=utf-8
Host: <TenantAPI>:30005
Content-Length: 327
Expect: 100-continue
{
"Name": "NewDatabase",
"MySqlServerName": null,
"MySqlServerId": null,
"SubscriptionId": null,
"ConnectionString": null,
"Edition": null,
"MaxSizeMB": 0,
"Collation": null,
"CreationDate": "0001-01-01T00:00:00+00:00",
"ModifiedDate": "0001-01-01T00:00:00+00:00",
"Status": null,
"AdminLogon": null,
"Password": null,
"Quota": null,
"AccountAdminId": null
}
The following code example shows a Validate a Hosting Server response.
{
"Name": "NewDatabase",
"MySqlServerName": null,
"MySqlServerId": null,
"SubscriptionId": null,
"ConnectionString": null,
"Edition": null,
"MaxSizeMB": 0,
"Collation": null,
"CreationDate": "0001-01-01T00:00:00+00:00",
"ModifiedDate": "0001-01-01T00:00:00+00:00",
"Status": null,
"AdminLogon": null,
"Password": null,
"Quota": null,
"AccountAdminId": null
}