https://github.com/sentialabs/coto
Undocumented AWS Management Console APIs SDK for Python
https://github.com/sentialabs/coto
Last synced: 5 months ago
JSON representation
Undocumented AWS Management Console APIs SDK for Python
- Host: GitHub
- URL: https://github.com/sentialabs/coto
- Owner: sentialabs
- License: other
- Created: 2018-03-17T12:59:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-10T23:39:35.000Z (over 2 years ago)
- Last Synced: 2024-12-12T18:23:29.255Z (5 months ago)
- Language: Python
- Homepage:
- Size: 139 KB
- Stars: 51
- Watchers: 6
- Forks: 22
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-github-repos - sentialabs/coto - Undocumented AWS Management Console APIs SDK for Python (Python)
README
# coto: An AWS Management Console Client
[](http://coto.readthedocs.io/en/latest/?badge=latest)
[](https://pypi.python.org/pypi/coto/)Almost any AWS service can be fully controlled using the AWS API, for this we strongly recommend the use of [boto3](http://boto3.readthedocs.io/). The problem is, that there exist some administrative tasks for which there is no public API, and there exist some [AWS tasks that still require the AWS Account Root User](https://docs.aws.amazon.com/general/latest/gr/aws_tasks-that-require-root.html).
For example when creating a new account in an AWS Organization, there are some things that you are unable to do using the documented APIs, such as:
* set tax registration information (no documented API)
* set additional contacts (no documented API)
* reset AWS Account Root User password (no documented API)
* setup MFA for the AWS Account Root User (requires root user)> **Note:**
>
> This project provides a client for the undocumented APIs that are used by the AWS Management Console. **These APIs will be changing without any upfront warning!** As a result of this, coto can break at any moment.## Examples
### Login using a boto session.
```python
import boto3
import cotosession = coto.Session(
boto3_session=boto3.Session()
)
```### Login using root user password.
```python
import cotosession = coto.Session(
email='[email protected]',
password='s3cur3 p4ssw0rd!'
)
```### Login using root user password with virtual MFA.
```python
import cotosession = coto.Session(
email='[email protected]',
password='s3cur3 p4ssw0rd!',
mfa_secret='MFAxSECRETxSEEDxXXXXXXXXXXXXXXXXXX'
)
```### Get account information
```python
iam = session.client('iam')
iam.get_account_info()
```### Set tax registration
```python
billing = session.client('billing')
billing.set_tax_registration(
TaxRegistration={
'address': {
'addressLine1': 'Adresweg 1',
'addressLine2': None,
'city': 'Delft',
'countryCode': 'NL',
'postalCode': '2600 AA',
'state': 'Zuid-Holland',
},
'authority': {'country': 'NL', 'state': None},
'legalName': 'Besloten Venootschap B.V.',
'localTaxRegistration': False,
'registrationId': 'NL000000000B01',
}
)
```## Development
```
pipenv install -d
pipenv run nosetests tests
cd docs
pipenv run make html
```