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