WebService::Fastly::KvStoreApi

Load the API package

use WebService::Fastly::Object::KvStoreApi;

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

Method | HTTP request | Description ------------- | ------------- | ------------- create_store | POST /resources/stores/kv | Create an kv store. delete_store | DELETE /resources/stores/kv/{store_id} | Delete an kv store. get_store | GET /resources/stores/kv/{store_id} | Describe an kv store. get_stores | GET /resources/stores/kv | List kv stores.

create_store

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

Create an 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

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

delete_store

delete_store(store_id => $store_id)

Delete an kv store.

An kv store must be empty before it can be deleted. Deleting an 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

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

get_store

StoreResponse get_store(store_id => $store_id)

Describe an kv store.

Get an 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

[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 = 100; # 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 100]

Return type

InlineResponse2003

Authorization

token

HTTP request headers

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