Skip to content

Latest commit

 

History

History
200 lines (140 loc) · 4.84 KB

ProductNgwafApi.md

File metadata and controls

200 lines (140 loc) · 4.84 KB

Fastly.ProductNgwafApi

const apiInstance = new Fastly.ProductNgwafApi();

Methods

Note

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

Method HTTP request Description
disableProductNgwaf DELETE /enabled-products/v1/ngwaf/services/{service_id} Disable product
enableProductNgwaf PUT /enabled-products/v1/ngwaf/services/{service_id} Enable product
getProductNgwaf GET /enabled-products/v1/ngwaf/services/{service_id} Get product enablement status
getProductNgwafConfiguration GET /enabled-products/v1/ngwaf/services/{service_id}/configuration Get configuration
setProductNgwafConfiguration PATCH /enabled-products/v1/ngwaf/services/{service_id}/configuration Update configuration

disableProductNgwaf

disableProductNgwaf({ service_id })

Disable the Next-Gen WAF product on a service.

Example

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

apiInstance.disableProductNgwaf(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)

enableProductNgwaf

enableProductNgwaf({ service_id, [ngwaf_request_enable] })

Enable the Next-Gen WAF product on a service.

Example

const options = {
  service_id: "service_id_example", // required
  ngwaf_request_enable: {"workspace_id":"7JFbo4RNA0OKdFWC04r6B3"},
};

apiInstance.enableProductNgwaf(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.
ngwaf_request_enable NgwafRequestEnable [optional]

Return type

NgwafResponseEnable

getProductNgwaf

getProductNgwaf({ service_id })

Get the enablement status of the Next-Gen WAF product on a service.

Example

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

apiInstance.getProductNgwaf(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

NgwafResponseEnable

getProductNgwafConfiguration

getProductNgwafConfiguration({ service_id })

Get configuration of the Next-Gen WAF product on a service.

Example

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

apiInstance.getProductNgwafConfiguration(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

NgwafResponseConfigure

setProductNgwafConfiguration

setProductNgwafConfiguration({ service_id, [ngwaf_request_update_configuration] })

Update configuration of the Next-Gen WAF product on a service.

Example

const options = {
  service_id: "service_id_example", // required
  ngwaf_request_update_configuration: {"workspace_id":"7JFbo4RNA0OKdFWC04r6B3","traffic_ramp":"20"},
};

apiInstance.setProductNgwafConfiguration(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.
ngwaf_request_update_configuration NgwafRequestUpdateConfiguration [optional]

Return type

NgwafResponseConfigure

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