StartInfrastructures

Description

The StartInfrastructures method sends a request to start infrastructures.

Parameters

REST example

POST http://localhost:7400/Runtime/v1/Service.svc/StartInfrastructures HTTP/1.1
Accept: application/json
Content-Type: application/json
Cache-Control: nocache
Pragma: nocache

{"d": {
}}

Use case with Java Client

import com.neotys.rest.runtime.client.RuntimeAPIClient;
import com.neotys.rest.runtime.client.RuntimeAPIClientFactory;
import com.neotys.rest.runtime.model.StartInfrastructuresParams.StartInfrastructuresBuilder;

public class StartInfrastructuresExample {
	public static void main(String[] args) throws Exception {
		final RuntimeAPIClient client = RuntimeAPIClientFactory
				.newClient("http://localhost:7400/Runtime/v1/Service.svc/");

		final String infrastructuresContent = "infrastructures:\n" +
				"  - name: My Cloud infrastructure\n" +
				"    type: NEOTYS_CLOUD_LOAD_GENERATOR\n" +
				"    workgroup: <My Neotys Workgroup Name>\n" +
				"    architecture: MEDIUM\n" +
				"    duration: 1h\n" +
				"    zones:\n" +
				"    - id: us-east-1\n" +
				"      count: 1\n" +
				"    - id: us-west-4\n" +
				"      count: 1";
		client.startInfrastructures(new StartInfrastructuresBuilder(infrastructuresContent)
				.ncpLogin("loginUser:VyVmg==")
				.build());
	}
}