Interface SecurityGroupApi


@Beta @Consumes("application/json") @Produces("application/json") public interface SecurityGroupApi
Provides access to Security Group extension operations for the OpenStack Networking (Neutron) v2 API.

Security groups and security group rules allows administrators and tenants the ability to specify the type of traffic and direction (ingress/egress) that is allowed to pass through a port. A security group is a container for security group rules.

  • Method Details

    • listSecurityGroups

      @Path("/security-groups") @Named("security-group:list") @GET PagedIterable<SecurityGroup> listSecurityGroups()
      Returns:
      all security groups currently defined in Neutron for the current tenant.
    • listSecurityGroups

      @Path("/security-groups") @Named("security-group:list") @GET SecurityGroups listSecurityGroups(PaginationOptions options)
      Returns:
      all security groups currently defined in Neutron for the current tenant.
    • getSecurityGroup

      @Path("/security-groups/{id}") @Named("security-group:get") @GET @Nullable SecurityGroup getSecurityGroup(@PathParam("id") String id)
      Parameters:
      id - the id of the security group to return
      Returns:
      SecurityGroup or null if not found.
    • create

      @Path("/security-groups") @Named("secuity-group:create") @POST SecurityGroup create(SecurityGroup.CreateSecurityGroup securityGroup)
      Creates a new SecurityGroup.
      Parameters:
      securityGroup - Describes the security group to be created.
      Returns:
      a reference of the newly-created security group
    • deleteSecurityGroup

      @Path("/security-groups/{id}") @Named("security-group:delete") @DELETE boolean deleteSecurityGroup(@PathParam("id") String id)
      Deletes the specified Security Group.
      Parameters:
      id - the id of the security group to delete
      Returns:
      true if delete was successful, false if not
    • listRules

      @Path("/security-group-rules") @Named("security-group-rule:list") @GET PagedIterable<Rule> listRules()
      Returns:
      all security groups rules currently defined in Neutron for the current tenant.
    • listRules

      @Path("/security-group-rules") @Named("security-group-rule:list") @GET Rules listRules(PaginationOptions options)
      Returns:
      all security groups rules currently defined in Neutron for the current tenant.
    • get

      @Path("/security-group-rules/{id}") @Named("security-group-rule:get") @GET @Nullable Rule get(@PathParam("id") String id)
      Parameters:
      id - the id of the security group rule to return.
      Returns:
      SecurityGroupRule or null if not found.
    • create

      @Path("/security-group-rules") @Named("security-group-rule:create") @POST Rule create(Rule.CreateRule securityGroupRule)
      Creates a new Security Group Rule.
      Parameters:
      securityGroupRule - Describes the security group rule to be created.
      Returns:
      a reference of the newly-created security group rule.
    • deleteRule

      @Path("/security-group-rules/{id}") @Named("security-group-rule:delete") @DELETE boolean deleteRule(@PathParam("id") String id)
      Deletes the specified Security Group Rule.
      Parameters:
      id - the id of the security group rule to delete.
      Returns:
      true if delete was successful, false if not.