org.jclouds.cloudstack.features
Interface FirewallClient


public interface FirewallClient

Provides synchronous access to CloudStack PortForwardingRule features.

Author:
Adrian Cole
See Also:
PortForwardingRuleAsyncClient,

Method Summary
 AsyncCreateResponse createFirewallRuleForIpAndProtocol(long ipAddressId, FirewallRule.Protocol protocol, CreateFirewallRuleOptions... options)
          Create new firewall rule for a specific IP address
 AsyncCreateResponse createPortForwardingRuleForVirtualMachine(long ipAddressId, PortForwardingRule.Protocol protocol, int publicPort, long virtualMachineId, int privatePort)
          Creates an port forwarding rule
 Void deleteFirewallRule(long id)
          Deletes a firewall rule
 Void deletePortForwardingRule(long id)
          Deletes an port forwarding rule
 FirewallRule getFirewallRule(long id)
          Get a firewall rule by ID
 PortForwardingRule getPortForwardingRule(long id)
          Get a port forwarding rule by ID
 Set<FirewallRule> listFirewallRules(ListFirewallRulesOptions... options)
          List the firewall rules
 Set<PortForwardingRule> listPortForwardingRules(ListPortForwardingRulesOptions... options)
          List the port forwarding rules
 

Method Detail

listFirewallRules

Set<FirewallRule> listFirewallRules(ListFirewallRulesOptions... options)
List the firewall rules

Parameters:
options - if present, how to constrain the list.
Returns:
set of firewall rules or empty set if no rules are found

getFirewallRule

FirewallRule getFirewallRule(long id)
Get a firewall rule by ID

Parameters:
id - the ID of the firewall rule
Returns:
firewall rule instance or null

createFirewallRuleForIpAndProtocol

AsyncCreateResponse createFirewallRuleForIpAndProtocol(long ipAddressId,
                                                       FirewallRule.Protocol protocol,
                                                       CreateFirewallRuleOptions... options)
Create new firewall rule for a specific IP address

Parameters:
ipAddressId - the IP address id of the port forwarding rule
protocol - the protocol for the firewall rule. Valid values are TCP/UDP/ICMP
options - optional arguments for firewall rule creation
Returns:

deleteFirewallRule

Void deleteFirewallRule(long id)
Deletes a firewall rule

Parameters:
id - the ID of the firewall rule

listPortForwardingRules

Set<PortForwardingRule> listPortForwardingRules(ListPortForwardingRulesOptions... options)
List the port forwarding rules

Parameters:
options - if present, how to constrain the list.
Returns:
PortForwardingRules matching query, or empty set, if no PortForwardingRulees are found

getPortForwardingRule

PortForwardingRule getPortForwardingRule(long id)
Get a port forwarding rule by ID

Parameters:
id - port forwarding rule ID
Returns:
rule instance or null

createPortForwardingRuleForVirtualMachine

AsyncCreateResponse createPortForwardingRuleForVirtualMachine(long ipAddressId,
                                                              PortForwardingRule.Protocol protocol,
                                                              int publicPort,
                                                              long virtualMachineId,
                                                              int privatePort)
Creates an port forwarding rule

Parameters:
ipAddressId -
protocol - the protocol for the rule. Valid values are TCP or UDP.
publicPort - the public port of the port forwarding rule
virtualMachineId - the ID of the virtual machine for the port forwarding rule
privatePort - the private port of the port forwarding rule
Returns:
response used to track creation

deletePortForwardingRule

Void deletePortForwardingRule(long id)
Deletes an port forwarding rule

Parameters:
id - the id of the forwarding rule


Copyright © 2009-2012 jclouds. All Rights Reserved.