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(String ipAddressId, FirewallRule.Protocol protocol, CreateFirewallRuleOptions... options)
          Create new firewall rule for a specific IP address
 AsyncCreateResponse createFirewallRuleForIpProtocolAndPort(String ipAddressId, FirewallRule.Protocol protocol, int startPort, int endPort)
           
 AsyncCreateResponse createPortForwardingRuleForVirtualMachine(String ipAddressId, PortForwardingRule.Protocol protocol, int publicPort, String virtualMachineId, int privatePort)
          Creates an port forwarding rule
 Void deleteFirewallRule(String id)
          Deletes a firewall rule
 Void deletePortForwardingRule(String id)
          Deletes an port forwarding rule
 FirewallRule getFirewallRule(String id)
          Get a firewall rule by ID
 PortForwardingRule getPortForwardingRule(String 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(String id)
Get a firewall rule by ID

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

createFirewallRuleForIpAndProtocol

AsyncCreateResponse createFirewallRuleForIpAndProtocol(String 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:

createFirewallRuleForIpProtocolAndPort

AsyncCreateResponse createFirewallRuleForIpProtocolAndPort(String ipAddressId,
                                                           FirewallRule.Protocol protocol,
                                                           int startPort,
                                                           int endPort)

deleteFirewallRule

Void deleteFirewallRule(String 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 PortForwardingRules are found

getPortForwardingRule

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

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

createPortForwardingRuleForVirtualMachine

AsyncCreateResponse createPortForwardingRuleForVirtualMachine(String ipAddressId,
                                                              PortForwardingRule.Protocol protocol,
                                                              int publicPort,
                                                              String 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(String id)
Deletes an port forwarding rule

Parameters:
id - the id of the forwarding rule


Copyright © 2009-2013 jclouds. All Rights Reserved.