$apiInstance = new Fastly\Api\KvStoreApi(
// 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
);Note
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| kvStoreCreate() | POST /resources/stores/kv | Create a KV store. |
| kvStoreDelete() | DELETE /resources/stores/kv/{store_id} | Delete a KV store. |
| kvStoreGet() | GET /resources/stores/kv/{store_id} | Describe a KV store. |
| kvStoreList() | GET /resources/stores/kv | List all KV stores. |
| kvStorePut() | PUT /resources/stores/kv/{store_id} | Update a KV store. |
kvStoreCreate($options): \Fastly\Model\KvStoreDetails // Create a KV store.Create a KV store.
$options['location'] = 'location_example'; // string
$options['kv_store_request_create_or_update'] = {"name":"my-store"}; // \Fastly\Model\KvStoreRequestCreateOrUpdate
try {
$result = $apiInstance->kvStoreCreate($options);
} catch (Exception $e) {
echo 'Exception when calling KvStoreApi->kvStoreCreate: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| location | string | [optional] [one of: 'US', 'EU', 'ASIA', 'AUS'] | |
| kv_store_request_create_or_update | \Fastly\Model\KvStoreRequestCreateOrUpdate | [optional] |
[Back to top] [Back to API list] [Back to README]
kvStoreDelete($options) // Delete a KV store.A KV store must be empty before it can be deleted. Attempting to delete a KV store that contains items will result in a response with a 409 status code.
$options['store_id'] = 'store_id_example'; // string
try {
$apiInstance->kvStoreDelete($options);
} catch (Exception $e) {
echo 'Exception when calling KvStoreApi->kvStoreDelete: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| store_id | string |
void (empty response body)
[Back to top] [Back to API list] [Back to README]
kvStoreGet($options): \Fastly\Model\KvStoreDetails // Describe a KV store.Get details of a KV store.
$options['store_id'] = 'store_id_example'; // string
try {
$result = $apiInstance->kvStoreGet($options);
} catch (Exception $e) {
echo 'Exception when calling KvStoreApi->kvStoreGet: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| store_id | string |
[Back to top] [Back to API list] [Back to README]
kvStoreList($options): \Fastly\Model\InlineResponse20010 // List all KV stores.List all KV stores.
$options['cursor'] = 'cursor_example'; // string
$options['limit'] = 1000; // int
$options['name'] = 'name_example'; // string | Returns a one-element array containing the details for the named KV store.
try {
$result = $apiInstance->kvStoreList($options);
} catch (Exception $e) {
echo 'Exception when calling KvStoreApi->kvStoreList: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | string | [optional] | |
| limit | int | [optional] [defaults to 1000] | |
| name | string | Returns a one-element array containing the details for the named KV store. | [optional] |
\Fastly\Model\InlineResponse20010
[Back to top] [Back to API list] [Back to README]
kvStorePut($options) // Update a KV store.Update the name of a KV store.
$options['store_id'] = 'store_id_example'; // string
$options['kv_store_request_create_or_update'] = {"name":"my-renamed-store"}; // \Fastly\Model\KvStoreRequestCreateOrUpdate
try {
$apiInstance->kvStorePut($options);
} catch (Exception $e) {
echo 'Exception when calling KvStoreApi->kvStorePut: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| store_id | string | ||
| kv_store_request_create_or_update | \Fastly\Model\KvStoreRequestCreateOrUpdate | [optional] |
void (empty response body)