require 'fastly'
api_instance = Fastly::ProductDdosProtectionApi.newNote
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| disable_product_ddos_protection | DELETE /enabled-products/v1/ddos_protection/services/{service_id} | Disable product |
| enable_product_ddos_protection | PUT /enabled-products/v1/ddos_protection/services/{service_id} | Enable product |
| get_product_ddos_protection | GET /enabled-products/v1/ddos_protection/services/{service_id} | Get product enablement status |
| get_product_ddos_protection_configuration | GET /enabled-products/v1/ddos_protection/services/{service_id}/configuration | Get configuration |
| get_services_product_ddos_protection | GET /enabled-products/v1/ddos_protection/services | Get services with product enabled |
| set_product_ddos_protection_configuration | PATCH /enabled-products/v1/ddos_protection/services/{service_id}/configuration | Update configuration |
disable_product_ddos_protection(opts) # Disable productDisable the DDoS Protection product on a service.
api_instance = Fastly::ProductDdosProtectionApi.new
opts = {
service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
}
begin
# Disable product
api_instance.disable_product_ddos_protection(opts)
rescue Fastly::ApiError => e
puts "Error when calling ProductDdosProtectionApi->disable_product_ddos_protection: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| service_id | String | Alphanumeric string identifying the service. |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
enable_product_ddos_protection(opts): <DdosProtectionResponseEnable> # Enable productEnable the DDoS Protection product on a service in default 'log' mode unless otherwise specified in the request body.
api_instance = Fastly::ProductDdosProtectionApi.new
opts = {
service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
ddos_protection_request_enable_mode: Fastly::DdosProtectionRequestEnableMode.new, # DdosProtectionRequestEnableMode |
}
begin
# Enable product
result = api_instance.enable_product_ddos_protection(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling ProductDdosProtectionApi->enable_product_ddos_protection: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| service_id | String | Alphanumeric string identifying the service. | |
| ddos_protection_request_enable_mode | DdosProtectionRequestEnableMode | [optional] |
[Back to top] [Back to API list] [Back to README]
get_product_ddos_protection(opts): <DdosProtectionResponseEnable> # Get product enablement statusGet the enablement status of the DDoS Protection product on a service.
api_instance = Fastly::ProductDdosProtectionApi.new
opts = {
service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
}
begin
# Get product enablement status
result = api_instance.get_product_ddos_protection(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling ProductDdosProtectionApi->get_product_ddos_protection: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| service_id | String | Alphanumeric string identifying the service. |
[Back to top] [Back to API list] [Back to README]
get_product_ddos_protection_configuration(opts): <DdosProtectionResponseConfigure> # Get configurationGet configuration of the DDoS Protection product on a service.
api_instance = Fastly::ProductDdosProtectionApi.new
opts = {
service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
}
begin
# Get configuration
result = api_instance.get_product_ddos_protection_configuration(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling ProductDdosProtectionApi->get_product_ddos_protection_configuration: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| service_id | String | Alphanumeric string identifying the service. |
DdosProtectionResponseConfigure
[Back to top] [Back to API list] [Back to README]
get_services_product_ddos_protection: <DdosProtectionResponseBodyGetAllServices> # Get services with product enabledGet all the services which have the DDoS Protection product enabled.
api_instance = Fastly::ProductDdosProtectionApi.new
begin
# Get services with product enabled
result = api_instance.get_services_product_ddos_protection
p result
rescue Fastly::ApiError => e
puts "Error when calling ProductDdosProtectionApi->get_services_product_ddos_protection: #{e}"
endThis endpoint does not need any parameter.
DdosProtectionResponseBodyGetAllServices
[Back to top] [Back to API list] [Back to README]
set_product_ddos_protection_configuration(opts): <DdosProtectionResponseConfigure> # Update configurationUpdate configuration of the DDoS Protection product on a service.
api_instance = Fastly::ProductDdosProtectionApi.new
opts = {
service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
ddos_protection_request_update_configuration: Fastly::DdosProtectionRequestUpdateConfiguration.new({mode: 'false'}), # DdosProtectionRequestUpdateConfiguration |
}
begin
# Update configuration
result = api_instance.set_product_ddos_protection_configuration(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling ProductDdosProtectionApi->set_product_ddos_protection_configuration: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| service_id | String | Alphanumeric string identifying the service. | |
| ddos_protection_request_update_configuration | DdosProtectionRequestUpdateConfiguration | [optional] |