LOG IN SIGN UP
Documentation

Working with Edge Dictionaries using the web interface

  Last updated November 12, 2018

Edge Dictionaries allow you to create logic that doesn't need to be attached to a configuration service version. Edge Dictionaries are made up of dictionary containers and dictionary items. You can use dictionary items to create and store key-value pairs. Attaching dictionary containers to a service version allows you to turn frequently repeated statements into single function statements that act as a constant.

Viewing dictionaries

To view a dictionary, navigate to the dictionary management area of your service:

  1. Log in to the Fastly web interface and click the Configure link.
  2. From the service menu, select the appropriate service.
  3. Click the Configuration button and then select Clone active. The Domains page appears.
  4. Click the Dictionaries link under Data. Existing dictionaries, if any, associated with the currently selected service version appear.

Creating a dictionary

Dictionaries have two parts: a dictionary container and the items within it.

Creating a dictionary container

To create a dictionary, start by creating a dictionary container:

  1. Log in to the Fastly web interface and click the Configure link.
  2. From the service menu, select the appropriate service.
  3. Click the Configuration button and then select Clone active. The Domains page appears.
  4. Click the Dictionaries link under Data. The Dictionaries page appears.

    an empty example dictionary container as it appears in the Fastly web interface

  5. Click Create a dictionary. The dictionary container name field appears.
  6. In the Name of dictionary field, type a descriptive name for the dictionary (e.g., Example Dictionary).
  7. Click the Add button. The empty dictionary container you created appears.
  8. Click the Activate button to deploy your configuration changes to the service version you're editing.

Creating a dictionary item

Once your dictionary container is created, add items into it:

  1. Click the Add item link. The dictionary item fields appear.
  2. In the Key field, type the unique identifier for some item of data (e.g., example.com).
  3. In the Value field, type the value associated with the unique identifier (e.g., yes)
  4. Click the Add button. The key-value pair appears in the dictionary container. This addition will become effective immediately.

    an example dictionary container with one dictionary item, as it appears in the Fastly web interface

Editing a dictionary

Keeping in mind their limitations, dictionary containers and the items within them can be edited via the web interface.

Editing dictionary container

You can edit the name of a dictionary container that was created via the web interface in any unlocked service version:

  1. Find a dictionary associated with an unlocked version of your service.
  2. Click the pencil icon next to the dictionary container name.
  3. Change the name, then click the Save button.

Editing a dictionary item

You can edit the dictionary items within a container at any time. To edit the key-value pair in a dictionary container that was created via the web interface:

  1. Find any dictionary associated with your service in which the key-value pairs appear. Because dictionary items are versionless, the service version you choose doesn't matter. Choose the one that makes the most sense to you.
  2. Hover your cursor over a dictionary item, then click the pencil icon that appears.
  3. Edit the key or value as necessary.
  4. Click the Save button. The changes you make will be immediately applied to your configuration. If your dictionary container has already been associated with a deployed service version, those changes will happen live.

Deleting an dictionary

Keeping in mind their limitations, dictionary containers and the items within them can be deleted via the web interface.

Deleting a dictionary container

You can delete a dictionary container that was created via the web interface in any unlocked service version:

  1. Find a dictionary associated with an unlocked version of your service.
  2. Click the trash can icon in the top right corner of the dictionary.
  3. Click the Confirm and delete button.
  4. Click the Activate button to deploy your configuration changes to the service version you're editing.

Deleting a dictionary entry

You can delete the dictionary entries within a container at any time. To delete a key-value pair included in a dictionary container that was created via the web interface:

  1. Find any dictionary associated with your service in which the key-value pairs appear. Because dictionary items are versionless, the service version you choose doesn't matter. Choose the one that makes the most sense to you.
  2. Hover your cursor over a dictionary item, then click the trash can icon that appears.
  3. Click the Confirm and delete button.

Additional resources:


Back to Top