const apiInstance = new Fastly.DirectorBackendApi();
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
createDirectorBackend | POST /service/{service_id}/version/{version_id}/director/{director_name}/backend/{backend_name} | Create a director-backend relationship |
deleteDirectorBackend | DELETE /service/{service_id}/version/{version_id}/director/{director_name}/backend/{backend_name} | Delete a director-backend relationship |
getDirectorBackend | GET /service/{service_id}/version/{version_id}/director/{director_name}/backend/{backend_name} | Get a director-backend relationship |
createDirectorBackend({ director_name, service_id, version_id, backend_name })
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.
const options = {
director_name: "director_name_example", // required
service_id: "service_id_example", // required
version_id: 56, // required
backend_name: "backend_name_example", // required
};
apiInstance.createDirectorBackend(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
director_name | String | Name for the Director. | |
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
backend_name | String | The name of the backend. |
deleteDirectorBackend({ director_name, service_id, version_id, backend_name })
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.
const options = {
director_name: "director_name_example", // required
service_id: "service_id_example", // required
version_id: 56, // required
backend_name: "backend_name_example", // required
};
apiInstance.deleteDirectorBackend(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
director_name | String | Name for the Director. | |
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
backend_name | String | The name of the backend. |
getDirectorBackend({ director_name, service_id, version_id, backend_name })
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.
const options = {
director_name: "director_name_example", // required
service_id: "service_id_example", // required
version_id: 56, // required
backend_name: "backend_name_example", // required
};
apiInstance.getDirectorBackend(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
director_name | String | Name for the Director. | |
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
backend_name | String | The name of the backend. |