Note
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| create_condition | POST /service/{service_id}/version/{version_id}/condition | Create a condition |
| delete_condition | DELETE /service/{service_id}/version/{version_id}/condition/{condition_name} | Delete a condition |
| get_condition | GET /service/{service_id}/version/{version_id}/condition/{condition_name} | Describe a condition |
| list_conditions | GET /service/{service_id}/version/{version_id}/condition | List conditions |
| update_condition | PUT /service/{service_id}/version/{version_id}/condition/{condition_name} | Update a condition |
Creates a new condition.
let cfg = &Configuration::default();
let params = CreateConditionParams {
// parameters
};
create_condition(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] | |
| comment | Option<String> | A freeform descriptive note. | ||
| name | Option<String> | Name of the condition. Required. | ||
| priority | Option<String> | A numeric string. Priority determines execution order. Lower numbers execute first. | [default to 100] | |
| statement | Option<String> | A conditional expression in VCL used to determine if the condition is met. | ||
| service_id2 | Option<String> | |||
| version | Option<String> | A numeric string that represents the service version. | ||
| _type | Option<String> | Type of the condition. Required. |
crate::models::ConditionResponse
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Deletes the specified condition.
let cfg = &Configuration::default();
let params = DeleteConditionParams {
// parameters
};
delete_condition(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] | |
| condition_name | String | Name of the condition. Required. | [required] |
crate::models::InlineResponse200
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Gets the specified condition.
let cfg = &Configuration::default();
let params = GetConditionParams {
// parameters
};
get_condition(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] | |
| condition_name | String | Name of the condition. Required. | [required] |
crate::models::ConditionResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Gets all conditions for a particular service and version.
let cfg = &Configuration::default();
let params = ListConditionsParams {
// parameters
};
list_conditions(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::ConditionResponse>
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Updates the specified condition.
let cfg = &Configuration::default();
let params = UpdateConditionParams {
// parameters
};
update_condition(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] | |
| condition_name | String | Name of the condition. Required. | [required] | |
| comment | Option<String> | A freeform descriptive note. | ||
| name | Option<String> | Name of the condition. Required. | ||
| priority | Option<String> | A numeric string. Priority determines execution order. Lower numbers execute first. | [default to 100] | |
| statement | Option<String> | A conditional expression in VCL used to determine if the condition is met. | ||
| service_id2 | Option<String> | |||
| version | Option<String> | A numeric string that represents the service version. | ||
| _type | Option<String> | Type of the condition. Required. |
crate::models::ConditionResponse
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json