Skip to content

Latest commit

 

History

History
164 lines (114 loc) · 4.19 KB

KvStoreApi.md

File metadata and controls

164 lines (114 loc) · 4.19 KB

Fastly\Api\KvStoreApi

$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
);

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
createStore() POST /resources/stores/kv Create a KV store.
deleteStore() DELETE /resources/stores/kv/{store_id} Delete a KV store.
getStore() GET /resources/stores/kv/{store_id} Describe a KV store.
getStores() GET /resources/stores/kv List KV stores.

createStore()

createStore($options): \Fastly\Model\StoreResponse // Create a KV store.

Create a new KV store.

Example

    $options['location'] = 'location_example'; // string
$options['store'] = {"name":"my-store"}; // \Fastly\Model\Store

try {
    $result = $apiInstance->createStore($options);
} catch (Exception $e) {
    echo 'Exception when calling KvStoreApi->createStore: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
location string [optional]
store \Fastly\Model\Store [optional]

Return type

\Fastly\Model\StoreResponse

[Back to top] [Back to API list] [Back to README]

deleteStore()

deleteStore($options) // Delete a KV store.

A KV store must be empty before it can be deleted. Deleting a KV store that still contains keys will result in a 409 (Conflict).

Example

    $options['store_id'] = 'store_id_example'; // string

try {
    $apiInstance->deleteStore($options);
} catch (Exception $e) {
    echo 'Exception when calling KvStoreApi->deleteStore: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
store_id string

Return type

void (empty response body)

[Back to top] [Back to API list] [Back to README]

getStore()

getStore($options): \Fastly\Model\StoreResponse // Describe a KV store.

Get a KV store by ID.

Example

    $options['store_id'] = 'store_id_example'; // string

try {
    $result = $apiInstance->getStore($options);
} catch (Exception $e) {
    echo 'Exception when calling KvStoreApi->getStore: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
store_id string

Return type

\Fastly\Model\StoreResponse

[Back to top] [Back to API list] [Back to README]

getStores()

getStores($options): \Fastly\Model\InlineResponse2003 // List KV stores.

Get all stores for a given customer.

Example

    $options['cursor'] = 'cursor_example'; // string
$options['limit'] = 1000; // int

try {
    $result = $apiInstance->getStores($options);
} catch (Exception $e) {
    echo 'Exception when calling KvStoreApi->getStores: ', $e->getMessage(), PHP_EOL;
}

Options

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]

Return type

\Fastly\Model\InlineResponse2003

[Back to top] [Back to API list] [Back to README]