Account

class jmpr.Account(id: str, name: str, email: str = None, arn: str = None, shared_role: str = None, account_iam_client: <module 'boto3' from '/home/docs/checkouts/readthedocs.org/user_builds/jmpr/envs/latest/lib/python3.7/site-packages/boto3/__init__.py'> = None, asset_path: str = 'jmpr', is_target: bool = True)

Bases: object

Methods Summary

acquire_creds(id, name, shared_role[, …])

extract_role_principals(roles)

[summary]

from_org_dict(shared_role, account_dict)

[summary]

get_iam_client(account_iam_creds)

get_roles(asset_path)

[summary]

get_target_roles(source_roles, asset_path)

[summary]

safe_construct(id, name, shared_role[, …])

[summary]

to_list(item)

[summary]

Methods Documentation

static acquire_creds(id: str, name: str, shared_role: str, sts_client: <module 'boto3' from '/home/docs/checkouts/readthedocs.org/user_builds/jmpr/envs/latest/lib/python3.7/site-packages/boto3/__init__.py'> = None)
extract_role_principals(roles: dict)

[summary]

Parameters

{dict} -- [description] (roles) –

classmethod from_org_dict(shared_role: str, account_dict: dict)

[summary]

Parameters
  • {str} -- [description] (shared_role) –

  • {dict} -- [description] (account_dict) –

Returns

[type] – [description]

classmethod get_iam_client(account_iam_creds: dict)
get_roles(asset_path: str)

[summary]

Parameters

{str} -- [description] (asset_path) –

Returns

[type] – [description]

get_target_roles(source_roles: dict, asset_path: str)

[summary]

Parameters
  • {dict} -- [description] (source_roles) –

  • {str} -- [description] (asset_path) –

Returns

[type] – [description]

classmethod safe_construct(id: str, name: str, shared_role: str, email: str = None, arn: str = None, account_iam_client: <module 'boto3' from '/home/docs/checkouts/readthedocs.org/user_builds/jmpr/envs/latest/lib/python3.7/site-packages/boto3/__init__.py'> = None, asset_path: str = 'jmpr', is_target: bool = True)

[summary]

Parameters
  • {str} -- [description] (shared_role) –

  • {str} -- [description]

  • {str} -- [description]

Keyword Arguments
  • {str} -- [description] (default (asset_path) – {None})

  • {str} -- [description] (default – {None})

  • {dict} -- [description] (default (creds) – {None})

  • {str} -- [description] (default – {“jmpr”})

  • {bool} -- [description] (default (is_target) – {True})

Returns

[type] – [description]

to_list(item)

[summary]

Parameters

{[type]} -- [description] (item) –

Raises

TypeError – [description]

Returns

[type] – [description]