public class Subnet extends Object implements Serializable, Cloneable
Describes a subnet.
Constructor and Description |
---|
Subnet() |
Modifier and Type | Method and Description |
---|---|
Subnet |
clone() |
boolean |
equals(Object obj) |
String |
getAvailabilityZone()
The Availability Zone of the subnet.
|
Integer |
getAvailableIpAddressCount()
The number of unused IP addresses in the subnet.
|
String |
getCidrBlock()
The CIDR block assigned to the subnet.
|
Boolean |
getDefaultForAz()
Indicates whether this is the default subnet for the Availability
Zone.
|
Boolean |
getMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public
IP address.
|
String |
getState()
The current state of the subnet.
|
String |
getSubnetId()
The ID of the subnet.
|
List<Tag> |
getTags()
Any tags assigned to the subnet.
|
String |
getVpcId()
The ID of the VPC the subnet is in.
|
int |
hashCode() |
Boolean |
isDefaultForAz()
Indicates whether this is the default subnet for the Availability
Zone.
|
Boolean |
isMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public
IP address.
|
void |
setAvailabilityZone(String availabilityZone)
The Availability Zone of the subnet.
|
void |
setAvailableIpAddressCount(Integer availableIpAddressCount)
The number of unused IP addresses in the subnet.
|
void |
setCidrBlock(String cidrBlock)
The CIDR block assigned to the subnet.
|
void |
setDefaultForAz(Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability
Zone.
|
void |
setMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public
IP address.
|
void |
setState(String state)
The current state of the subnet.
|
void |
setState(SubnetState state)
The current state of the subnet.
|
void |
setSubnetId(String subnetId)
The ID of the subnet.
|
void |
setTags(Collection<Tag> tags)
Any tags assigned to the subnet.
|
void |
setVpcId(String vpcId)
The ID of the VPC the subnet is in.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Subnet |
withAvailabilityZone(String availabilityZone)
The Availability Zone of the subnet.
|
Subnet |
withAvailableIpAddressCount(Integer availableIpAddressCount)
The number of unused IP addresses in the subnet.
|
Subnet |
withCidrBlock(String cidrBlock)
The CIDR block assigned to the subnet.
|
Subnet |
withDefaultForAz(Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability
Zone.
|
Subnet |
withMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public
IP address.
|
Subnet |
withState(String state)
The current state of the subnet.
|
Subnet |
withState(SubnetState state)
The current state of the subnet.
|
Subnet |
withSubnetId(String subnetId)
The ID of the subnet.
|
Subnet |
withTags(Collection<Tag> tags)
Any tags assigned to the subnet.
|
Subnet |
withTags(Tag... tags)
Any tags assigned to the subnet.
|
Subnet |
withVpcId(String vpcId)
The ID of the VPC the subnet is in.
|
public String getSubnetId()
public void setSubnetId(String subnetId)
subnetId
- The ID of the subnet.public Subnet withSubnetId(String subnetId)
Returns a reference to this object so that method calls can be chained together.
subnetId
- The ID of the subnet.public String getState()
Constraints:
Allowed Values: pending, available
SubnetState
public void setState(String state)
Constraints:
Allowed Values: pending, available
state
- The current state of the subnet.SubnetState
public Subnet withState(String state)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: pending, available
state
- The current state of the subnet.SubnetState
public void setState(SubnetState state)
Constraints:
Allowed Values: pending, available
state
- The current state of the subnet.SubnetState
public Subnet withState(SubnetState state)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: pending, available
state
- The current state of the subnet.SubnetState
public String getVpcId()
public void setVpcId(String vpcId)
vpcId
- The ID of the VPC the subnet is in.public Subnet withVpcId(String vpcId)
Returns a reference to this object so that method calls can be chained together.
vpcId
- The ID of the VPC the subnet is in.public String getCidrBlock()
public void setCidrBlock(String cidrBlock)
cidrBlock
- The CIDR block assigned to the subnet.public Subnet withCidrBlock(String cidrBlock)
Returns a reference to this object so that method calls can be chained together.
cidrBlock
- The CIDR block assigned to the subnet.public Integer getAvailableIpAddressCount()
public void setAvailableIpAddressCount(Integer availableIpAddressCount)
availableIpAddressCount
- The number of unused IP addresses in the subnet. Note that the IP
addresses for any stopped instances are considered unavailable.public Subnet withAvailableIpAddressCount(Integer availableIpAddressCount)
Returns a reference to this object so that method calls can be chained together.
availableIpAddressCount
- The number of unused IP addresses in the subnet. Note that the IP
addresses for any stopped instances are considered unavailable.public String getAvailabilityZone()
public void setAvailabilityZone(String availabilityZone)
availabilityZone
- The Availability Zone of the subnet.public Subnet withAvailabilityZone(String availabilityZone)
Returns a reference to this object so that method calls can be chained together.
availabilityZone
- The Availability Zone of the subnet.public Boolean isDefaultForAz()
public void setDefaultForAz(Boolean defaultForAz)
defaultForAz
- Indicates whether this is the default subnet for the Availability
Zone.public Subnet withDefaultForAz(Boolean defaultForAz)
Returns a reference to this object so that method calls can be chained together.
defaultForAz
- Indicates whether this is the default subnet for the Availability
Zone.public Boolean getDefaultForAz()
public Boolean isMapPublicIpOnLaunch()
public void setMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch)
mapPublicIpOnLaunch
- Indicates whether instances launched in this subnet receive a public
IP address.public Subnet withMapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch)
Returns a reference to this object so that method calls can be chained together.
mapPublicIpOnLaunch
- Indicates whether instances launched in this subnet receive a public
IP address.public Boolean getMapPublicIpOnLaunch()
public List<Tag> getTags()
public void setTags(Collection<Tag> tags)
tags
- Any tags assigned to the subnet.public Subnet withTags(Tag... tags)
NOTE: This method appends the values to the existing list (if
any). Use setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the existing
values.
Returns a reference to this object so that method calls can be chained together.
tags
- Any tags assigned to the subnet.public Subnet withTags(Collection<Tag> tags)
Returns a reference to this object so that method calls can be chained together.
tags
- Any tags assigned to the subnet.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.