Package org.jclouds.cloudstack.features
Interface SecurityGroupApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
authorizeIngressICMPToCIDRs(String securityGroupId, int ICMPCode, int ICMPType, Iterable<String> cidrList, AccountInDomainOptions... options)
Authorizes a particular ICMP ingress rule for this security groupString
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 groupString
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 groupString
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 groupSecurityGroup
createSecurityGroup(String name)
Creates a security groupvoid
deleteSecurityGroup(String id)
delete a specific security group by idSecurityGroup
getSecurityGroup(String id)
get a specific security group by idSecurityGroup
getSecurityGroupByName(String securityGroupName)
get a specific security group by nameSet<SecurityGroup>
listSecurityGroups(ListSecurityGroupsOptions... options)
Lists security groupsString
revokeIngressRule(String id, AccountInDomainOptions... options)
Deletes a particular ingress rule from this security group
-
-
-
Method Detail
-
listSecurityGroups
@Named("listSecurityGroups") @GET @Consumes("application/json") 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
-
getSecurityGroup
@Named("listSecurityGroups") @GET @Consumes("application/json") SecurityGroup getSecurityGroup(@QueryParam("id") String id)
get a specific security group by id- Parameters:
id
- group to get- Returns:
- security group or null if not found
-
getSecurityGroupByName
@Named("listSecurityGroups") @GET @Consumes("application/json") SecurityGroup getSecurityGroupByName(@QueryParam("securitygroupname") String securityGroupName)
get a specific security group by name- Parameters:
securityGroupName
- group to get- Returns:
- security group or null if not found
-
createSecurityGroup
@Named("createSecurityGroup") @GET @Consumes("application/json") SecurityGroup createSecurityGroup(@QueryParam("name") String name)
Creates a security group- Parameters:
name
- name of the security group- Returns:
- security group
-
authorizeIngressPortsToCIDRs
@Named("authorizeSecurityGroupIngress") @GET @Consumes("application/json") String authorizeIngressPortsToCIDRs(@QueryParam("securitygroupid") String securityGroupId, @QueryParam("protocol") String protocol, @QueryParam("startport") int startPort, @QueryParam("endport") 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 groupprotocol
- tcp or udpstartPort
- start port for this ingress ruleendPort
- end port for this ingress rulecidrList
- the cidr list associated- Returns:
- response relating to the creation of this ingress rule
-
authorizeIngressPortsToSecurityGroups
@Named("authorizeSecurityGroupIngress") @GET @Consumes("application/json") String authorizeIngressPortsToSecurityGroups(@QueryParam("securitygroupid") String securityGroupId, @QueryParam("protocol") String protocol, @QueryParam("startport") int startPort, @QueryParam("endport") 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 groupprotocol
- tcp or udpstartPort
- start port for this ingress ruleendPort
- end port for this ingress ruleaccountToGroup
- mapping of account names to security groups you wish to authorize- Returns:
- response relating to the creation of this ingress rule
-
authorizeIngressICMPToCIDRs
@Named("authorizeSecurityGroupIngress") @GET @Consumes("application/json") String authorizeIngressICMPToCIDRs(@QueryParam("securitygroupid") String securityGroupId, @QueryParam("icmpcode") int ICMPCode, @QueryParam("icmptype") int ICMPType, Iterable<String> cidrList, AccountInDomainOptions... options)
Authorizes a particular ICMP ingress rule for this security group- Parameters:
securityGroupId
- The ID of the security groupICMPCode
- type of the icmp message being sentICMPType
- error code for this icmp messagecidrList
- the cidr list associated- Returns:
- response relating to the creation of this ingress rule
-
authorizeIngressICMPToSecurityGroups
@Named("authorizeSecurityGroupIngress") @GET @Consumes("application/json") String authorizeIngressICMPToSecurityGroups(@QueryParam("securitygroupid") String securityGroupId, @QueryParam("icmpcode") int ICMPCode, @QueryParam("icmptype") 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 groupICMPCode
- type of the icmp message being sentICMPType
- error code for this icmp messageaccountToGroup
- mapping of account names to security groups you wish to authorize- Returns:
- response relating to the creation of this ingress rule
-
revokeIngressRule
@Named("revokeSecurityGroupIngress") @GET @Consumes("application/json") String revokeIngressRule(@QueryParam("id") String id, AccountInDomainOptions... options)
Deletes a particular ingress rule from this security group- Parameters:
id
- The ID of the ingress ruleoptions
- scope of the rule.
-
deleteSecurityGroup
@Named("deleteSecurityGroup") @GET @Consumes("application/json") void deleteSecurityGroup(@QueryParam("id") String id)
delete a specific security group by id- Parameters:
id
- group to delete
-
-