Add a VCL Snippet
A 3-step recipe with Fastly. We can help you get access.
Recipe · 3 steps
Add a VCL Snippet
with Fastly
Clone a version, add a VCL snippet, and activate the clone.
- Clone the supplied version into a new editable draft version.
- Add the VCL snippet to the cloned version.
- Activate the cloned version so the snippet takes effect.
What you'll need to have ready
- apiToken: The Fastly API token used to authenticate requests.
- serviceId: The alphanumeric identifier of the service.
- versionId: The version number to clone.
- snippetName: A name for the VCL snippet.
- snippetType: The VCL subroutine the snippet runs in (e.g. recv, fetch, deliver).
- snippetContent: The VCL code for the snippet.
- priority: The execution priority of the snippet.
For your developer
Arazzo workflow fastly:add-vcl-snippet, 3 operations: cloneServiceVersion → createSnippet → activateServiceVersion. Specs on APIs.io.