Added $key and $bucket support