Ejemplo n.º 1
0
    def get_permissions_profiles(args):
        """Retrieve all permissions profiles"""
        api_client = create_api_client(base_path=args["base_path"], access_token=args["access_token"])

        try:
            account_api = AccountsApi(api_client)
            response = account_api.list_permissions(account_id=args["account_id"])

            return response.permission_profiles

        except ApiException as err:
            return process_error(err)
Ejemplo n.º 2
0
    def get_data(args):
        """Retrieve groups and permission profiles"""
        api_client = create_api_client(base_path=args["base_path"], access_token=args["access_token"])
        try:
            account_api = AccountsApi(api_client)
            group_api = GroupsApi(api_client)
            permission_profiles = account_api.list_permissions(account_id=args["account_id"]).permission_profiles
            groups = group_api.list_groups(account_id=args["account_id"]).groups

            return permission_profiles, groups

        except ApiException as err:
            return process_error(err)