Skip to content

Latest commit

 

History

History
231 lines (174 loc) · 8.32 KB

DictionaryApi.md

File metadata and controls

231 lines (174 loc) · 8.32 KB

Fastly::DictionaryApi

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

Methods

Note

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

Method HTTP request Description
create_dictionary POST /service/{service_id}/version/{version_id}/dictionary Create an edge dictionary
delete_dictionary DELETE /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} Delete an edge dictionary
get_dictionary GET /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} Get an edge dictionary
list_dictionaries GET /service/{service_id}/version/{version_id}/dictionary List edge dictionaries
update_dictionary PUT /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} Update an edge dictionary

create_dictionary()

create_dictionary(opts): <DictionaryResponse> # Create an edge dictionary

Create named dictionary for a particular service and version.

Examples

api_instance = Fastly::DictionaryApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    name: 'name_example', # String | Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace).
    write_only: true, # Boolean | Determines if items in the dictionary are readable or not.
}

begin
  # Create an edge dictionary
  result = api_instance.create_dictionary(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling DictionaryApi->create_dictionary: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
name String Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace). [optional]
write_only Boolean Determines if items in the dictionary are readable or not. [optional][default to false]

Return type

DictionaryResponse

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

delete_dictionary()

delete_dictionary(opts): <InlineResponse200> # Delete an edge dictionary

Delete named dictionary for a particular service and version.

Examples

api_instance = Fastly::DictionaryApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    dictionary_name: 'dictionary_name_example', # String | Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace).
}

begin
  # Delete an edge dictionary
  result = api_instance.delete_dictionary(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling DictionaryApi->delete_dictionary: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
dictionary_name String Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace).

Return type

InlineResponse200

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

get_dictionary()

get_dictionary(opts): <DictionaryResponse> # Get an edge dictionary

Retrieve a single dictionary by name for the version and service.

Examples

api_instance = Fastly::DictionaryApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    dictionary_name: 'dictionary_name_example', # String | Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace).
}

begin
  # Get an edge dictionary
  result = api_instance.get_dictionary(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling DictionaryApi->get_dictionary: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
dictionary_name String Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace).

Return type

DictionaryResponse

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

list_dictionaries()

list_dictionaries(opts): <Array<DictionaryResponse>> # List edge dictionaries

List all dictionaries for the version of the service.

Examples

api_instance = Fastly::DictionaryApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
}

begin
  # List edge dictionaries
  result = api_instance.list_dictionaries(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling DictionaryApi->list_dictionaries: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.

Return type

Array<DictionaryResponse>

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

update_dictionary()

update_dictionary(opts): <DictionaryResponse> # Update an edge dictionary

Update named dictionary for a particular service and version.

Examples

api_instance = Fastly::DictionaryApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    dictionary_name: 'dictionary_name_example', # String | Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace).
    name: 'name_example', # String | Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace).
    write_only: true, # Boolean | Determines if items in the dictionary are readable or not.
}

begin
  # Update an edge dictionary
  result = api_instance.update_dictionary(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling DictionaryApi->update_dictionary: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
dictionary_name String Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace).
name String Name for the Dictionary (must start with an alphabetic character and can contain only alphanumeric characters, underscores, and whitespace). [optional]
write_only Boolean Determines if items in the dictionary are readable or not. [optional][default to false]

Return type

DictionaryResponse

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