Name | awsOnOff JSON |
Version |
0.0.1
JSON |
| download |
home_page | |
Summary | A python module for easily starting and stopping aws services(ec2 , ecs , rds) |
upload_time | 2023-11-01 13:14:59 |
maintainer | |
docs_url | None |
author | Manish Kumar |
requires_python | |
license | GNU |
keywords |
awsonoff
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# awsOnOff Python Module Readme
The `awsOnOff` Python module is a utility for managing Amazon Web Services (AWS) Elastic Compute Cloud (EC2) instances. It provides a simple and convenient way to start and stop EC2 instances in a specified AWS region. This module is particularly useful for automating EC2 instance management tasks.
## Installation
You can install the `awsOnOff` module using `pip`. Please make sure you have Python installed on your system before proceeding.
```bash
pip install awsOnOff
```
## Usage
The `awsOnOff` module includes functions for starting and stopping EC2 instances. You will need to provide the instance IDs and the AWS region as parameters.
### Importing the Module
To use the module, you should import it as follows:
```python
import awsOnOff.ec2 as ec2
```
### Starting an EC2 Instance
You can start one or more EC2 instances using the `start_ec2` function. The function accepts the instance ID(s) and the AWS region as parameters.
```python
ec2.start_ec2(instance_id, region)
```
- `instance_id`: A string containing the instance ID(s) of the EC2 instance(s) you want to start. You can provide multiple instance IDs separated by commas (`,`).
- `region`: The AWS region where the instances are located.
Example:
```python
ec2.start_ec2("i-12345678", "us-east-1")
```
### Starting All EC2 Instances
To start all EC2 instances in a specified region, you can use the `start_all_ec2` function:
```python
ec2.start_all_ec2(region)
```
- `region`: The AWS region where you want to start all EC2 instances.
Example:
```python
ec2.start_all_ec2("us-west-2")
```
### Stopping an EC2 Instance
You can stop one or more EC2 instances using the `stop_ec2` function. The function accepts the instance ID(s) and the AWS region as parameters.
```python
ec2.stop_ec2(instance_id, region)
```
- `instance_id`: A string containing the instance ID(s) of the EC2 instance(s) you want to stop. You can provide multiple instance IDs separated by commas (`,`).
- `region`: The AWS region where the instances are located.
Example:
```python
ec2.stop_ec2("i-12345678", "us-east-1")
```
### Stopping All EC2 Instances
To stop all EC2 instances in a specified region, you can use the `stop_all_ec2` function:
```python
ec2.stop_all_ec2(region)
```
- `region`: The AWS region where you want to stop all EC2 instances.
Example:
```python
ec2.stop_all_ec2("us-west-2")
```
## Error Handling
The module includes error handling to ensure that you provide the required parameters:
- If you do not provide a region, an `Exception` is raised with the message "Must Provide Region."
- If you do not provide instance IDs, an `Exception` is raised with the message "Must Provide instance_id."
## Contribution
Contributions to this module are welcome. If you would like to contribute, please follow the best practices for Python modules, write tests, and create a pull request.
## License
This module is provided under the MIT License. See the LICENSE file for more details.
## Contact
If you have any questions or encounter issues, please feel free to contact the author of this module.
Author: [Your Name]
Email: [Your Email Address]
Thank you for using the `awsOnOff` module. We hope it simplifies your EC2 instance management tasks in AWS.
Change Log
==========
0.0.1 (01/11/2023)
-------------------
- First Release
Raw data
{
"_id": null,
"home_page": "",
"name": "awsOnOff",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "awsOnOff",
"author": "Manish Kumar",
"author_email": "officialmanishkr98@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e9/63/d43dbb72264a46d3d743c6786c5eb2f2a01fe139061f1f716a62b8714d41/awsOnOff-0.0.1.tar.gz",
"platform": null,
"description": "# awsOnOff Python Module Readme\n\nThe `awsOnOff` Python module is a utility for managing Amazon Web Services (AWS) Elastic Compute Cloud (EC2) instances. It provides a simple and convenient way to start and stop EC2 instances in a specified AWS region. This module is particularly useful for automating EC2 instance management tasks.\n\n## Installation\n\nYou can install the `awsOnOff` module using `pip`. Please make sure you have Python installed on your system before proceeding.\n\n```bash\npip install awsOnOff\n```\n\n## Usage\n\nThe `awsOnOff` module includes functions for starting and stopping EC2 instances. You will need to provide the instance IDs and the AWS region as parameters.\n\n### Importing the Module\n\nTo use the module, you should import it as follows:\n\n```python\nimport awsOnOff.ec2 as ec2\n```\n\n### Starting an EC2 Instance\n\nYou can start one or more EC2 instances using the `start_ec2` function. The function accepts the instance ID(s) and the AWS region as parameters.\n\n```python\nec2.start_ec2(instance_id, region)\n```\n\n- `instance_id`: A string containing the instance ID(s) of the EC2 instance(s) you want to start. You can provide multiple instance IDs separated by commas (`,`).\n- `region`: The AWS region where the instances are located.\n\nExample:\n```python\nec2.start_ec2(\"i-12345678\", \"us-east-1\")\n```\n\n### Starting All EC2 Instances\n\nTo start all EC2 instances in a specified region, you can use the `start_all_ec2` function:\n\n```python\nec2.start_all_ec2(region)\n```\n\n- `region`: The AWS region where you want to start all EC2 instances.\n\nExample:\n```python\nec2.start_all_ec2(\"us-west-2\")\n```\n\n### Stopping an EC2 Instance\n\nYou can stop one or more EC2 instances using the `stop_ec2` function. The function accepts the instance ID(s) and the AWS region as parameters.\n\n```python\nec2.stop_ec2(instance_id, region)\n```\n\n- `instance_id`: A string containing the instance ID(s) of the EC2 instance(s) you want to stop. You can provide multiple instance IDs separated by commas (`,`).\n- `region`: The AWS region where the instances are located.\n\nExample:\n```python\nec2.stop_ec2(\"i-12345678\", \"us-east-1\")\n```\n\n### Stopping All EC2 Instances\n\nTo stop all EC2 instances in a specified region, you can use the `stop_all_ec2` function:\n\n```python\nec2.stop_all_ec2(region)\n```\n\n- `region`: The AWS region where you want to stop all EC2 instances.\n\nExample:\n```python\nec2.stop_all_ec2(\"us-west-2\")\n```\n\n## Error Handling\n\nThe module includes error handling to ensure that you provide the required parameters:\n\n- If you do not provide a region, an `Exception` is raised with the message \"Must Provide Region.\"\n- If you do not provide instance IDs, an `Exception` is raised with the message \"Must Provide instance_id.\"\n\n## Contribution\n\nContributions to this module are welcome. If you would like to contribute, please follow the best practices for Python modules, write tests, and create a pull request.\n\n## License\n\nThis module is provided under the MIT License. See the LICENSE file for more details.\n\n## Contact\n\nIf you have any questions or encounter issues, please feel free to contact the author of this module.\n\nAuthor: [Your Name]\nEmail: [Your Email Address]\n\nThank you for using the `awsOnOff` module. We hope it simplifies your EC2 instance management tasks in AWS.\n\nChange Log\n==========\n\n0.0.1 (01/11/2023)\n-------------------\n- First Release\n",
"bugtrack_url": null,
"license": "GNU",
"summary": "A python module for easily starting and stopping aws services(ec2 , ecs , rds)",
"version": "0.0.1",
"project_urls": null,
"split_keywords": [
"awsonoff"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dd0b314708d054be719639fee466da75c438bad5e1a668abb4a8452352bc6624",
"md5": "5d6fc4826f9a2d9abf6fff37699a8187",
"sha256": "d2b23bd0d6d646d4d3688d53b4bec3fc9124167db6ca1671a22a559d656c4353"
},
"downloads": -1,
"filename": "awsOnOff-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5d6fc4826f9a2d9abf6fff37699a8187",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 17517,
"upload_time": "2023-11-01T13:14:57",
"upload_time_iso_8601": "2023-11-01T13:14:57.331455Z",
"url": "https://files.pythonhosted.org/packages/dd/0b/314708d054be719639fee466da75c438bad5e1a668abb4a8452352bc6624/awsOnOff-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e963d43dbb72264a46d3d743c6786c5eb2f2a01fe139061f1f716a62b8714d41",
"md5": "e6a3c138964020b0622427147af80a4d",
"sha256": "c6be2d26e1e210861972ed75cf54ff02b87ddef442a4a3700d5e1d8b3b890519"
},
"downloads": -1,
"filename": "awsOnOff-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "e6a3c138964020b0622427147af80a4d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16575,
"upload_time": "2023-11-01T13:14:59",
"upload_time_iso_8601": "2023-11-01T13:14:59.489696Z",
"url": "https://files.pythonhosted.org/packages/e9/63/d43dbb72264a46d3d743c6786c5eb2f2a01fe139061f1f716a62b8714d41/awsOnOff-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-01 13:14:59",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "awsonoff"
}