const apiInstance = new Fastly.WafFirewallsApi();
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
createWafFirewall | POST /waf/firewalls | Create a firewall |
deleteWafFirewall | DELETE /waf/firewalls/{firewall_id} | Delete a firewall |
getWafFirewall | GET /waf/firewalls/{firewall_id} | Get a firewall |
listWafFirewalls | GET /waf/firewalls | List firewalls |
updateWafFirewall | PATCH /waf/firewalls/{firewall_id} | Update a firewall |
createWafFirewall({ , [waf_firewall] })
Create a firewall object for a particular service and service version using a defined prefetch_condition
and response
. If the prefetch_condition
or the response
is missing from the request body, Fastly will generate a default object on your service.
const options = {
waf_firewall: {"data":{"type":"waf_firewall","attributes":{"prefetch_condition":"WAF_Condition","response":"WAF_Error","service_id":"SU1Z0isxPaozGVKXdv0eY","service_version_number":1}}},
};
apiInstance.createWafFirewall(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
waf_firewall | WafFirewall | [optional] |
deleteWafFirewall({ firewall_id, [waf_firewall] })
Delete the firewall object for a particular service and service version.
const options = {
firewall_id: "firewall_id_example", // required
waf_firewall: {"data":{"id":"fW7g2uUGZzb2W9Euo4Mo0r","type":"waf_firewall","attributes":{"service_version_number":1}}},
};
apiInstance.deleteWafFirewall(options)
.then(() => {
console.log('API called successfully.');
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
firewall_id | String | Alphanumeric string identifying a WAF Firewall. | |
waf_firewall | WafFirewall | [optional] |
null (empty response body)
getWafFirewall({ firewall_id, [filter_service_version_number, ][include] })
Get a specific firewall object.
const options = {
firewall_id: "firewall_id_example", // required
filter_service_version_number: "filter_service_version_number_example",
include: "waf_firewall_versions",
};
apiInstance.getWafFirewall(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
firewall_id | String | Alphanumeric string identifying a WAF Firewall. | |
filter_service_version_number | String | Limit the results returned to a specific service version. | [optional] |
include | String | Include related objects. Optional. | [optional] [one of: "waf_firewall_versions"] |
listWafFirewalls({ , [page_number, ][page_size, ][filter_service_id, ][filter_service_version_number, ][include] })
List all firewall objects.
const options = {
page_number: 1,
page_size: 20,
filter_service_id: "filter_service_id_example",
filter_service_version_number: "filter_service_version_number_example",
include: "waf_firewall_versions",
};
apiInstance.listWafFirewalls(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
page_number | Number | Current page. | [optional] |
page_size | Number | Number of records per page. | [optional] [defaults to 20] |
filter_service_id | String | Limit the results returned to a specific service. | [optional] |
filter_service_version_number | String | Limit the results returned to a specific service version. | [optional] |
include | String | Include related objects. Optional. | [optional] [one of: "waf_firewall_versions"] |
updateWafFirewall({ firewall_id, [waf_firewall] })
Update a firewall object for a particular service and service version. Specifying a service_version_number
is required.
const options = {
firewall_id: "firewall_id_example", // required
waf_firewall: {"data":{"id":"fW7g2uUGZzb2W9Euo4Mo0r","type":"waf_firewall","attributes":{"response":"NEW_RESPONSE","service_version_number":1}}},
};
apiInstance.updateWafFirewall(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
firewall_id | String | Alphanumeric string identifying a WAF Firewall. | |
waf_firewall | WafFirewall | [optional] |