Skip to content

Latest commit

 

History

History
198 lines (138 loc) · 5.08 KB

ProductDdosProtectionApi.md

File metadata and controls

198 lines (138 loc) · 5.08 KB

Fastly.ProductDdosProtectionApi

const apiInstance = new Fastly.ProductDdosProtectionApi();

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
disableProductDdosProtection DELETE /enabled-products/v1/ddos_protection/services/{service_id} Disable product
enableProductDdosProtection PUT /enabled-products/v1/ddos_protection/services/{service_id} Enable product
getProductDdosProtection GET /enabled-products/v1/ddos_protection/services/{service_id} Get product enablement status
getProductDdosProtectionConfiguration GET /enabled-products/v1/ddos_protection/services/{service_id}/configuration Get configuration
setProductDdosProtectionConfiguration PATCH /enabled-products/v1/ddos_protection/services/{service_id}/configuration Update configuration

disableProductDdosProtection

disableProductDdosProtection({ service_id })

Disable the DDoS Protection product on a service.

Example

const options = {
  service_id: "service_id_example", // required
};

apiInstance.disableProductDdosProtection(options)
  .then(() => {
    console.log('API called successfully.');
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.

Return type

null (empty response body)

enableProductDdosProtection

enableProductDdosProtection({ service_id })

Enable the DDoS Protection product on a service.

Example

const options = {
  service_id: "service_id_example", // required
};

apiInstance.enableProductDdosProtection(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.

Return type

DdosProtectionResponseEnable

getProductDdosProtection

getProductDdosProtection({ service_id })

Get the enablement status of the DDoS Protection product on a service.

Example

const options = {
  service_id: "service_id_example", // required
};

apiInstance.getProductDdosProtection(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.

Return type

DdosProtectionResponseEnable

getProductDdosProtectionConfiguration

getProductDdosProtectionConfiguration({ service_id })

Get configuration of the DDoS Protection product on a service.

Example

const options = {
  service_id: "service_id_example", // required
};

apiInstance.getProductDdosProtectionConfiguration(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.

Return type

DdosProtectionResponseConfigure

setProductDdosProtectionConfiguration

setProductDdosProtectionConfiguration({ service_id, [ddos_protection_request_update_configuration] })

Update configuration of the DDoS Protection product on a service.

Example

const options = {
  service_id: "service_id_example", // required
  ddos_protection_request_update_configuration: {"mode":"log"},
};

apiInstance.setProductDdosProtectionConfiguration(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
ddos_protection_request_update_configuration DdosProtectionRequestUpdateConfiguration [optional]

Return type

DdosProtectionResponseConfigure

[Back to top] [Back to API list] [Back to README]