$apiInstance = new Fastly\Api\ConditionApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
Method | Fastly API endpoint | Description |
---|---|---|
createCondition() | POST /service/{service_id}/version/{version_id}/condition | Create a condition |
deleteCondition() | DELETE /service/{service_id}/version/{version_id}/condition/{condition_name} | Delete a condition |
getCondition() | GET /service/{service_id}/version/{version_id}/condition/{condition_name} | Describe a condition |
listConditions() | GET /service/{service_id}/version/{version_id}/condition | List conditions |
updateCondition() | PUT /service/{service_id}/version/{version_id}/condition/{condition_name} | Update a condition |
createCondition($options): \Fastly\Model\ConditionResponse // Create a condition
Creates a new condition.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['comment'] = 'comment_example'; // string | A freeform descriptive note.
$options['name'] = 'name_example'; // string | Name of the condition. Required.
$options['priority'] = '100'; // string | A numeric string. Priority determines execution order. Lower numbers execute first.
$options['statement'] = 'statement_example'; // string | A conditional expression in VCL used to determine if the condition is met.
$options['service_id'] = 'service_id_example'; // string
$options['version'] = 'version_example'; // string | A numeric string that represents the service version.
$options['type'] = 'type_example'; // string | Type of the condition. Required.
try {
$result = $apiInstance->createCondition($options);
} catch (Exception $e) {
echo 'Exception when calling ConditionApi->createCondition: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
comment | string | A freeform descriptive note. | [optional] |
name | string | Name of the condition. Required. | [optional] |
priority | string | A numeric string. Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] |
statement | string | A conditional expression in VCL used to determine if the condition is met. | [optional] |
service_id | string | [optional] | |
version | string | A numeric string that represents the service version. | [optional] |
type | string | Type of the condition. Required. | [optional] [one of: 'REQUEST', 'CACHE', 'RESPONSE', 'PREFETCH'] |
\Fastly\Model\ConditionResponse
[Back to top] [Back to API list] [Back to README]
deleteCondition($options): \Fastly\Model\InlineResponse200 // Delete a condition
Deletes the specified condition.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['condition_name'] = 'condition_name_example'; // string | Name of the condition. Required.
try {
$result = $apiInstance->deleteCondition($options);
} catch (Exception $e) {
echo 'Exception when calling ConditionApi->deleteCondition: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
condition_name | string | Name of the condition. Required. |
\Fastly\Model\InlineResponse200
[Back to top] [Back to API list] [Back to README]
getCondition($options): \Fastly\Model\ConditionResponse // Describe a condition
Gets the specified condition.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['condition_name'] = 'condition_name_example'; // string | Name of the condition. Required.
try {
$result = $apiInstance->getCondition($options);
} catch (Exception $e) {
echo 'Exception when calling ConditionApi->getCondition: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
condition_name | string | Name of the condition. Required. |
\Fastly\Model\ConditionResponse
[Back to top] [Back to API list] [Back to README]
listConditions($options): \Fastly\Model\ConditionResponse[] // List conditions
Gets all conditions for a particular service and version.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
try {
$result = $apiInstance->listConditions($options);
} catch (Exception $e) {
echo 'Exception when calling ConditionApi->listConditions: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. |
\Fastly\Model\ConditionResponse[]
[Back to top] [Back to API list] [Back to README]
updateCondition($options): \Fastly\Model\ConditionResponse // Update a condition
Updates the specified condition.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['condition_name'] = 'condition_name_example'; // string | Name of the condition. Required.
$options['comment'] = 'comment_example'; // string | A freeform descriptive note.
$options['name'] = 'name_example'; // string | Name of the condition. Required.
$options['priority'] = '100'; // string | A numeric string. Priority determines execution order. Lower numbers execute first.
$options['statement'] = 'statement_example'; // string | A conditional expression in VCL used to determine if the condition is met.
$options['service_id'] = 'service_id_example'; // string
$options['version'] = 'version_example'; // string | A numeric string that represents the service version.
$options['type'] = 'type_example'; // string | Type of the condition. Required.
try {
$result = $apiInstance->updateCondition($options);
} catch (Exception $e) {
echo 'Exception when calling ConditionApi->updateCondition: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
condition_name | string | Name of the condition. Required. | |
comment | string | A freeform descriptive note. | [optional] |
name | string | Name of the condition. Required. | [optional] |
priority | string | A numeric string. Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] |
statement | string | A conditional expression in VCL used to determine if the condition is met. | [optional] |
service_id | string | [optional] | |
version | string | A numeric string that represents the service version. | [optional] |
type | string | Type of the condition. Required. | [optional] [one of: 'REQUEST', 'CACHE', 'RESPONSE', 'PREFETCH'] |