Code Monkey home page Code Monkey logo

coto's Introduction

coto: An AWS Management Console Client

Documentation Status Version

Almost any AWS service can be fully controlled using the AWS API, for this we strongly recommend the use of boto3. 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.

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.

import boto3
import coto

session = coto.Session(
    boto3_session=boto3.Session()
)

Login using root user password.

import coto

session = coto.Session(
    email='[email protected]',
    password='s3cur3 p4ssw0rd!'
)

Login using root user password with virtual MFA.

import coto

session = coto.Session(
    email='[email protected]',
    password='s3cur3 p4ssw0rd!',
    mfa_secret='MFAxSECRETxSEEDxXXXXXXXXXXXXXXXXXX'
)

Get account information

iam = session.client('iam')
iam.get_account_info()

Set tax registration

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

coto's People

Contributors

dazzle1979 avatar donkersgoed avatar filirom1 avatar rzamana avatar svdgraaf avatar tader avatar wvanheerde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

coto's Issues

set_tax_registration() broken

Cannot set tax settings from TaxRegistration Dict according to coto documentation.

Error return from put request:
Exception: failed put taxexemption/eu/vat/information: {"message":"SetTaxRegistration","type":"BPCValidationException","errorCode":"","constraintViolationCodeList":[]}

Unable to authenticate

Hello,

I am getting the following error when trying to authenticate as root to set MFA.

unable to obtain IAM xsrf_token

coto Ver: 0.4.2

Thanks,
Nasir

botocore.vendored.requests removed

As stated in this blog post, AWS now removed the vendored.requests module from botocore, rendering coto.Session dysfunctional with the new version.

Since the standard "requests" module is already in requirements.txt, fixing this should be as simple as importing this module instead of the botocore.vendored version.

unable to create session

I have passed root username and password to create coto session

i got the following error:

coto.clients.signin_aws.exceptions.CaptchaRequiredException: Captcha required for action: resolveAccountType

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.