You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-4Lines changed: 37 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,31 @@
2
2
3
3

4
4
5
-
### Python API uses Flask and Boto3 libraries. It has the features of Instance listing, Instance start and Instance stop; it has 3 endpoints communicate with EC2 service on AWS.
5
+
### Python API uses the Flask and Boto3 libraries. It has instance listing, instance start, instance stop, instance create and instance terminate features; It has 5 endpoints communicating with EC2 service on AWS.
6
+
7
+
---
8
+
9
+
## Create Instance
10
+
11
+
You send a POST request to the `create` endpoint with the following parameters and it will create Ubuntu EC2 instance. You create your EC2 Instance with the `region_name`, `KeyName` and `SecurityGroupId` parameters you send in the request.
|`SecurityGroupId`|`string`| AWS Security Group ID |
6
24
7
25
---
8
26
9
27
## List Instances
10
28
11
-
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.
29
+
You send a GET request to the `list`endpoint by entering the following parameters, then you can list all the instances and their status in your AWS account in the region you specify.
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 POST request to the `start`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`.
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 POST request to the `stop`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`.
You send a POST request to the `terminate` 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`.
0 commit comments