Skip to content

Latest commit

 

History

History
203 lines (142 loc) · 5.72 KB

File metadata and controls

203 lines (142 loc) · 5.72 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
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()

kvStoreCreate($options): \Fastly\Model\KvStoreDetails // Create a KV store.

Create a KV store.

Example

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

Options

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]

Return type

\Fastly\Model\KvStoreDetails

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

kvStoreDelete()

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.

Example

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

try {
    $apiInstance->kvStoreDelete($options);
} catch (Exception $e) {
    echo 'Exception when calling KvStoreApi->kvStoreDelete: ', $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]

kvStoreGet()

kvStoreGet($options): \Fastly\Model\KvStoreDetails // Describe a KV store.

Get details of a KV store.

Example

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

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\KvStoreDetails

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

kvStoreList()

kvStoreList($options): \Fastly\Model\InlineResponse20010 // List all KV stores.

List all KV stores.

Example

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

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]
name string Returns a one-element array containing the details for the named KV store. [optional]

Return type

\Fastly\Model\InlineResponse20010

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

kvStorePut()

kvStorePut($options) // Update a KV store.

Update the name of a KV store.

Example

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

Options

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]

Return type

void (empty response body)

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