Skip to content

Latest commit

 

History

History
225 lines (156 loc) · 5.78 KB

KvStoreApi.md

File metadata and controls

225 lines (156 loc) · 5.78 KB

WebService::Fastly::KvStoreApi

Load the API package

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.

create_store

StoreResponse create_store(location => $location, store => $store)

Create a KV store.

Create a new KV store.

Example

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

Parameters

Name Type Description Notes
location string [optional]
store Store [optional]

Return type

StoreResponse

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

delete_store

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).

Example

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

Parameters

Name Type Description Notes
store_id string

Return type

void (empty response body)

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

get_store

StoreResponse get_store(store_id => $store_id)

Describe a KV store.

Get a KV store by ID.

Example

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

Parameters

Name Type Description Notes
store_id string

Return type

StoreResponse

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

get_stores

InlineResponse2003 get_stores(cursor => $cursor, limit => $limit)

List KV stores.

Get all stores for a given customer.

Example

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

Parameters

Name Type Description Notes
cursor string [optional]
limit int [optional] [default to 1000]

Return type

InlineResponse2003

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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