def get_snapshot_id(snapshot):
    """Get backend snapshot id.

    Take the id from provider_location in case this is managed snapshot.
    """
    return snapshot['provider_location'] or snapshot['id']