require 'fastly'
api_instance = Fastly::DictionaryApi.new
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 a dictionary |
delete_dictionary | DELETE /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Delete a dictionary |
get_dictionary | GET /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Get a dictionary |
list_dictionaries | GET /service/{service_id}/version/{version_id}/dictionary | List dictionaries |
update_dictionary | PUT /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Update a dictionary |
create_dictionary(opts): <DictionaryResponse> # Create a dictionary
Create named dictionary for a particular service and version.
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 a dictionary
result = api_instance.create_dictionary(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DictionaryApi->create_dictionary: #{e}"
end
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] |
[Back to top] [Back to API list] [Back to README]
delete_dictionary(opts): <InlineResponse200> # Delete a dictionary
Delete named dictionary for a particular service and version.
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 a dictionary
result = api_instance.delete_dictionary(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DictionaryApi->delete_dictionary: #{e}"
end
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). |
[Back to top] [Back to API list] [Back to README]
get_dictionary(opts): <DictionaryResponse> # Get a dictionary
Retrieve a single dictionary by name for the version and service.
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 a dictionary
result = api_instance.get_dictionary(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DictionaryApi->get_dictionary: #{e}"
end
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). |
[Back to top] [Back to API list] [Back to README]
list_dictionaries(opts): <Array<DictionaryResponse>> # List dictionaries
List all dictionaries for the version of the service.
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 dictionaries
result = api_instance.list_dictionaries(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DictionaryApi->list_dictionaries: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Integer | Integer identifying a service version. |
[Back to top] [Back to API list] [Back to README]
update_dictionary(opts): <DictionaryResponse> # Update a dictionary
Update named dictionary for a particular service and version.
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 a dictionary
result = api_instance.update_dictionary(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DictionaryApi->update_dictionary: #{e}"
end
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] |