Package com.google.api.services.compute.model.Firewall

Examples of com.google.api.services.compute.model.Firewall.Allowed


      if (matchingRule == null) {
        Firewall rule = new Firewall();
        rule.setSourceRanges(Arrays.asList("0.0.0.0/0"));
        rule.setName("pl-" + UUID.randomUUID().toString());

        Allowed allowed = new Allowed();
        allowed.setIPProtocol("tcp");
        allowed.setPorts(Arrays.asList("" + model.publicPort));
        rule.setAllowed(Arrays.asList(allowed));

        rule.setNetwork(client.buildNetworkUrl("default"));

        client.createFirewallRule(rule);
View Full Code Here

TOP

Related Classes of com.google.api.services.compute.model.Firewall.Allowed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.