Skip to content

Latest commit

 

History

History
149 lines (112 loc) · 5.22 KB

DirectorBackendApi.md

File metadata and controls

149 lines (112 loc) · 5.22 KB

Fastly::DirectorBackendApi

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

Methods

Note

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

Method HTTP request Description
create_director_backend POST /service/{service_id}/version/{version_id}/director/{director_name}/backend/{backend_name} Create a director-backend relationship
delete_director_backend DELETE /service/{service_id}/version/{version_id}/director/{director_name}/backend/{backend_name} Delete a director-backend relationship
get_director_backend GET /service/{service_id}/version/{version_id}/director/{director_name}/backend/{backend_name} Get a director-backend relationship

create_director_backend()

create_director_backend(opts): <DirectorBackend> # Create a director-backend relationship

Establishes a relationship between a Backend and a Director. The Backend is then considered a member of the Director and can be used to balance traffic onto.

Examples

api_instance = Fastly::DirectorBackendApi.new
opts = {
    director_name: 'director_name_example', # String | Name for the Director.
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    backend_name: 'backend_name_example', # String | The name of the backend.
}

begin
  # Create a director-backend relationship
  result = api_instance.create_director_backend(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling DirectorBackendApi->create_director_backend: #{e}"
end

Options

Name Type Description Notes
director_name String Name for the Director.
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
backend_name String The name of the backend.

Return type

DirectorBackend

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

delete_director_backend()

delete_director_backend(opts): <InlineResponse200> # Delete a director-backend relationship

Deletes the relationship between a Backend and a Director. The Backend is no longer considered a member of the Director and thus will not have traffic balanced onto it from this Director.

Examples

api_instance = Fastly::DirectorBackendApi.new
opts = {
    director_name: 'director_name_example', # String | Name for the Director.
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    backend_name: 'backend_name_example', # String | The name of the backend.
}

begin
  # Delete a director-backend relationship
  result = api_instance.delete_director_backend(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling DirectorBackendApi->delete_director_backend: #{e}"
end

Options

Name Type Description Notes
director_name String Name for the Director.
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
backend_name String The name of the backend.

Return type

InlineResponse200

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

get_director_backend()

get_director_backend(opts): <DirectorBackend> # Get a director-backend relationship

Returns the relationship between a Backend and a Director. If the Backend has been associated with the Director, it returns a simple record indicating this. Otherwise, returns a 404.

Examples

api_instance = Fastly::DirectorBackendApi.new
opts = {
    director_name: 'director_name_example', # String | Name for the Director.
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    backend_name: 'backend_name_example', # String | The name of the backend.
}

begin
  # Get a director-backend relationship
  result = api_instance.get_director_backend(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling DirectorBackendApi->get_director_backend: #{e}"
end

Options

Name Type Description Notes
director_name String Name for the Director.
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
backend_name String The name of the backend.

Return type

DirectorBackend

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