Skip to content

Latest commit

 

History

History
252 lines (181 loc) · 7.07 KB

WafFirewallVersionsApi.md

File metadata and controls

252 lines (181 loc) · 7.07 KB

Fastly.WafFirewallVersionsApi

const apiInstance = new Fastly.WafFirewallVersionsApi();

Methods

Note

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

Method HTTP request Description
cloneWafFirewallVersion PUT /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/clone Clone a firewall version
createWafFirewallVersion POST /waf/firewalls/{firewall_id}/versions Create a firewall version
deployActivateWafFirewallVersion PUT /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/activate Deploy or activate a firewall version
getWafFirewallVersion GET /waf/firewalls/{firewall_id}/versions/{firewall_version_number} Get a firewall version
listWafFirewallVersions GET /waf/firewalls/{firewall_id}/versions List firewall versions
updateWafFirewallVersion PATCH /waf/firewalls/{firewall_id}/versions/{firewall_version_number} Update a firewall version

cloneWafFirewallVersion

cloneWafFirewallVersion({ firewall_id, firewall_version_number })

Clone a specific, existing firewall version into a new, draft firewall version.

Example

const options = {
  firewall_id: "firewall_id_example", // required
  firewall_version_number: 56, // required
};

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

Options

Name Type Description Notes
firewall_id String Alphanumeric string identifying a WAF Firewall.
firewall_version_number Number Integer identifying a WAF firewall version.

Return type

WafFirewallVersionResponse

createWafFirewallVersion

createWafFirewallVersion({ firewall_id, [waf_firewall_version] })

Create a new, draft firewall version.

Example

const options = {
  firewall_id: "firewall_id_example", // required
  waf_firewall_version: {},
};

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

Options

Name Type Description Notes
firewall_id String Alphanumeric string identifying a WAF Firewall.
waf_firewall_version WafFirewallVersion [optional]

Return type

WafFirewallVersionResponse

deployActivateWafFirewallVersion

deployActivateWafFirewallVersion({ firewall_id, firewall_version_number })

Deploy or activate a specific firewall version. If a firewall has been disabled, deploying a firewall version will automatically enable the firewall again.

Example

const options = {
  firewall_id: "firewall_id_example", // required
  firewall_version_number: 56, // required
};

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

Options

Name Type Description Notes
firewall_id String Alphanumeric string identifying a WAF Firewall.
firewall_version_number Number Integer identifying a WAF firewall version.

Return type

Object

getWafFirewallVersion

getWafFirewallVersion({ firewall_id, firewall_version_number, [include] })

Get details about a specific firewall version.

Example

const options = {
  firewall_id: "firewall_id_example", // required
  firewall_version_number: 56, // required
  include: waf_firewall,waf_active_rules,
};

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

Options

Name Type Description Notes
firewall_id String Alphanumeric string identifying a WAF Firewall.
firewall_version_number Number Integer identifying a WAF firewall version.
include String Include relationships. Optional, comma-separated values. Permitted values: waf_firewall and waf_active_rules. [optional]

Return type

WafFirewallVersionResponse

listWafFirewallVersions

listWafFirewallVersions({ firewall_id, [include, ][page_number, ][page_size] })

Get a list of firewall versions associated with a specific firewall.

Example

const options = {
  firewall_id: "firewall_id_example", // required
  include: waf_firewall,
  page_number: 1,
  page_size: 20,
};

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

Options

Name Type Description Notes
firewall_id String Alphanumeric string identifying a WAF Firewall.
include String Include relationships. Optional. [optional]
page_number Number Current page. [optional]
page_size Number Number of records per page. [optional] [defaults to 20]

Return type

WafFirewallVersionsResponse

updateWafFirewallVersion

updateWafFirewallVersion({ firewall_id, firewall_version_number, [waf_firewall_version] })

Update a specific firewall version.

Example

const options = {
  firewall_id: "firewall_id_example", // required
  firewall_version_number: 56, // required
  waf_firewall_version: {"data":{"type":"waf_firewall_version","attributes":{"notice_anomaly_score":12}}},
};

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

Options

Name Type Description Notes
firewall_id String Alphanumeric string identifying a WAF Firewall.
firewall_version_number Number Integer identifying a WAF firewall version.
waf_firewall_version WafFirewallVersion [optional]

Return type

WafFirewallVersionResponse

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