require 'fastly'
api_instance = Fastly::ProductDdosProtectionApi.new
Note
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 |
set_product_ddos_protection_configuration | PATCH /enabled-products/v1/ddos_protection/services/{service_id}/configuration | Update configuration |
disable_product_ddos_protection(opts) # Disable product
Disable 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 product
Enable 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
# 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. |
[Back to top] [Back to API list] [Back to README]
get_product_ddos_protection(opts): <DdosProtectionResponseEnable> # Get product enablement status
Get 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 configuration
Get 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]
set_product_ddos_protection_configuration(opts): <DdosProtectionResponseConfigure> # Update configuration
Update 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] |