API Actions: CreateCluster
Request Syntax:
JSON
POST /api/CreateCluster 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 { "remoteServer": "nn.nn.nn.nn", //private or public IPv4/dnsName of the remote cluster instance "localServer": "nn.nn.nn.nn", //12.347 and above - private or public IPv4/dnsName of this local cluster instance "port": "4432", //if no SSL certificate is generated/installed, then can cluster over a non-https port 82 "publicKey": "XXXXXXXXFYBHXKDASETJ", //publicKey obtained from the result of the /api/ActivateInstance API call submitted to activate the remote cluster instance "privateKey": "XXXXXXX+IgMDJSP9OwK5M0ujFhnd2yh4E3amiMLe" //privateKey obtained from the result of the /api/ActivateInstance API call }
Request Parameters
Parameter | Description | Required |
---|---|---|
RemoteServer | The IP or DNS Host (public or private) of the second cluster EC2 instance being clustered. Important: The second server need to be activated via submitting an /api/ActivateInstance request to its API and public and private API keys retained, as needed to be passed in this /api/CreateCluster API call. |
Yes |
Type: String Default: None |
||
LocalServer | The IP or DNS Host (public or private) of this local instance (first cluster EC2 server) being clustered. Important: The second server need to be activated via submitting an /api/ActivateInstance request to its API and public and private API keys retained, as needed to be passed in this /api/CreateCluster API call. |
Yes |
Type: String Default: None |
||
Port | The default port is 81. For TLS 1.2/SSL cluster communication specify port 444 after installing SSL certificate. For more information see https://cloudbasic.net/documentation/encrypting-ha-cluster-communication/ . | Yes |
Type: Integer Default: 4431 (https), 81 (http) |
||
PublicKey | A valid public key of the second server being clustered. | Yes |
Type: String Default: None |
||
PrivateKey | The private key paired with the above PublicKey. | Yes |
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:
HTTP/1.1 200 status: 200
Response Parameters
None
Error Response Syntax:
JSON
HTTP/1.1 400 status: 400 { "errors": [ "{RemoteServer}:Invalid value for RemoteServer", "{Port}:Invalid value for Port" ], "requestId": 20 }