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
 String authorizeIngressICMPToCIDRs(String securityGroupId, int ICMPCode, int ICMPType, Iterable<String> cidrList, AccountInDomainOptions... options)
          Authorizes a particular ICMP ingress rule for this security group
 String authorizeIngressICMPToSecurityGroups(String 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
 String authorizeIngressPortsToCIDRs(String securityGroupId, String protocol, int startPort, int endPort, Iterable<String> cidrList, AccountInDomainOptions... options)
          Authorizes a particular TCP or UDP ingress rule for this security group
 String authorizeIngressPortsToSecurityGroups(String 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(String id)
          delete a specific security group by id
 SecurityGroup getSecurityGroup(String id)
          get a specific security group by id
 Set<SecurityGroup> listSecurityGroups(ListSecurityGroupsOptions... options)
          Lists security groups
 String revokeIngressRule(String 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

String authorizeIngressPortsToCIDRs(String 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

String authorizeIngressPortsToSecurityGroups(String 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

String authorizeIngressICMPToCIDRs(String 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

String authorizeIngressICMPToSecurityGroups(String 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

String revokeIngressRule(String 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(String 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(String id)
delete a specific security group by id

Parameters:
id - group to delete


Copyright © 2009-2012 jclouds. All Rights Reserved.