Add a Service to an Add-on
Applies To: Windows Azure Pack
Adds a service to an add-on.
Specify the Add Add-on Service request as follows: Replace <ServiceMgmt> with your Service Management API endpoint address. Replace <AddonId> with the identifier of the add-on to which the service is added.
Method | Request URI | HTTP version |
|---|---|---|
POST | https://<ServiceMgmt>:30004/addons/<AddonId>/services | HTTP/1.1 |
None.
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. |
The following table describes the request body.
Element name | Description |
|---|---|
Name | The name of the service. |
InstanceId | The identifier of the service instance. |
ConfigState | The configuration state of the quota. |
The response includes an HTTP status code, a set of response headers, and a response body.
A successful operation returns status code 201 (CREATED).
For information about status codes, see Status and Error Codes (Windows Azure Pack Service Management).
The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
The following table describes the elements of the response body.
Element name | Description |
|---|---|
Name | The name of the service. |
InstanceId | The identifier of the service instance. |
ConfigState | The configuration state of the quota. |
The following code example shows an Add Add-on Service request.
POST https://<Computer>:30004/addons/GoldAhihps8jy/services HTTP/1.1
Authorization: Bearer <Token>
x-ms-principal-id: <COMPUTER>\Administrator
Accept-Language: en-US
x-ms-principal-liveid: <COMPUTER>\Administrator
Content-Type: application/json; charset=utf-8
Host: <Computer>:30004
Content-Length: 91
Expect: 100-continue
{
"Name": "mysqlservers",
"InstanceId": "33CC0954-8412-4CE1-924F-B9CB1525FA96",
"ConfigState": 0
}
The following code example shows an Add Add-on Service response.
{
"Name": "mysqlservers",
"InstanceId": "33CC0954-8412-4CE1-924F-B9CB1525FA96",
"ConfigState": 0
}