use WebService::Fastly::Object::KvStoreApi;
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
create_store | POST /resources/stores/kv | Create a KV store. |
delete_store | DELETE /resources/stores/kv/{store_id} | Delete a KV store. |
get_store | GET /resources/stores/kv/{store_id} | Describe a KV store. |
get_stores | GET /resources/stores/kv | List KV stores. |
StoreResponse create_store(location => $location, store => $store)
Create a KV store.
Create a new KV store.
use Data::Dumper;
use WebService::Fastly::KvStoreApi;
my $api_instance = WebService::Fastly::KvStoreApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $location = "location_example"; # string |
my $store = WebService::Fastly::Object::Store->new(); # Store |
eval {
my $result = $api_instance->create_store(location => $location, store => $store);
print Dumper($result);
};
if ($@) {
warn "Exception when calling KvStoreApi->create_store: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
location | string | [optional] | |
store | Store | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_store(store_id => $store_id)
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).
use Data::Dumper;
use WebService::Fastly::KvStoreApi;
my $api_instance = WebService::Fastly::KvStoreApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $store_id = "store_id_example"; # string |
eval {
$api_instance->delete_store(store_id => $store_id);
};
if ($@) {
warn "Exception when calling KvStoreApi->delete_store: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
store_id | string |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StoreResponse get_store(store_id => $store_id)
Describe a KV store.
Get a KV store by ID.
use Data::Dumper;
use WebService::Fastly::KvStoreApi;
my $api_instance = WebService::Fastly::KvStoreApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $store_id = "store_id_example"; # string |
eval {
my $result = $api_instance->get_store(store_id => $store_id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling KvStoreApi->get_store: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
store_id | string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2003 get_stores(cursor => $cursor, limit => $limit)
List KV stores.
Get all stores for a given customer.
use Data::Dumper;
use WebService::Fastly::KvStoreApi;
my $api_instance = WebService::Fastly::KvStoreApi->new(
# Configure API key authorization: token
api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'Fastly-Key' => 'Bearer'},
);
my $cursor = "cursor_example"; # string |
my $limit = 1000; # int |
eval {
my $result = $api_instance->get_stores(cursor => $cursor, limit => $limit);
print Dumper($result);
};
if ($@) {
warn "Exception when calling KvStoreApi->get_stores: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
cursor | string | [optional] | |
limit | int | [optional] [default to 1000] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]