org.jclouds.googlecomputeengine.domain
Class Firewall

java.lang.Object
  extended by org.jclouds.googlecomputeengine.domain.Resource
      extended by org.jclouds.googlecomputeengine.domain.Firewall

@Beta
public final class Firewall
extends Resource

Represents a network firewall

Author:
David Alves
See Also:
,

Nested Class Summary
static class Firewall.Builder
           
static class Firewall.Rule
          A Firewall rule.
 
Nested classes/interfaces inherited from class org.jclouds.googlecomputeengine.domain.Resource
Resource.Kind
 
Field Summary
 
Fields inherited from class org.jclouds.googlecomputeengine.domain.Resource
creationTimestamp, description, id, kind, name, selfLink
 
Constructor Summary
protected Firewall(String id, Date creationTimestamp, URI selfLink, String name, String description, URI network, Set<String> sourceRanges, Set<String> sourceTags, Set<String> targetTags, Set<Firewall.Rule> allowed)
           
 
Method Summary
static Firewall.Builder builder()
           
 Set<Firewall.Rule> getAllowed()
          Each rule specifies a protocol and port-range tuple that describes a permitted connection.
 URI getNetwork()
           
 Set<String> getSourceRanges()
          One or both of sourceRanges and sourceTags may be set; an inbound connection is allowed if either the range or the tag of the source matches.
 Set<String> getSourceTags()
           
 Set<String> getTargetTags()
          If no targetTags are specified, the firewall rule applies to all instances on the specified network.
protected  com.google.common.base.Objects.ToStringHelper string()
          
 Firewall.Builder toBuilder()
           
 String toString()
          
 
Methods inherited from class org.jclouds.googlecomputeengine.domain.Resource
equals, getCreationTimestamp, getDescription, getId, getKind, getName, getSelfLink, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Firewall

@ConstructorProperties(value={"id","creationTimestamp","selfLink","name","description","network","sourceRanges","sourceTags","targetTags","allowed"})
protected Firewall(String id,
                                              Date creationTimestamp,
                                              URI selfLink,
                                              String name,
                                              String description,
                                              URI network,
                                              Set<String> sourceRanges,
                                              Set<String> sourceTags,
                                              Set<String> targetTags,
                                              Set<Firewall.Rule> allowed)
Method Detail

getNetwork

public URI getNetwork()
Returns:
URI of the network to which this firewall is applied; provided by the client when the firewall is created.

getSourceRanges

public Set<String> getSourceRanges()
One or both of sourceRanges and sourceTags may be set; an inbound connection is allowed if either the range or the tag of the source matches.

Returns:
a list of IP address blocks expressed in CIDR format which this rule applies to.

getSourceTags

public Set<String> getSourceTags()
Returns:
a list of instance items which this rule applies to. One or both of sourceRanges and sourceTags may be set; an inbound connection is allowed if either the range or the tag of the source matches.

getTargetTags

public Set<String> getTargetTags()
If no targetTags are specified, the firewall rule applies to all instances on the specified network.

Returns:
a list of instance items indicating sets of instances located on network which may make network connections as specified in allowed.

getAllowed

public Set<Firewall.Rule> getAllowed()
Each rule specifies a protocol and port-range tuple that describes a permitted connection.

Returns:
the list of rules specified by this firewall.

string

protected com.google.common.base.Objects.ToStringHelper string()

Overrides:
string in class Resource

toString

public String toString()

Overrides:
toString in class Resource

builder

public static Firewall.Builder builder()

toBuilder

public Firewall.Builder toBuilder()
Overrides:
toBuilder in class Resource


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.