def _get_base(role, **conn):
    """
    Determine whether the boto get_role call needs to be made or if we already have all that data
    in the role object.
    :param role: dict containing (at the very least) role_name and/or arn.
    :param conn: dict containing enough information to make a connection to the desired account.
    :return: Camelized dict describing role containing all all base_fields.
    """
    base_fields = frozenset(['Arn', 'AssumeRolePolicyDocument', 'Path', 'RoleId', 'RoleName', 'CreateDate'])
    needs_base = False

    for field in base_fields:
        if field not in role:
            needs_base = True
            break

    if needs_base:
        role_name = _get_name_from_structure(role, 'RoleName')
        role = CloudAux.go('iam.client.get_role', RoleName=role_name, **conn)
        role = role['Role']

    # cast CreateDate from a datetime to something JSON serializable.
    role.update(dict(CreateDate=get_iso_string(role['CreateDate'])))
    role['_version'] = 3

    return role
def _get_base(role, **conn):
    """
    Determine whether the boto get_role call needs to be made or if we already have all that data
    in the role object.
    :param role: dict containing (at the very least) role_name and/or arn.
    :param conn: dict containing enough information to make a connection to the desired account.
    :return: Camelized dict describing role containing all all base_fields.
    """
    base_fields = frozenset(['Arn', 'AssumeRolePolicyDocument', 'Path', 'RoleId', 'RoleName', 'CreateDate'])
    needs_base = False

    for field in base_fields:
        if field not in role:
            needs_base = True
            break

    if needs_base:
        role_name = _get_name_from_structure(role, 'RoleName')
        role = CloudAux.go('iam.client.get_role', RoleName=role_name, **conn)
        role = role['Role']

    # cast CreateDate from a datetime to something JSON serializable.
    role.update(dict(CreateDate=get_iso_string(role['CreateDate'])))
    role['_version'] = 3

    return role
def _get_base ( role , * * conn ) : base_fields = frozenset ( [ 'Arn' , 'AssumeRolePolicyDocument' , 'Path' , 'RoleId' , 'RoleName' , 'CreateDate' ] ) needs_base = False for field in base_fields : if field not in role : needs_base = True break if needs_base : role_name = _get_name_from_structure ( role , 'RoleName' ) role = CloudAux . go ( 'iam.client.get_role' , RoleName = role_name , * * conn ) role = role [ 'Role' ] # cast CreateDate from a datetime to something JSON serializable. role . update ( dict ( CreateDate = get_iso_string ( role [ 'CreateDate' ] ) ) ) role [ '_version' ] = 3 return role
Determine whether the boto get_role call needs to be made or if we already have all that data
    in the role object.
    :param role: dict containing (at the very least) role_name and/or arn.
    :param conn: dict containing enough information to make a connection to the desired account.
    :return: Camelized dict describing role containing all all base_fields.
Determine whether the boto get_role call needs to be made or if we already have all that data in the role object . : param role : dict containing ( at the very least ) role_name and / or arn . : param conn : dict containing enough information to make a connection to the desired account . : return : Camelized dict describing role containing all all base_fields .