def take_action()

in next_steps/operations/ml_ops/personalize-step-functions/shared/python/actions.py [0:0]


def take_action(status):
    if status in {'CREATE PENDING', 'CREATE IN_PROGRESS'}:
        raise ResourcePending
    if status != 'ACTIVE':
        raise ResourceFailed
    return True