require 'fastly'
api_instance = Fastly::DmRoutingConfigsApi.newNote
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| activate_dm_routing_config_draft | POST /domain-management/v1/routing-configs/{config_id}/activate | Activate the draft |
| create_dm_routing_config | POST /domain-management/v1/routing-configs | Create a routing config |
| create_dm_routing_config_path | POST /domain-management/v1/routing-configs/{config_id}/paths | Create a path |
| create_dm_routing_config_rule | POST /domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules | Create a rule |
| deactivate_dm_routing_config | POST /domain-management/v1/routing-configs/{config_id}/deactivate | Deactivate a routing config |
| delete_dm_routing_config | DELETE /domain-management/v1/routing-configs/{config_id} | Delete a routing config |
| delete_dm_routing_config_inactive_versions | DELETE /domain-management/v1/routing-configs/{config_id}/versions/inactive | Delete inactive versions |
| delete_dm_routing_config_path | DELETE /domain-management/v1/routing-configs/{config_id}/paths/{path_id} | Delete a path |
| delete_dm_routing_config_rule | DELETE /domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id} | Delete a rule |
| discard_dm_routing_config_draft | DELETE /domain-management/v1/routing-configs/{config_id}/draft | Discard the draft |
| get_dm_routing_config | GET /domain-management/v1/routing-configs/{config_id} | Get a routing config |
| get_dm_routing_config_draft_diff | GET /domain-management/v1/routing-configs/{config_id}/draft/diff | Get the draft diff |
| get_dm_routing_config_path | GET /domain-management/v1/routing-configs/{config_id}/paths/{path_id} | Get a path |
| get_dm_routing_config_rule | GET /domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id} | Get a rule |
| list_dm_routing_config_paths | GET /domain-management/v1/routing-configs/{config_id}/paths | List paths |
| list_dm_routing_config_rules | GET /domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules | List rules |
| list_dm_routing_config_versions | GET /domain-management/v1/routing-configs/{config_id}/versions | List versions |
| list_dm_routing_configs | GET /domain-management/v1/routing-configs | List routing configs |
| reactivate_dm_routing_config_version | POST /domain-management/v1/routing-configs/{config_id}/versions/{version_id}/activate | Reactivate a version |
| update_dm_routing_config_draft | PATCH /domain-management/v1/routing-configs/{config_id}/draft | Update the draft |
| update_dm_routing_config_path | PATCH /domain-management/v1/routing-configs/{config_id}/paths/{path_id} | Update a path |
| update_dm_routing_config_rule | PATCH /domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id} | Update a rule |
activate_dm_routing_config_draft(opts): <RoutingConfigVersionResponse> # Activate the draftActivate the current draft version. The previously active version, if any, becomes inactive but is retained in version history.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
}
begin
# Activate the draft
result = api_instance.activate_dm_routing_config_draft(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->activate_dm_routing_config_draft: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String |
[Back to top] [Back to API list] [Back to README]
create_dm_routing_config(opts): <RoutingConfigResponse> # Create a routing configCreate a new routing config. An optional initial_version may be provided to seed the config with paths and rules in a single request, and may also be activated immediately.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
routing_config: Fastly::RoutingConfig.new({name: 'name_example'}), # RoutingConfig |
}
begin
# Create a routing config
result = api_instance.create_dm_routing_config(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->create_dm_routing_config: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| routing_config | RoutingConfig | [optional] |
[Back to top] [Back to API list] [Back to README]
create_dm_routing_config_path(opts): <PathResponse> # Create a pathAdd a new path to the config's draft version. If no draft exists, one is created automatically by cloning the active version.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_create: Fastly::PathCreate.new({path: 'path_example'}), # PathCreate |
}
begin
# Create a path
result = api_instance.create_dm_routing_config_path(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->create_dm_routing_config_path: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_create | PathCreate | [optional] |
[Back to top] [Back to API list] [Back to README]
create_dm_routing_config_rule(opts): <RuleResponse> # Create a ruleAdd a new rule to a path on the config's draft version. If no draft exists, one is created automatically by cloning the active version. A rule with an empty conditions array is a default (catch-all) rule and there can be at most one default rule per path.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_id: 'path_id_example', # String |
rule_create: Fastly::RuleCreate.new({action: Fastly::Action.new({type: Fastly::ActionType::action_type_service, value: 'value_example'}), conditions: [Fastly::RoutingConfigCondition.new({type: Fastly::ConditionType::condition_type_header, operator: Fastly::ConditionOperator::condition_operator_equals, value: 'value_example'})]}), # RuleCreate |
}
begin
# Create a rule
result = api_instance.create_dm_routing_config_rule(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->create_dm_routing_config_rule: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_id | String | ||
| rule_create | RuleCreate | [optional] |
[Back to top] [Back to API list] [Back to README]
deactivate_dm_routing_config(opts): <RoutingConfigResponse> # Deactivate a routing configClear the active version designation. This is a bookkeeping operation only — it does not stop edge traffic. Minerva continues serving the last-activated version until the domain association is removed in Spotless. Only removing the routing config from the domain (via Spotless) triggers Neptune to drop the reference, which causes Minerva to stop fetching and eventually clean up the cached config. Idempotent: returns 200 even if already deactivated.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
}
begin
# Deactivate a routing config
result = api_instance.deactivate_dm_routing_config(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->deactivate_dm_routing_config: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String |
[Back to top] [Back to API list] [Back to README]
delete_dm_routing_config(opts) # Delete a routing configDelete a routing config. By default, configs that have an active version cannot be deleted. Pass force=true to bypass the active-version check — this is destructive and will immediately stop traffic routing for any paths the config serves. The force parameter does not bypass the domain-association check; if domains are still associated, deletion is rejected with 409 regardless of force.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
force: true, # Boolean | When `true`, allows deleting a routing config that has an active version. This is destructive — traffic routing for any paths served by the config will stop immediately.
}
begin
# Delete a routing config
api_instance.delete_dm_routing_config(opts)
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->delete_dm_routing_config: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| force | Boolean | When true, allows deleting a routing config that has an active version. This is destructive — traffic routing for any paths served by the config will stop immediately. |
[optional][default to false] |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
delete_dm_routing_config_inactive_versions(opts) # Delete inactive versionsDelete all inactive versions for a routing config. The currently active version, if any, is retained.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
}
begin
# Delete inactive versions
api_instance.delete_dm_routing_config_inactive_versions(opts)
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->delete_dm_routing_config_inactive_versions: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
delete_dm_routing_config_path(opts) # Delete a pathDelete a path from the config's draft version. If no draft exists, one is created automatically by cloning the active version.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_id: 'path_id_example', # String |
}
begin
# Delete a path
api_instance.delete_dm_routing_config_path(opts)
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->delete_dm_routing_config_path: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_id | String |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
delete_dm_routing_config_rule(opts) # Delete a ruleDelete a rule from the config's draft version. If no draft exists, one is created automatically by cloning the active version.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_id: 'path_id_example', # String |
rule_id: 'rule_id_example', # String |
}
begin
# Delete a rule
api_instance.delete_dm_routing_config_rule(opts)
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->delete_dm_routing_config_rule: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_id | String | ||
| rule_id | String |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
discard_dm_routing_config_draft(opts) # Discard the draftDelete the current draft version, reverting any unactivated changes.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
}
begin
# Discard the draft
api_instance.discard_dm_routing_config_draft(opts)
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->discard_dm_routing_config_draft: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
get_dm_routing_config(opts): <RoutingConfigResponse> # Get a routing configRetrieve a single routing config by its identifier.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
}
begin
# Get a routing config
result = api_instance.get_dm_routing_config(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->get_dm_routing_config: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String |
[Back to top] [Back to API list] [Back to README]
get_dm_routing_config_draft_diff(opts): <DraftDiff> # Get the draft diffCompare the current draft version against the active version and return the paths and rules that have been added, modified, or deleted.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
}
begin
# Get the draft diff
result = api_instance.get_dm_routing_config_draft_diff(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->get_dm_routing_config_draft_diff: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String |
[Back to top] [Back to API list] [Back to README]
get_dm_routing_config_path(opts): <PathResponse> # Get a pathRetrieve a single path by its stable identifier.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_id: 'path_id_example', # String |
}
begin
# Get a path
result = api_instance.get_dm_routing_config_path(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->get_dm_routing_config_path: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_id | String |
[Back to top] [Back to API list] [Back to README]
get_dm_routing_config_rule(opts): <RuleResponse> # Get a ruleRetrieve a single rule by its stable identifier.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_id: 'path_id_example', # String |
rule_id: 'rule_id_example', # String |
}
begin
# Get a rule
result = api_instance.get_dm_routing_config_rule(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->get_dm_routing_config_rule: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_id | String | ||
| rule_id | String |
[Back to top] [Back to API list] [Back to README]
list_dm_routing_config_paths(opts): <PathsResponse> # List pathsList paths for the config. Returns paths from the active version if one exists, otherwise from the draft.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path: 'path_example', # String | Filter results by path pattern. The match strategy is controlled by the `match` parameter.
match: 'exact', # String | How to match the value of the `path` filter against existing path patterns. Has no effect unless `path` is also provided.
sort: 'created_at', # String | The order in which to list the results.
cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
limit: 56, # Integer | Limit how many results are returned.
}
begin
# List paths
result = api_instance.list_dm_routing_config_paths(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->list_dm_routing_config_paths: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path | String | Filter results by path pattern. The match strategy is controlled by the match parameter. |
[optional] |
| match | String | How to match the value of the path filter against existing path patterns. Has no effect unless path is also provided. |
[optional][default to 'exact'] |
| sort | String | The order in which to list the results. | [optional][default to '-created_at'] |
| cursor | String | Cursor value from the next_cursor field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
[optional] |
| limit | Integer | Limit how many results are returned. | [optional][default to 20] |
[Back to top] [Back to API list] [Back to README]
list_dm_routing_config_rules(opts): <RulesResponse> # List rulesList all rules for a path in evaluation order.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_id: 'path_id_example', # String |
sort: 'created_at', # String | The order in which to list the results.
cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
limit: 56, # Integer | Limit how many results are returned.
}
begin
# List rules
result = api_instance.list_dm_routing_config_rules(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->list_dm_routing_config_rules: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_id | String | ||
| sort | String | The order in which to list the results. | [optional][default to 'position'] |
| cursor | String | Cursor value from the next_cursor field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
[optional] |
| limit | Integer | Limit how many results are returned. | [optional][default to 20] |
[Back to top] [Back to API list] [Back to README]
list_dm_routing_config_versions(opts): <VersionsResponse> # List versionsList all versions for a routing config.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
sort: 'activated_at', # String | The order in which to list the results.
cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
limit: 56, # Integer | Limit how many results are returned.
}
begin
# List versions
result = api_instance.list_dm_routing_config_versions(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->list_dm_routing_config_versions: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| sort | String | The order in which to list the results. | [optional][default to '-activated_at'] |
| cursor | String | Cursor value from the next_cursor field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
[optional] |
| limit | Integer | Limit how many results are returned. | [optional][default to 20] |
[Back to top] [Back to API list] [Back to README]
list_dm_routing_configs(opts): <RoutingConfigsResponse> # List routing configsList all routing configs for the authenticated customer.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
state: ['draft-only'], # Array<String> | Filter configs by lifecycle state. Accepts a comma-separated list of state values (e.g. `?state=active,active-with-draft`). Returns only configs whose current state matches one of the provided values. Returns 400 if any value is not a recognised state.
sort: 'created_at', # String | The order in which to list the results.
cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
limit: 56, # Integer | Limit how many results are returned.
}
begin
# List routing configs
result = api_instance.list_dm_routing_configs(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->list_dm_routing_configs: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| state | Array<String> | Filter configs by lifecycle state. Accepts a comma-separated list of state values (e.g. ?state=active,active-with-draft). Returns only configs whose current state matches one of the provided values. Returns 400 if any value is not a recognised state. |
[optional] |
| sort | String | The order in which to list the results. | [optional][default to '-created_at'] |
| cursor | String | Cursor value from the next_cursor field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
[optional] |
| limit | Integer | Limit how many results are returned. | [optional][default to 20] |
[Back to top] [Back to API list] [Back to README]
reactivate_dm_routing_config_version(opts): <RoutingConfigVersionResponse> # Reactivate a versionReactivate a previously-active version. The currently active version, if any, becomes inactive but is retained in version history.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
version_id: 'version_id_example', # String |
}
begin
# Reactivate a version
result = api_instance.reactivate_dm_routing_config_version(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->reactivate_dm_routing_config_version: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| version_id | String |
[Back to top] [Back to API list] [Back to README]
update_dm_routing_config_draft(opts): <RoutingConfigVersionResponse> # Update the draftUpdate metadata on the draft version, such as its comment. If no draft exists, one is created automatically by cloning the active version.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
draft_update: Fastly::DraftUpdate.new, # DraftUpdate |
}
begin
# Update the draft
result = api_instance.update_dm_routing_config_draft(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->update_dm_routing_config_draft: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| draft_update | DraftUpdate | [optional] |
[Back to top] [Back to API list] [Back to README]
update_dm_routing_config_path(opts): <PathResponse> # Update a pathUpdate a path on the config's draft version. If no draft exists, one is created automatically by cloning the active version.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_id: 'path_id_example', # String |
path_update: Fastly::PathUpdate.new, # PathUpdate |
}
begin
# Update a path
result = api_instance.update_dm_routing_config_path(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->update_dm_routing_config_path: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_id | String | ||
| path_update | PathUpdate | [optional] |
[Back to top] [Back to API list] [Back to README]
update_dm_routing_config_rule(opts): <RuleResponse> # Update a ruleUpdate a rule on the config's draft version. If no draft exists, one is created automatically by cloning the active version.
api_instance = Fastly::DmRoutingConfigsApi.new
opts = {
config_id: 'config_id_example', # String |
path_id: 'path_id_example', # String |
rule_id: 'rule_id_example', # String |
rule_update: Fastly::RuleUpdate.new, # RuleUpdate |
}
begin
# Update a rule
result = api_instance.update_dm_routing_config_rule(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmRoutingConfigsApi->update_dm_routing_config_rule: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| config_id | String | ||
| path_id | String | ||
| rule_id | String | ||
| rule_update | RuleUpdate | [optional] |