All URIs are relative to https://api.ionos.com/cloudapi/v6
datacentersServersNicsFirewallrulesDelete(datacenterId, serverId, nicId, firewallruleId, opts)
Delete firewall rules
Delete the specified firewall rule.
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.FirewallRulesApi(config);
// Delete firewall rules
api_instance
.datacentersServersNicsFirewallrulesDelete({
datacenterId: datacenterId_example,
serverId: serverId_example,
nicId: nicId_example,
firewallruleId: firewallruleId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
Return type
nil (empty response body)
Authorization
Basic Authentication, Token Authentication
Content-Type: Not defined
datacentersServersNicsFirewallrulesFindById(datacenterId, serverId, nicId, firewallruleId, opts)
Retrieve firewall rules
Retrieve the properties of the specified firewall rule.
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.FirewallRulesApi(config);
// Retrieve firewall rules
api_instance
.datacentersServersNicsFirewallrulesFindById({
datacenterId: datacenterId_example,
serverId: serverId_example,
nicId: nicId_example,
firewallruleId: firewallruleId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
Return type
FirewallRule
Authorization
Basic Authentication, Token Authentication
Content-Type: Not defined
datacentersServersNicsFirewallrulesGet(datacenterId, serverId, nicId, opts)
List firewall rules
List all firewall rules for the specified NIC.
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.FirewallRulesApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List firewall rules
api_instance
.datacentersServersNicsFirewallrulesGet({
datacenterId: datacenterId_example,
serverId: serverId_example,
nicId: nicId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
offset: 56,
limit: 56,
orderBy: "<property_name>"
maxResults: 2,
filters: filterMap
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
Return type
FirewallRules
Authorization
Basic Authentication, Token Authentication
Content-Type: Not defined
datacentersServersNicsFirewallrulesPatch(datacenterId, serverId, nicId, firewallruleId, firewallrule, opts)
Partially modify firewall rules
Update the properties of the specified firewall rule.
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.FirewallRulesApi(config);
// Partially modify firewall rules
api_instance
.datacentersServersNicsFirewallrulesPatch({
datacenterId: datacenterId_example,
serverId: serverId_example,
nicId: nicId_example,
firewallruleId: firewallruleId_example,
firewallrule: firewallrule_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
Return type
FirewallRule
Authorization
Basic Authentication, Token Authentication
Content-Type: application/json
datacentersServersNicsFirewallrulesPost(datacenterId, serverId, nicId, firewallrule, opts)
Create a Firewall Rule
Creates a firewall rule for the specified NIC.
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.FirewallRulesApi(config);
// Create a Firewall Rule
api_instance
.datacentersServersNicsFirewallrulesPost({
datacenterId: datacenterId_example,
serverId: serverId_example,
nicId: nicId_example,
firewallrule: firewallrule_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
Return type
FirewallRule
Authorization
Basic Authentication, Token Authentication
Content-Type: application/json
datacentersServersNicsFirewallrulesPut(datacenterId, serverId, nicId, firewallruleId, firewallrule, opts)
Modify a Firewall Rule
Modifies the properties of the specified firewall rule.
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.FirewallRulesApi(config);
// Modify a Firewall Rule
api_instance
.datacentersServersNicsFirewallrulesPut({
datacenterId: datacenterId_example,
serverId: serverId_example,
nicId: nicId_example,
firewallruleId: firewallruleId_example,
firewallrule: firewallrule_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
Return type
FirewallRule
Authorization
Basic Authentication, Token Authentication
Content-Type: application/json