Skip to content

Commit c1703c6

Browse files
committed
Update README.md
1 parent 80d0b81 commit c1703c6

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@
66

77
---
88

9+
## Create Instance
10+
11+
You send a POST request to the `create` endpoint with the following parameters and it will create an instance with the given parameters.
12+
13+
```
14+
http://<api_host>:<api_port>/ec2/create
15+
```
16+
17+
| Parameter | Type | Description |
18+
| :---------------------- | :------- | :-------------------- |
19+
| `aws_access_key_id` | `string` | AWS Access Key ID |
20+
| `aws_secret_access_key` | `string` | AWS Secret Access Key |
21+
| `region_name` | `string` | AWS Region Name |
22+
| `KeyName` | `string` | AWS Key Name |
23+
| `SecurityGroupId` | `string` | AWS Security Group ID |
24+
25+
---
26+
927
## List Instances
1028

1129
You send a request to this endpoint by entering the following parameters, and you can list all the instances in your AWS account in the region you specify and their status.
@@ -24,7 +42,7 @@ http://<api_host>:<api_port>/ec2/list
2442

2543
## Start Instance
2644

27-
You send a request to this endpoint by entering the following parameters, and you can start the instance you specified with `instance_id`, in the region you specified with `region_name` and the status of the instance will be changed to `running`.
45+
You send a request to this endpoint by entering the following parameters, and you can start the instance you specified with `instance_id`, in the region you specified with `region_name` and the status of the instance will be changed to `pending` and then to `running`.
2846

2947
```
3048
http://<api_host>:<api_port>/ec2/start
@@ -41,7 +59,7 @@ http://<api_host>:<api_port>/ec2/start
4159

4260
## Stop Instance
4361

44-
You send a request to this endpoint by entering the following parameters, and you can stop the instance you specified with `instance_id`, in the region you specified with `region_name` and the status of the instance will be changed to `stopped`.
62+
You send a request to this endpoint by entering the following parameters, and you can stop the instance you specified with `instance_id`, in the region you specified with `region_name` and the status of the instance will be changed to `stopping` and then to `stopped`.
4563

4664
```
4765
http://<api_host>:<api_port>/ec2/stop
@@ -55,3 +73,18 @@ http://<api_host>:<api_port>/ec2/stop
5573
| `instance_id` | `string` | Instance ID Number |
5674

5775
---
76+
77+
## Terminate Instance
78+
79+
You send a request to this endpoint by entering the following parameters, and you can terminate the instance you specified with `instance_id`, in the region you specified with `region_name` and the status of the instance will be changed to `shutting-down` and then `terminated`.
80+
81+
```
82+
http://<api_host>:<api_port>/ec2/terminate
83+
```
84+
85+
| Parameter | Type | Description |
86+
| :---------------------- | :------- | :-------------------- |
87+
| `aws_access_key_id` | `string` | AWS Access Key ID |
88+
| `aws_secret_access_key` | `string` | AWS Secret Access Key |
89+
| `region_name` | `string` | AWS Region Name |
90+
| `instance_id` | `string` | Instance ID Number |

0 commit comments

Comments
 (0)