Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
create_snippet | POST /service/{service_id}/version/{version_id}/snippet | Create a snippet |
delete_snippet | DELETE /service/{service_id}/version/{version_id}/snippet/{snippet_name} | Delete a snippet |
get_snippet | GET /service/{service_id}/version/{version_id}/snippet/{snippet_name} | Get a versioned snippet |
get_snippet_dynamic | GET /service/{service_id}/snippet/{snippet_id} | Get a dynamic snippet |
list_snippets | GET /service/{service_id}/version/{version_id}/snippet | List snippets |
update_snippet | PUT /service/{service_id}/version/{version_id}/snippet/{snippet_name} | Update a versioned snippet |
update_snippet_dynamic | PUT /service/{service_id}/snippet/{snippet_id} | Update a dynamic snippet |
Create a snippet for a particular service and version.
let cfg = &Configuration::default();
let params = CreateSnippetParams {
// parameters
};
create_snippet(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | [required] | |
version_id | i32 | Integer identifying a service version. | [required] | |
name | Option<String> | The name for the snippet. | ||
_type | Option<String> | The location in generated VCL where the snippet should be placed. | ||
content | Option<String> | The VCL code that specifies exactly what the snippet does. | ||
priority | Option<String> | Priority determines execution order. Lower numbers execute first. | [default to 100] | |
dynamic | Option<String> | Sets the snippet version. |
crate::models::SnippetResponsePost
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Delete a specific snippet for a particular service and version.
let cfg = &Configuration::default();
let params = DeleteSnippetParams {
// parameters
};
delete_snippet(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | [required] | |
version_id | i32 | Integer identifying a service version. | [required] | |
snippet_name | String | The name for the snippet. | [required] |
crate::models::InlineResponse200
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Get a single snippet for a particular service and version.
let cfg = &Configuration::default();
let params = GetSnippetParams {
// parameters
};
get_snippet(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | [required] | |
version_id | i32 | Integer identifying a service version. | [required] | |
snippet_name | String | The name for the snippet. | [required] |
crate::models::SnippetResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Get a single dynamic snippet for a particular service.
let cfg = &Configuration::default();
let params = GetSnippetDynamicParams {
// parameters
};
get_snippet_dynamic(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | [required] | |
snippet_id | String | Alphanumeric string identifying a VCL Snippet. | [required] |
crate::models::SnippetResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
List all snippets for a particular service and version.
let cfg = &Configuration::default();
let params = ListSnippetsParams {
// parameters
};
list_snippets(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | [required] | |
version_id | i32 | Integer identifying a service version. | [required] |
Vec<crate::models::SnippetResponse>
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Update a specific snippet for a particular service and version.
let cfg = &Configuration::default();
let params = UpdateSnippetParams {
// parameters
};
update_snippet(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | [required] | |
version_id | i32 | Integer identifying a service version. | [required] | |
snippet_name | String | The name for the snippet. | [required] |
crate::models::SnippetResponse
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Update a dynamic snippet for a particular service.
let cfg = &Configuration::default();
let params = UpdateSnippetDynamicParams {
// parameters
};
update_snippet_dynamic(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | [required] | |
snippet_id | String | Alphanumeric string identifying a VCL Snippet. | [required] | |
name | Option<String> | The name for the snippet. | ||
_type | Option<String> | The location in generated VCL where the snippet should be placed. | ||
content | Option<String> | The VCL code that specifies exactly what the snippet does. | ||
priority | Option<String> | Priority determines execution order. Lower numbers execute first. | [default to 100] | |
dynamic | Option<String> | Sets the snippet version. |
crate::models::SnippetResponse
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json