API Actions: ActivateInstance

API Actions: ActivateInstance

Once an instance is created from the CloudBasic AMI, it needs to be activated.

Attention: This API call uses non-standard authentication and does not require an Authorization header. At this point of a CloudBasic instance’s lifecycle there are no valid users and credentials created yet.

 

Request Syntax:

XML

POST /api/ActivateInstance HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74

<?xml version="1.0" encoding="utf-8"?>
<ActivateInstanceRequest>
	<Email> your-user@yourdomain.com </Email>
	<InstanceId>ec2_instance_id</InstanceId
	<Password>admin-password</Password>
	<IsProduction>true</IsProduction>
	<Company>MyCompany</Company>
	<ContactPerson>John Doe</ContactPerson>
	<ActivationKey>3FF56259-F057-4A2F-BEB3-643F1BE25HB6E</ActivationKey> 
</ActivateInstanceRequest>

JSON

POST /api/ActivateInstance HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/json
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74

{
	"email": "your-user@yourdomain.com",
	"instanceId": "ec2_instance_id",
	"password": "admin-password",
	"isProduction": false,
	"company": "test",
	"contactPerson": "",
	"activationKey": ""
}

 

Request Parameters

Parameter Description Required
Email A character string that represents a valid email address. This email address will be associated with the first CloudBasic user with Administrator rights and must be used when the user is logging into the CloudBasic console. Yes
Type: String
Default: None
InstanceId The EC2 Instance ID of the CloudBasic instance you are trying to activate. Yes
Type: String
Default: None
Password The default password that will be used when trying to login to the CloudBasic console. Yes
Type: String
Default: None
IsProduction Indicates whether this instance is intended for production or testing use. Production instances need to be configured with defaults for fast, consistent performance and enabled for high-availability. Go to http://hacluster.cloudbasic.net to learn more. To cluster this instance with another CloudBasic instance d in a different zone, see CreateCluster API method. To test clustering in the UI, go to \Advanced\Multi-AZ HA Cluster. Yes
Type: String
Default: None
Valid value: true/ false<
Company The name of your organization. Yes
Type: String
Default: None
ContactPerson The name of the person who can be contacted regarding issues with this instance. No
Type: String
Default: None
ActivationKey A one-time instance specific activation key provided by CloudBasic. This attribute is applicable only to instances activated outside of the AWS, Google Cloud, Oracle Cloud, IBM CLoud and Alibaba Cloud Marketplaces. No
Type: String
Default: None

 

Request Headers

This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers

 

Response Syntax:

XML

HTTP/1.1 200
status: 200

<?xml version="1.0" encoding="utf-8"?>
<ActivateInstanceResponse>
	<AdminUsername>admin</AdminUsername>
	<PublicKey>GUFBSWGOFWLPBDNKFSXE</PublicKey>
	<PrivateKey>hKwIrkxKgFPgNtXYNZj/9X2kPWPtISIHoOwAh0hv</PrivateKey>
</ActivateInstanceResponse>

JSON

HTTP/1.1 200
status: 200
{
	"adminUsername": "admin",
	"publicKey": "GUFBSWGOFWLPBDNKFSXE",
	"privateKey": "hKwIrkxKgFPgNtXYNZj/9X2kPWPtISIHoOwAh0hv"
}

 

Response Parameters

Parameter Description Optional
AdminUsername The User Name of the user that was just created as part of the Instance Activation process. This user has Administrative privileges. No
PublicKey This is the Public Key required to authenticate requests to the CloudBasic API. For more information please see the section API Security
Attention: This is the only time this value will be returned by the API. There are no other ways to retrieve this value.
No
PrivateKey This is the Private Key required to authenticate requests to the CloudBasic API. For more information please see the section API Security
Attention: This is the only time this value will be returned by the API. There are no other ways to retrieve this value.
No
 

Error Response Syntax:

XML

HTTP/1.1 400
status: 400

<?xml version="1.0" encoding="utf-8"?>
<ErrorResponse>
	<RequestId>request-id</RequestId>
	<Errors>
		<Error> <Message>Error message 1</Message> </Error>
		<Error> <Message>Error message 2</Message> </Error>
	</Errors>
</ErrorResponse>

JSON

HTTP/1.1 400
status: 400

{
	"errors": [
		"{Email}:Invalid value for Email",
		"{InstanceId}:Invalid value for InstanceId"
	],
	"requestId": 20
}