The configuration to launch an EC2 instance in Amazon Web Services using machine. Rancher is calling docker-machine, so any available options in docker-machine for specific drivers are exposed in Rancher. The default fields from docker-machine are not listed in the Rancher API, and they can be found in the docker-machine documentation. The notes on which fields are required are from the docker-machine documentation.
| Field | Type | Create | Update | Default | Notes |
|---|---|---|---|---|---|
| accessKey | string | Optional | Yes | - | |
| ami | string | Optional | Yes | - | |
| deviceName | string | Optional | Yes | - | |
| iamInstanceProfile | string | Optional | Yes | - | |
| instanceType | string | Optional | Yes | - | |
| monitoring | boolean | Optional | Yes | - | |
| privateAddressOnly | boolean | Optional | Yes | - | |
| region | string | Optional | Yes | - | The region to use when launching the host |
| requestSpotInstance | boolean | Optional | Yes | - | |
| rootSize | string | Optional | Yes | - | |
| secretKey | string | Optional | Yes | - | |
| securityGroup | string | Optional | Yes | - | |
| sessionToken | string | Optional | Yes | - | |
| spotPrice | string | Optional | Yes | - | |
| sshKeypath | string | Optional | Yes | - | |
| sshUser | string | Optional | Yes | - | The ssh username to use to ssh into the host |
| subnetId | string | Optional | Yes | - | |
| tags | string | Optional | Yes | - | |
| useEbsOptimizedInstance | boolean | Optional | Yes | - | |
| usePrivateAddress | boolean | Optional | Yes | - | |
| volumeType | string | Optional | Yes | - | |
| vpcId | string | Optional | Yes | - | |
| zone | string | Optional | Yes | - |
Please read more about the common resource fields. These fields are read only and applicable to almost every resource. We have segregated them from the list above.
CreatePOST: /v1/amazonec2Configs
curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"accessKey": "string",
"ami": "string",
"deviceName": "string",
"iamInstanceProfile": "string",
"instanceType": "string",
"monitoring": false,
"privateAddressOnly": false,
"region": "string",
"requestSpotInstance": false,
"rootSize": "string",
"secretKey": "string",
"securityGroup": "string",
"sessionToken": "string",
"spotPrice": "string",
"sshKeypath": "string",
"sshUser": "string",
"subnetId": "string",
"tags": "string",
"useEbsOptimizedInstance": false,
"usePrivateAddress": false,
"volumeType": "string",
"vpcId": "string",
"zone": "string"
}' 'http://${RANCHER_URL}:8080/v1/amazonec2Configs'