To make it work correctly all these environment variables need to be set
export SERVICE_ID=XXXXX export API_KEY="XXXX" export VERSION="XXXXX"
Next step is to add a dictionary. To add it please run
http POST https://api.fastly.com/service/$SERVICE_ID/version/$VERSION/dictionary Fastly-Key:$API_KEY name=logging_options
This will create an edge dictionary called logging_options. If successful you should see
{
"created_at": "2017-11-22T17:10:05Z",
"deleted_at": null,
"id": "DDDDDDDDDDDDDDDDD",
"name": "io_config_options",
"service_id": "AAAAAAAAAAAAAAAAa",
"updated_at": "2017-11-22T17:10:05Z",
"version": 30,
"write_only": false
}
Please note the id value in the payload above. You will need it to set the DICTIONARY_ID environment variable as it's going to be used in the next step e.g.
export DICTIONARY_ID="DDDDDDDDDDDDDDDDD"
Next step is to add dictionary id values e.g.
http POST https://api.fastly.com/service/$SERVICE_ID/dictionary/$DICTIONARY_ID/item Fastly-Key:$API_KEY item_key=sampling_static item_value=10 http POST https://api.fastly.com/service/$SERVICE_ID/dictionary/$DICTIONARY_ID/item Fastly-Key:$API_KEY item_key=sampling_dynamic item_value=60