@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Instance extends Object implements Serializable, Cloneable, StructuredPojo
Describes an instance (a virtual private server).
Constructor and Description |
---|
Instance() |
Modifier and Type | Method and Description |
---|---|
Instance |
clone() |
boolean |
equals(Object obj) |
List<AddOn> |
getAddOns()
An array of objects representing the add-ons enabled on the instance.
|
String |
getArn()
The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE ). |
String |
getBlueprintId()
The blueprint ID (
amazon_linux_2023 ). |
String |
getBlueprintName()
The friendly name of the blueprint (
Amazon Linux 2023 ). |
String |
getBundleId()
The bundle for the instance (
micro_x_x ). |
Date |
getCreatedAt()
The timestamp when the instance was created (
1479734909.17 ) in Unix time format. |
InstanceHardware |
getHardware()
The size of the vCPU and the amount of RAM for the instance.
|
String |
getIpAddressType()
The IP address type of the instance.
|
List<String> |
getIpv6Addresses()
The IPv6 addresses of the instance.
|
Boolean |
getIsStaticIp()
A Boolean value indicating whether this instance has a static IP assigned to it.
|
ResourceLocation |
getLocation()
The region name and Availability Zone where the instance is located.
|
InstanceMetadataOptions |
getMetadataOptions()
The metadata options for the Amazon Lightsail instance.
|
String |
getName()
The name the user gave the instance (
Amazon_Linux_2023-1 ). |
InstanceNetworking |
getNetworking()
Information about the public ports and monthly data transfer rates for the instance.
|
String |
getPrivateIpAddress()
The private IP address of the instance.
|
String |
getPublicIpAddress()
The public IP address of the instance.
|
String |
getResourceType()
The type of resource (usually
Instance ). |
String |
getSshKeyName()
The name of the SSH key being used to connect to the instance (
LightsailDefaultKeyPair ). |
InstanceState |
getState()
The status code and the state (
running ) for the instance. |
String |
getSupportCode()
The support code.
|
List<Tag> |
getTags()
The tag keys and optional values for the resource.
|
String |
getUsername()
The user name for connecting to the instance (
ec2-user ). |
int |
hashCode() |
Boolean |
isStaticIp()
A Boolean value indicating whether this instance has a static IP assigned to it.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAddOns(Collection<AddOn> addOns)
An array of objects representing the add-ons enabled on the instance.
|
void |
setArn(String arn)
The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE ). |
void |
setBlueprintId(String blueprintId)
The blueprint ID (
amazon_linux_2023 ). |
void |
setBlueprintName(String blueprintName)
The friendly name of the blueprint (
Amazon Linux 2023 ). |
void |
setBundleId(String bundleId)
The bundle for the instance (
micro_x_x ). |
void |
setCreatedAt(Date createdAt)
The timestamp when the instance was created (
1479734909.17 ) in Unix time format. |
void |
setHardware(InstanceHardware hardware)
The size of the vCPU and the amount of RAM for the instance.
|
void |
setIpAddressType(IpAddressType ipAddressType)
The IP address type of the instance.
|
void |
setIpAddressType(String ipAddressType)
The IP address type of the instance.
|
void |
setIpv6Addresses(Collection<String> ipv6Addresses)
The IPv6 addresses of the instance.
|
void |
setIsStaticIp(Boolean isStaticIp)
A Boolean value indicating whether this instance has a static IP assigned to it.
|
void |
setLocation(ResourceLocation location)
The region name and Availability Zone where the instance is located.
|
void |
setMetadataOptions(InstanceMetadataOptions metadataOptions)
The metadata options for the Amazon Lightsail instance.
|
void |
setName(String name)
The name the user gave the instance (
Amazon_Linux_2023-1 ). |
void |
setNetworking(InstanceNetworking networking)
Information about the public ports and monthly data transfer rates for the instance.
|
void |
setPrivateIpAddress(String privateIpAddress)
The private IP address of the instance.
|
void |
setPublicIpAddress(String publicIpAddress)
The public IP address of the instance.
|
void |
setResourceType(ResourceType resourceType)
The type of resource (usually
Instance ). |
void |
setResourceType(String resourceType)
The type of resource (usually
Instance ). |
void |
setSshKeyName(String sshKeyName)
The name of the SSH key being used to connect to the instance (
LightsailDefaultKeyPair ). |
void |
setState(InstanceState state)
The status code and the state (
running ) for the instance. |
void |
setSupportCode(String supportCode)
The support code.
|
void |
setTags(Collection<Tag> tags)
The tag keys and optional values for the resource.
|
void |
setUsername(String username)
The user name for connecting to the instance (
ec2-user ). |
String |
toString()
Returns a string representation of this object.
|
Instance |
withAddOns(AddOn... addOns)
An array of objects representing the add-ons enabled on the instance.
|
Instance |
withAddOns(Collection<AddOn> addOns)
An array of objects representing the add-ons enabled on the instance.
|
Instance |
withArn(String arn)
The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE ). |
Instance |
withBlueprintId(String blueprintId)
The blueprint ID (
amazon_linux_2023 ). |
Instance |
withBlueprintName(String blueprintName)
The friendly name of the blueprint (
Amazon Linux 2023 ). |
Instance |
withBundleId(String bundleId)
The bundle for the instance (
micro_x_x ). |
Instance |
withCreatedAt(Date createdAt)
The timestamp when the instance was created (
1479734909.17 ) in Unix time format. |
Instance |
withHardware(InstanceHardware hardware)
The size of the vCPU and the amount of RAM for the instance.
|
Instance |
withIpAddressType(IpAddressType ipAddressType)
The IP address type of the instance.
|
Instance |
withIpAddressType(String ipAddressType)
The IP address type of the instance.
|
Instance |
withIpv6Addresses(Collection<String> ipv6Addresses)
The IPv6 addresses of the instance.
|
Instance |
withIpv6Addresses(String... ipv6Addresses)
The IPv6 addresses of the instance.
|
Instance |
withIsStaticIp(Boolean isStaticIp)
A Boolean value indicating whether this instance has a static IP assigned to it.
|
Instance |
withLocation(ResourceLocation location)
The region name and Availability Zone where the instance is located.
|
Instance |
withMetadataOptions(InstanceMetadataOptions metadataOptions)
The metadata options for the Amazon Lightsail instance.
|
Instance |
withName(String name)
The name the user gave the instance (
Amazon_Linux_2023-1 ). |
Instance |
withNetworking(InstanceNetworking networking)
Information about the public ports and monthly data transfer rates for the instance.
|
Instance |
withPrivateIpAddress(String privateIpAddress)
The private IP address of the instance.
|
Instance |
withPublicIpAddress(String publicIpAddress)
The public IP address of the instance.
|
Instance |
withResourceType(ResourceType resourceType)
The type of resource (usually
Instance ). |
Instance |
withResourceType(String resourceType)
The type of resource (usually
Instance ). |
Instance |
withSshKeyName(String sshKeyName)
The name of the SSH key being used to connect to the instance (
LightsailDefaultKeyPair ). |
Instance |
withState(InstanceState state)
The status code and the state (
running ) for the instance. |
Instance |
withSupportCode(String supportCode)
The support code.
|
Instance |
withTags(Collection<Tag> tags)
The tag keys and optional values for the resource.
|
Instance |
withTags(Tag... tags)
The tag keys and optional values for the resource.
|
Instance |
withUsername(String username)
The user name for connecting to the instance (
ec2-user ). |
public void setName(String name)
The name the user gave the instance (Amazon_Linux_2023-1
).
name
- The name the user gave the instance (Amazon_Linux_2023-1
).public String getName()
The name the user gave the instance (Amazon_Linux_2023-1
).
Amazon_Linux_2023-1
).public Instance withName(String name)
The name the user gave the instance (Amazon_Linux_2023-1
).
name
- The name the user gave the instance (Amazon_Linux_2023-1
).public void setArn(String arn)
The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
arn
- The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).public String getArn()
The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).public Instance withArn(String arn)
The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).
arn
- The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE
).public void setSupportCode(String supportCode)
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
supportCode
- The support code. Include this code in your email to support when you have questions about an instance or
another resource in Lightsail. This code enables our support team to look up your Lightsail information
more easily.public String getSupportCode()
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
public Instance withSupportCode(String supportCode)
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
supportCode
- The support code. Include this code in your email to support when you have questions about an instance or
another resource in Lightsail. This code enables our support team to look up your Lightsail information
more easily.public void setCreatedAt(Date createdAt)
The timestamp when the instance was created (1479734909.17
) in Unix time format.
createdAt
- The timestamp when the instance was created (1479734909.17
) in Unix time format.public Date getCreatedAt()
The timestamp when the instance was created (1479734909.17
) in Unix time format.
1479734909.17
) in Unix time format.public Instance withCreatedAt(Date createdAt)
The timestamp when the instance was created (1479734909.17
) in Unix time format.
createdAt
- The timestamp when the instance was created (1479734909.17
) in Unix time format.public void setLocation(ResourceLocation location)
The region name and Availability Zone where the instance is located.
location
- The region name and Availability Zone where the instance is located.public ResourceLocation getLocation()
The region name and Availability Zone where the instance is located.
public Instance withLocation(ResourceLocation location)
The region name and Availability Zone where the instance is located.
location
- The region name and Availability Zone where the instance is located.public void setResourceType(String resourceType)
The type of resource (usually Instance
).
resourceType
- The type of resource (usually Instance
).ResourceType
public String getResourceType()
The type of resource (usually Instance
).
Instance
).ResourceType
public Instance withResourceType(String resourceType)
The type of resource (usually Instance
).
resourceType
- The type of resource (usually Instance
).ResourceType
public void setResourceType(ResourceType resourceType)
The type of resource (usually Instance
).
resourceType
- The type of resource (usually Instance
).ResourceType
public Instance withResourceType(ResourceType resourceType)
The type of resource (usually Instance
).
resourceType
- The type of resource (usually Instance
).ResourceType
public List<Tag> getTags()
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
public void setTags(Collection<Tag> tags)
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
tags
- The tag keys and optional values for the resource. For more information about tags in Lightsail, see the
Amazon Lightsail
Developer Guide.public Instance withTags(Tag... tags)
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
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.
tags
- The tag keys and optional values for the resource. For more information about tags in Lightsail, see the
Amazon Lightsail
Developer Guide.public Instance withTags(Collection<Tag> tags)
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
tags
- The tag keys and optional values for the resource. For more information about tags in Lightsail, see the
Amazon Lightsail
Developer Guide.public void setBlueprintId(String blueprintId)
The blueprint ID (amazon_linux_2023
).
blueprintId
- The blueprint ID (amazon_linux_2023
).public String getBlueprintId()
The blueprint ID (amazon_linux_2023
).
amazon_linux_2023
).public Instance withBlueprintId(String blueprintId)
The blueprint ID (amazon_linux_2023
).
blueprintId
- The blueprint ID (amazon_linux_2023
).public void setBlueprintName(String blueprintName)
The friendly name of the blueprint (Amazon Linux 2023
).
blueprintName
- The friendly name of the blueprint (Amazon Linux 2023
).public String getBlueprintName()
The friendly name of the blueprint (Amazon Linux 2023
).
Amazon Linux 2023
).public Instance withBlueprintName(String blueprintName)
The friendly name of the blueprint (Amazon Linux 2023
).
blueprintName
- The friendly name of the blueprint (Amazon Linux 2023
).public void setBundleId(String bundleId)
The bundle for the instance (micro_x_x
).
bundleId
- The bundle for the instance (micro_x_x
).public String getBundleId()
The bundle for the instance (micro_x_x
).
micro_x_x
).public Instance withBundleId(String bundleId)
The bundle for the instance (micro_x_x
).
bundleId
- The bundle for the instance (micro_x_x
).public List<AddOn> getAddOns()
An array of objects representing the add-ons enabled on the instance.
public void setAddOns(Collection<AddOn> addOns)
An array of objects representing the add-ons enabled on the instance.
addOns
- An array of objects representing the add-ons enabled on the instance.public Instance withAddOns(AddOn... addOns)
An array of objects representing the add-ons enabled on the instance.
NOTE: This method appends the values to the existing list (if any). Use
setAddOns(java.util.Collection)
or withAddOns(java.util.Collection)
if you want to override the
existing values.
addOns
- An array of objects representing the add-ons enabled on the instance.public Instance withAddOns(Collection<AddOn> addOns)
An array of objects representing the add-ons enabled on the instance.
addOns
- An array of objects representing the add-ons enabled on the instance.public void setIsStaticIp(Boolean isStaticIp)
A Boolean value indicating whether this instance has a static IP assigned to it.
isStaticIp
- A Boolean value indicating whether this instance has a static IP assigned to it.public Boolean getIsStaticIp()
A Boolean value indicating whether this instance has a static IP assigned to it.
public Instance withIsStaticIp(Boolean isStaticIp)
A Boolean value indicating whether this instance has a static IP assigned to it.
isStaticIp
- A Boolean value indicating whether this instance has a static IP assigned to it.public Boolean isStaticIp()
A Boolean value indicating whether this instance has a static IP assigned to it.
public void setPrivateIpAddress(String privateIpAddress)
The private IP address of the instance.
privateIpAddress
- The private IP address of the instance.public String getPrivateIpAddress()
The private IP address of the instance.
public Instance withPrivateIpAddress(String privateIpAddress)
The private IP address of the instance.
privateIpAddress
- The private IP address of the instance.public void setPublicIpAddress(String publicIpAddress)
The public IP address of the instance.
publicIpAddress
- The public IP address of the instance.public String getPublicIpAddress()
The public IP address of the instance.
public Instance withPublicIpAddress(String publicIpAddress)
The public IP address of the instance.
publicIpAddress
- The public IP address of the instance.public List<String> getIpv6Addresses()
The IPv6 addresses of the instance.
public void setIpv6Addresses(Collection<String> ipv6Addresses)
The IPv6 addresses of the instance.
ipv6Addresses
- The IPv6 addresses of the instance.public Instance withIpv6Addresses(String... ipv6Addresses)
The IPv6 addresses of the instance.
NOTE: This method appends the values to the existing list (if any). Use
setIpv6Addresses(java.util.Collection)
or withIpv6Addresses(java.util.Collection)
if you want
to override the existing values.
ipv6Addresses
- The IPv6 addresses of the instance.public Instance withIpv6Addresses(Collection<String> ipv6Addresses)
The IPv6 addresses of the instance.
ipv6Addresses
- The IPv6 addresses of the instance.public void setIpAddressType(String ipAddressType)
The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
ipAddressType
- The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
IpAddressType
public String getIpAddressType()
The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
IpAddressType
public Instance withIpAddressType(String ipAddressType)
The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
ipAddressType
- The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
IpAddressType
public void setIpAddressType(IpAddressType ipAddressType)
The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
ipAddressType
- The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
IpAddressType
public Instance withIpAddressType(IpAddressType ipAddressType)
The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
ipAddressType
- The IP address type of the instance.
The possible values are ipv4
for IPv4 only, ipv6
for IPv6 only, and
dualstack
for IPv4 and IPv6.
IpAddressType
public void setHardware(InstanceHardware hardware)
The size of the vCPU and the amount of RAM for the instance.
hardware
- The size of the vCPU and the amount of RAM for the instance.public InstanceHardware getHardware()
The size of the vCPU and the amount of RAM for the instance.
public Instance withHardware(InstanceHardware hardware)
The size of the vCPU and the amount of RAM for the instance.
hardware
- The size of the vCPU and the amount of RAM for the instance.public void setNetworking(InstanceNetworking networking)
Information about the public ports and monthly data transfer rates for the instance.
networking
- Information about the public ports and monthly data transfer rates for the instance.public InstanceNetworking getNetworking()
Information about the public ports and monthly data transfer rates for the instance.
public Instance withNetworking(InstanceNetworking networking)
Information about the public ports and monthly data transfer rates for the instance.
networking
- Information about the public ports and monthly data transfer rates for the instance.public void setState(InstanceState state)
The status code and the state (running
) for the instance.
state
- The status code and the state (running
) for the instance.public InstanceState getState()
The status code and the state (running
) for the instance.
running
) for the instance.public Instance withState(InstanceState state)
The status code and the state (running
) for the instance.
state
- The status code and the state (running
) for the instance.public void setUsername(String username)
The user name for connecting to the instance (ec2-user
).
username
- The user name for connecting to the instance (ec2-user
).public String getUsername()
The user name for connecting to the instance (ec2-user
).
ec2-user
).public Instance withUsername(String username)
The user name for connecting to the instance (ec2-user
).
username
- The user name for connecting to the instance (ec2-user
).public void setSshKeyName(String sshKeyName)
The name of the SSH key being used to connect to the instance (LightsailDefaultKeyPair
).
sshKeyName
- The name of the SSH key being used to connect to the instance (LightsailDefaultKeyPair
).public String getSshKeyName()
The name of the SSH key being used to connect to the instance (LightsailDefaultKeyPair
).
LightsailDefaultKeyPair
).public Instance withSshKeyName(String sshKeyName)
The name of the SSH key being used to connect to the instance (LightsailDefaultKeyPair
).
sshKeyName
- The name of the SSH key being used to connect to the instance (LightsailDefaultKeyPair
).public void setMetadataOptions(InstanceMetadataOptions metadataOptions)
The metadata options for the Amazon Lightsail instance.
metadataOptions
- The metadata options for the Amazon Lightsail instance.public InstanceMetadataOptions getMetadataOptions()
The metadata options for the Amazon Lightsail instance.
public Instance withMetadataOptions(InstanceMetadataOptions metadataOptions)
The metadata options for the Amazon Lightsail instance.
metadataOptions
- The metadata options for the Amazon Lightsail instance.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.