org.jclouds.cloudstack.features
Interface SecurityGroupClient


public interface SecurityGroupClient

Provides synchronous access to CloudStack security group features.

Author:
Adrian Cole
See Also:
SecurityGroupAsyncClient,

Method Summary
 long authorizeIngressICMPToCIDRs(long securityGroupId, int ICMPCode, int ICMPType, Iterable<String> cidrList, AccountInDomainOptions... options)
          Authorizes a particular ICMP ingress rule for this security group
 long authorizeIngressICMPToSecurityGroups(long securityGroupId, int ICMPCode, int ICMPType, com.google.common.collect.Multimap<String,String> accountToGroup, AccountInDomainOptions... options)
          Authorizes a particular ICMP ingress rule for this security group
 long authorizeIngressPortsToCIDRs(long securityGroupId, String protocol, int startPort, int endPort, Iterable<String> cidrList, AccountInDomainOptions... options)
          Authorizes a particular TCP or UDP ingress rule for this security group
 long authorizeIngressPortsToSecurityGroups(long securityGroupId, String protocol, int startPort, int endPort, com.google.common.collect.Multimap<String,String> accountToGroup, AccountInDomainOptions... options)
          Authorizes a particular TCP or UDP ingress rule for this security group
 SecurityGroup createSecurityGroup(String name)
          Creates a security group
 void deleteSecurityGroup(long id)
          delete a specific security group by id
 SecurityGroup getSecurityGroup(long id)
          get a specific security group by id
 Set<SecurityGroup> listSecurityGroups(ListSecurityGroupsOptions... options)
          Lists security groups
 long revokeIngressRule(long id, AccountInDomainOptions... options)
          Deletes a particular ingress rule from this security group
 

Method Detail

listSecurityGroups

Set<SecurityGroup> listSecurityGroups(ListSecurityGroupsOptions... options)
Lists security groups

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

authorizeIngressPortsToCIDRs

long authorizeIngressPortsToCIDRs(long securityGroupId,
                                  String protocol,
                                  int startPort,
                                  int endPort,
                                  Iterable<String> cidrList,
                                  AccountInDomainOptions... options)
Authorizes a particular TCP or UDP ingress rule for this security group

Parameters:
securityGroupId - The ID of the security group
protocol - tcp or udp
startPort - start port for this ingress rule
endPort - end port for this ingress rule
cidrList - the cidr list associated
Returns:
response relating to the creation of this ingress rule

authorizeIngressPortsToSecurityGroups

long authorizeIngressPortsToSecurityGroups(long securityGroupId,
                                           String protocol,
                                           int startPort,
                                           int endPort,
                                           com.google.common.collect.Multimap<String,String> accountToGroup,
                                           AccountInDomainOptions... options)
Authorizes a particular TCP or UDP ingress rule for this security group

Parameters:
securityGroupId - The ID of the security group
protocol - tcp or udp
startPort - start port for this ingress rule
endPort - end port for this ingress rule
accountToGroup - mapping of account names to security groups you wish to authorize
Returns:
response relating to the creation of this ingress rule

authorizeIngressICMPToCIDRs

long authorizeIngressICMPToCIDRs(long securityGroupId,
                                 int ICMPCode,
                                 int ICMPType,
                                 Iterable<String> cidrList,
                                 AccountInDomainOptions... options)
Authorizes a particular ICMP ingress rule for this security group

Parameters:
securityGroupId - The ID of the security group
ICMPCode - type of the icmp message being sent
ICMPType - error code for this icmp message
cidrList - the cidr list associated
Returns:
response relating to the creation of this ingress rule

authorizeIngressICMPToSecurityGroups

long authorizeIngressICMPToSecurityGroups(long securityGroupId,
                                          int ICMPCode,
                                          int ICMPType,
                                          com.google.common.collect.Multimap<String,String> accountToGroup,
                                          AccountInDomainOptions... options)
Authorizes a particular ICMP ingress rule for this security group

Parameters:
securityGroupId - The ID of the security group
ICMPCode - type of the icmp message being sent
ICMPType - error code for this icmp message
accountToGroup - mapping of account names to security groups you wish to authorize
Returns:
response relating to the creation of this ingress rule

revokeIngressRule

long revokeIngressRule(long id,
                       AccountInDomainOptions... options)
Deletes a particular ingress rule from this security group

Parameters:
id - The ID of the ingress rule
options - scope of the rule.

getSecurityGroup

SecurityGroup getSecurityGroup(long id)
get a specific security group by id

Parameters:
id - group to get
Returns:
security group or null if not found

createSecurityGroup

SecurityGroup createSecurityGroup(String name)
Creates a security group

Parameters:
name - name of the security group
Returns:
security group

deleteSecurityGroup

void deleteSecurityGroup(long id)
delete a specific security group by id

Parameters:
id - group to delete


Copyright © 2009-2012 jclouds. All Rights Reserved.