Creating Worker Configuration
This section explains how to create a new worker configuration.
Request
POST https://<hostname>/api/v1/workerConfiguration |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
None.
Request Body
Property | Type | Description |
minInstances | integer | Sets the minimum allowed number of instances that might be deployed in accordance with the worker configuration. |
maxInstances | integer | Sets the maximum allowed number of instances that might be deployed in accordance with the worker configuration. |
subnet | string | Sets the subnetwork name. |
virtualNetworkResourceId | string | Sets the identification number of the virtual network that you want to use. Can be obtained as described in Getting Worker Configuration. |
regionId | string | Sets the identification number of the network. |
networkSecurityGroupId | string | Sets the identification number of the network security group that you want to use. Can be obtained as described in Getting Worker Configuration. |
virtualMachineType | string | Sets the type of which to deploy VMs as workers. |
Request Example
Request: POST https://<hostname>/api/v1/workerConfiguration
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "regionId":"ukwest", "maxInstances":5, "minInstances":1, "networkSecurityGroupId":"/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/cpm-backup-martin/providers/microsoft.network/networksecuritygroups/controller-nsg", "subnet":"abc-Subnet", "virtualMachineType":"Standard_A2", "virtualNetworkResourceId":"/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/jenkins-abc/providers/microsoft.network/virtualnetworks/abc-network" } |
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 (OK).
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |