Interface NATApi


  • public interface NATApi
    Provides synchronous access to cloudstack via their REST API.

    See Also:
    • Method Detail

      • listIPForwardingRules

        @Named("listIpForwardingRules")
        @GET
        @Consumes("application/json")
        Set<IPForwardingRule> listIPForwardingRules​(ListIPForwardingRulesOptions... options)
        List the ip forwarding rules
        Parameters:
        options - if present, how to constrain the list.
        Returns:
        IPForwardingRules matching query, or empty set, if no IPForwardingRules are found
      • getIPForwardingRule

        @Named("listIpForwardingRules")
        @GET
        @Consumes("application/json")
        IPForwardingRule getIPForwardingRule​(@QueryParam("id")
                                             String id)
        get a specific IPForwardingRule by id
        Parameters:
        id - IPForwardingRule to get
        Returns:
        IPForwardingRule or null if not found
      • getIPForwardingRulesForIPAddress

        @Named("listIpForwardingRules")
        @GET
        @Consumes("application/json")
        Set<IPForwardingRule> getIPForwardingRulesForIPAddress​(@QueryParam("ipaddressid")
                                                               String id)
        get a set of IPForwardingRules by ipaddress id
        Parameters:
        id - IPAddress of rule to get
        Returns:
        IPForwardingRule matching query or empty if not found
      • getIPForwardingRulesForVirtualMachine

        @Named("listIpForwardingRules")
        @GET
        @Consumes("application/json")
        Set<IPForwardingRule> getIPForwardingRulesForVirtualMachine​(@QueryParam("virtualmachineid")
                                                                    String id)
        get a set of IPForwardingRules by virtual machine id
        Parameters:
        id - virtual machine of rule to get
        Returns:
        IPForwardingRule matching query or empty set if not found
      • createIPForwardingRule

        @Named("createIpForwardingRule")
        @GET
        @Consumes("application/json")
        AsyncCreateResponse createIPForwardingRule​(@QueryParam("ipaddressid")
                                                   String IPAddressId,
                                                   @QueryParam("protocol")
                                                   String protocol,
                                                   @QueryParam("startport")
                                                   int startPort,
                                                   CreateIPForwardingRuleOptions... options)
        Creates an ip forwarding rule
        Parameters:
        IPAddressId - the public IP address id of the forwarding rule, already associated via associateIp
        protocol - the protocol for the rule. Valid values are TCP or UDP.
        startPort - the start port for the rule
        Returns:
        response used to track creation
      • enableStaticNATForVirtualMachine

        @Named("enableStaticNat")
        @GET
        @Consumes("application/json")
        void enableStaticNATForVirtualMachine​(@QueryParam("virtualmachineid")
                                              String virtualMachineId,
                                              @QueryParam("ipaddressid")
                                              String IPAddressId)
      • deleteIPForwardingRule

        @Named("deleteIpForwardingRule")
        @GET
        @Consumes("application/json")
        String deleteIPForwardingRule​(@QueryParam("id")
                                      String id)
        Deletes an ip forwarding rule
        Parameters:
        id - the id of the forwarding rule
      • disableStaticNATOnPublicIP

        @Named("disableStaticNat")
        @GET
        @Consumes("application/json")
        String disableStaticNATOnPublicIP​(@QueryParam("ipaddressid")
                                          String IPAddressId)
        Disables static rule for given ip address
        Parameters:
        IPAddressId - the public IP address id for which static nat feature is being disabled