How to use the cloudaux.orchestration.aws._conn_from_args function in cloudaux

To help you get started, we’ve selected a few cloudaux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Netflix-Skunkworks / cloudaux / cloudaux / orchestration / aws / iam / user.py View on Github external
'CreateDate': get_iso_string(user['CreateDate']),
            'GroupList': user['GroupList'],
            'InlinePolicies': user['UserPolicyList'],
            'ManagedPolicies': [
                {
                  "name": x['PolicyName'],
                  "arn": x['PolicyArn']
                } for x in user['AttachedManagedPolicies']
            ],
            'Path': user['Path'],
            'UserId': user['UserId'],
            'UserName': user['UserName']
        }

        user = modify(temp_user, output='camelized')
        _conn_from_args(user, conn)
        users.append(registry.build_out(flags, start_with=user, pass_datastructure=True, **conn))

    return users
github Netflix-Skunkworks / cloudaux / cloudaux / orchestration / aws / iam / user.py View on Github external
"ManagedPolicies": ...,
        "MFADevices": ...,
        "Path": ...,
        "UserId": ...,
        "UserName": ...,
        "SigningCerts": ...
    }

    :param user: dict MUST contain the UserName and also a combination of either the ARN or the account_number
    :param output: Determines whether keys should be returned camelized or underscored.
    :param conn: dict containing enough information to make a connection to the desired account.
    Must at least have 'assume_role' key.
    :return: dict containing fully built out user.
    """
    user = modify(user, output='camelized')
    _conn_from_args(user, conn)
    return registry.build_out(flags, start_with=user, pass_datastructure=True, **conn)
github Netflix-Skunkworks / cloudaux / cloudaux / orchestration / aws / iam / managed_policy.py View on Github external
"Description": "...",
        "CreateDate": "...",
        "UpdateDate": "...",
        "Document": "...",
        "_version": 1
    }

    :param managed_policy: dict MUST contain the ARN.
    :param flags:
    :param conn:
    :return:
    """
    if not managed_policy.get('Arn'):
        raise MissingFieldException('Must include Arn.')

    _conn_from_args(managed_policy, conn)
    return registry.build_out(flags, start_with=managed_policy, pass_datastructure=True, **conn)
github Netflix-Skunkworks / cloudaux / cloudaux / orchestration / aws / iam / group.py View on Github external
"_version": 1
    }

    :param flags: By default, Users is disabled. This is somewhat expensive as it has to call the `get_group` call
                  multiple times.
    :param group: dict MUST contain the GroupName and also a combination of either the ARN or the account_number.
    :param output: Determines whether keys should be returned camelized or underscored.
    :param conn: dict containing enough information to make a connection to the desired account.
                 Must at least have 'assume_role' key.
    :return: dict containing fully built out Group.
    """
    if not group.get('GroupName'):
        raise MissingFieldException('Must include GroupName.')

    group = modify(group, output='camelized')
    _conn_from_args(group, conn)
    return registry.build_out(flags, start_with=group, pass_datastructure=True, **conn)
github Netflix-Skunkworks / cloudaux / cloudaux / orchestration / aws / iam / role.py View on Github external
"ManagedPolicies": ...,
        "Path": ...,
        "RoleId": ...,
        "RoleName": ...,
        "Tags": {},
        "_version": 3
    }

    :param role: dict containing (at the very least) role_name and/or arn.
    :param output: Determines whether keys should be returned camelized or underscored.
    :param conn: dict containing enough information to make a connection to the desired account.
    Must at least have 'assume_role' key.
    :return: dict containing a fully built out role.
    """
    role = modify(role, output='camelized')
    _conn_from_args(role, conn)
    return registry.build_out(flags, start_with=role, pass_datastructure=True, **conn)