public class Subnet
extends java.lang.Object
implements java.io.Serializable
Describes a subnet.
| Constructor and Description |
|---|
Subnet() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAvailabilityZone()
The Availability Zone of the subnet.
|
java.lang.Integer |
getAvailableIpAddressCount()
The number of unused IP addresses in the subnet.
|
java.lang.String |
getCidrBlock()
The CIDR block assigned to the subnet.
|
java.lang.Boolean |
getDefaultForAz()
Indicates whether this is the default subnet for the Availability
Zone.
|
java.lang.Boolean |
getMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public
IP address.
|
java.lang.String |
getState()
The current state of the subnet.
|
java.lang.String |
getSubnetId()
The ID of the subnet.
|
java.util.List<Tag> |
getTags()
Any tags assigned to the subnet.
|
java.lang.String |
getVpcId()
The ID of the VPC the subnet is in.
|
int |
hashCode() |
java.lang.Boolean |
isDefaultForAz()
Indicates whether this is the default subnet for the Availability
Zone.
|
java.lang.Boolean |
isMapPublicIpOnLaunch()
Indicates whether instances launched in this subnet receive a public
IP address.
|
void |
setAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone of the subnet.
|
void |
setAvailableIpAddressCount(java.lang.Integer availableIpAddressCount)
The number of unused IP addresses in the subnet.
|
void |
setCidrBlock(java.lang.String cidrBlock)
The CIDR block assigned to the subnet.
|
void |
setDefaultForAz(java.lang.Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability
Zone.
|
void |
setMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public
IP address.
|
void |
setState(java.lang.String state)
The current state of the subnet.
|
void |
setState(SubnetState state)
The current state of the subnet.
|
void |
setSubnetId(java.lang.String subnetId)
The ID of the subnet.
|
void |
setTags(java.util.Collection<Tag> tags)
Any tags assigned to the subnet.
|
void |
setVpcId(java.lang.String vpcId)
The ID of the VPC the subnet is in.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Subnet |
withAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone of the subnet.
|
Subnet |
withAvailableIpAddressCount(java.lang.Integer availableIpAddressCount)
The number of unused IP addresses in the subnet.
|
Subnet |
withCidrBlock(java.lang.String cidrBlock)
The CIDR block assigned to the subnet.
|
Subnet |
withDefaultForAz(java.lang.Boolean defaultForAz)
Indicates whether this is the default subnet for the Availability
Zone.
|
Subnet |
withMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
Indicates whether instances launched in this subnet receive a public
IP address.
|
Subnet |
withState(java.lang.String state)
The current state of the subnet.
|
Subnet |
withState(SubnetState state)
The current state of the subnet.
|
Subnet |
withSubnetId(java.lang.String subnetId)
The ID of the subnet.
|
Subnet |
withTags(java.util.Collection<Tag> tags)
Any tags assigned to the subnet.
|
Subnet |
withTags(Tag... tags)
Any tags assigned to the subnet.
|
Subnet |
withVpcId(java.lang.String vpcId)
The ID of the VPC the subnet is in.
|
public java.lang.String getSubnetId()
public void setSubnetId(java.lang.String subnetId)
subnetId - The ID of the subnet.public Subnet withSubnetId(java.lang.String subnetId)
Returns a reference to this object so that method calls can be chained together.
subnetId - The ID of the subnet.public java.lang.String getState()
Constraints:
Allowed Values: pending, available
SubnetStatepublic void setState(java.lang.String state)
Constraints:
Allowed Values: pending, available
state - The current state of the subnet.SubnetStatepublic Subnet withState(java.lang.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.SubnetStatepublic void setState(SubnetState state)
Constraints:
Allowed Values: pending, available
state - The current state of the subnet.SubnetStatepublic 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.SubnetStatepublic java.lang.String getVpcId()
public void setVpcId(java.lang.String vpcId)
vpcId - The ID of the VPC the subnet is in.public Subnet withVpcId(java.lang.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 java.lang.String getCidrBlock()
public void setCidrBlock(java.lang.String cidrBlock)
cidrBlock - The CIDR block assigned to the subnet.public Subnet withCidrBlock(java.lang.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 java.lang.Integer getAvailableIpAddressCount()
public void setAvailableIpAddressCount(java.lang.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(java.lang.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 java.lang.String getAvailabilityZone()
public void setAvailabilityZone(java.lang.String availabilityZone)
availabilityZone - The Availability Zone of the subnet.public Subnet withAvailabilityZone(java.lang.String availabilityZone)
Returns a reference to this object so that method calls can be chained together.
availabilityZone - The Availability Zone of the subnet.public java.lang.Boolean isDefaultForAz()
public void setDefaultForAz(java.lang.Boolean defaultForAz)
defaultForAz - Indicates whether this is the default subnet for the Availability
Zone.public Subnet withDefaultForAz(java.lang.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 java.lang.Boolean getDefaultForAz()
public java.lang.Boolean isMapPublicIpOnLaunch()
public void setMapPublicIpOnLaunch(java.lang.Boolean mapPublicIpOnLaunch)
mapPublicIpOnLaunch - Indicates whether instances launched in this subnet receive a public
IP address.public Subnet withMapPublicIpOnLaunch(java.lang.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 java.lang.Boolean getMapPublicIpOnLaunch()
public java.util.List<Tag> getTags()
public void setTags(java.util.Collection<Tag> tags)
tags - Any tags assigned to the subnet.public Subnet withTags(Tag... tags)
Returns a reference to this object so that method calls can be chained together.
tags - Any tags assigned to the subnet.public Subnet withTags(java.util.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 java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.