require 'fastly'
api_instance = Fastly::DmDomainsApi.newNote
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| create_dm_domain | POST /domain-management/v1/domains | Create a domain |
| delete_dm_domain | DELETE /domain-management/v1/domains/{domain_id} | Delete a domain |
| get_dm_domain | GET /domain-management/v1/domains/{domain_id} | Get a domain |
| list_dm_domains | GET /domain-management/v1/domains | List domains |
| update_dm_domain | PATCH /domain-management/v1/domains/{domain_id} | Update a domain |
create_dm_domain(opts): <SuccessfulResponseAsObject> # Create a domainCreate a domain
api_instance = Fastly::DmDomainsApi.new
opts = {
request_body_for_create: Fastly::RequestBodyForCreate.new({fqdn: 'fqdn_example'}), # RequestBodyForCreate |
}
begin
# Create a domain
result = api_instance.create_dm_domain(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmDomainsApi->create_dm_domain: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| request_body_for_create | RequestBodyForCreate | [optional] |
[Back to top] [Back to API list] [Back to README]
delete_dm_domain(opts) # Delete a domainDelete a domain
api_instance = Fastly::DmDomainsApi.new
opts = {
domain_id: 'domain_id_example', # String |
}
begin
# Delete a domain
api_instance.delete_dm_domain(opts)
rescue Fastly::ApiError => e
puts "Error when calling DmDomainsApi->delete_dm_domain: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| domain_id | String |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
get_dm_domain(opts): <SuccessfulResponseAsObject> # Get a domainShow a domain
api_instance = Fastly::DmDomainsApi.new
opts = {
domain_id: 'domain_id_example', # String |
}
begin
# Get a domain
result = api_instance.get_dm_domain(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmDomainsApi->get_dm_domain: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| domain_id | String |
[Back to top] [Back to API list] [Back to README]
list_dm_domains(opts): <InlineResponse2007> # List domainsList all domains
api_instance = Fastly::DmDomainsApi.new
opts = {
fqdn: 'fqdn_example', # String |
fqdn_match: 'contains', # String | (Optional) Filter fully-qualified domain name (FQDN) specifically by match type. If used, requires filtering by FQDN.
service_id: 'service_id_example', # String | Filter results based on a service_id.
sort: 'fqdn', # String | The order in which to list the results.
activated: true, # Boolean |
verified: true, # Boolean |
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 domains
result = api_instance.list_dm_domains(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmDomainsApi->list_dm_domains: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| fqdn | String | [optional] | |
| fqdn_match | String | (Optional) Filter fully-qualified domain name (FQDN) specifically by match type. If used, requires filtering by FQDN. | [optional][default to 'contains'] |
| service_id | String | Filter results based on a service_id. | [optional] |
| sort | String | The order in which to list the results. | [optional][default to 'fqdn'] |
| activated | Boolean | [optional] | |
| verified | Boolean | [optional] | |
| 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]
update_dm_domain(opts): <SuccessfulResponseAsObject> # Update a domainUpdate a domain
api_instance = Fastly::DmDomainsApi.new
opts = {
domain_id: 'domain_id_example', # String |
request_body_for_update: Fastly::RequestBodyForUpdate.new, # RequestBodyForUpdate |
}
begin
# Update a domain
result = api_instance.update_dm_domain(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling DmDomainsApi->update_dm_domain: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| domain_id | String | ||
| request_body_for_update | RequestBodyForUpdate | [optional] |