Skip to content

Latest commit

 

History

History
172 lines (125 loc) · 3.62 KB

KvStoreApi.md

File metadata and controls

172 lines (125 loc) · 3.62 KB

Fastly::KvStoreApi

require 'fastly'
api_instance = Fastly::KvStoreApi.new

Methods

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

create_store(opts): <StoreResponse> # Create a KV store.

Create a new KV store.

Examples

api_instance = Fastly::KvStoreApi.new
opts = {
    location: 'location_example', # String | 
    store: Fastly::Store.new, # Store | 
}

begin
  # Create a KV store.
  result = api_instance.create_store(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling KvStoreApi->create_store: #{e}"
end

Options

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

Return type

StoreResponse

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

delete_store()

delete_store(opts) # 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).

Examples

api_instance = Fastly::KvStoreApi.new
opts = {
    store_id: 'store_id_example', # String | 
}

begin
  # Delete a KV store.
  api_instance.delete_store(opts)
rescue Fastly::ApiError => e
  puts "Error when calling KvStoreApi->delete_store: #{e}"
end

Options

Name Type Description Notes
store_id String

Return type

nil (empty response body)

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

get_store()

get_store(opts): <StoreResponse> # Describe a KV store.

Get a KV store by ID.

Examples

api_instance = Fastly::KvStoreApi.new
opts = {
    store_id: 'store_id_example', # String | 
}

begin
  # Describe a KV store.
  result = api_instance.get_store(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling KvStoreApi->get_store: #{e}"
end

Options

Name Type Description Notes
store_id String

Return type

StoreResponse

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

get_stores()

get_stores(opts): <InlineResponse2003> # List KV stores.

Get all stores for a given customer.

Examples

api_instance = Fastly::KvStoreApi.new
opts = {
    cursor: 'cursor_example', # String | 
    limit: 56, # Integer | 
}

begin
  # List KV stores.
  result = api_instance.get_stores(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling KvStoreApi->get_stores: #{e}"
end

Options

Name Type Description Notes
cursor String [optional]
limit Integer [optional][default to 1000]

Return type

InlineResponse2003

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