Class Instance
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Instance.Builder,Instance>
Describes an instance (a virtual private server).
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionaddOns()An array of objects representing the add-ons enabled on the instance.final Stringarn()The Amazon Resource Name (ARN) of the instance (arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE).final StringThe blueprint ID (amazon_linux_2023).final StringThe friendly name of the blueprint (Amazon Linux 2023).static Instance.Builderbuilder()final StringbundleId()The bundle for the instance (micro_x_x).final InstantThe timestamp when the instance was created (1479734909.17) in Unix time format.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final InstanceHardwarehardware()The size of the vCPU and the amount of RAM for the instance.final booleanFor responses, this returns true if the service returned a value for the AddOns property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the Ipv6Addresses property.final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final IpAddressTypeThe IP address type of the instance.final StringThe IP address type of the instance.The IPv6 addresses of the instance.final BooleanA Boolean value indicating whether this instance has a static IP assigned to it.final ResourceLocationlocation()The region name and Availability Zone where the instance is located.final InstanceMetadataOptionsThe metadata options for the Amazon Lightsail instance.final Stringname()The name the user gave the instance (Amazon_Linux_2023-1).final InstanceNetworkingInformation about the public ports and monthly data transfer rates for the instance.final StringThe private IP address of the instance.final StringThe public IP address of the instance.final ResourceTypeThe type of resource (usuallyInstance).final StringThe type of resource (usuallyInstance).static Class<? extends Instance.Builder> final StringThe name of the SSH key being used to connect to the instance (LightsailDefaultKeyPair).final InstanceStatestate()The status code and the state (running) for the instance.final StringThe support code.tags()The tag keys and optional values for the resource.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final Stringusername()The user name for connecting to the instance (ec2-user).Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
name
The name the user gave the instance (
Amazon_Linux_2023-1).- Returns:
- The name the user gave the instance (
Amazon_Linux_2023-1).
-
arn
The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE).- Returns:
- The Amazon Resource Name (ARN) of the instance (
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE).
-
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.
- Returns:
- 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.
-
createdAt
The timestamp when the instance was created (
1479734909.17) in Unix time format.- Returns:
- The timestamp when the instance was created (
1479734909.17) in Unix time format.
-
location
The region name and Availability Zone where the instance is located.
- Returns:
- The region name and Availability Zone where the instance is located.
-
resourceType
The type of resource (usually
Instance).If the service returns an enum value that is not available in the current SDK version,
resourceTypewill returnResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromresourceTypeAsString().- Returns:
- The type of resource (usually
Instance). - See Also:
-
resourceTypeAsString
The type of resource (usually
Instance).If the service returns an enum value that is not available in the current SDK version,
resourceTypewill returnResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromresourceTypeAsString().- Returns:
- The type of resource (usually
Instance). - See Also:
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
-
blueprintId
The blueprint ID (
amazon_linux_2023).- Returns:
- The blueprint ID (
amazon_linux_2023).
-
blueprintName
The friendly name of the blueprint (
Amazon Linux 2023).- Returns:
- The friendly name of the blueprint (
Amazon Linux 2023).
-
bundleId
The bundle for the instance (
micro_x_x).- Returns:
- The bundle for the instance (
micro_x_x).
-
hasAddOns
public final boolean hasAddOns()For responses, this returns true if the service returned a value for the AddOns property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
addOns
An array of objects representing the add-ons enabled on the instance.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAddOns()method.- Returns:
- An array of objects representing the add-ons enabled on the instance.
-
isStaticIp
A Boolean value indicating whether this instance has a static IP assigned to it.
- Returns:
- A Boolean value indicating whether this instance has a static IP assigned to it.
-
privateIpAddress
The private IP address of the instance.
- Returns:
- The private IP address of the instance.
-
publicIpAddress
The public IP address of the instance.
- Returns:
- The public IP address of the instance.
-
hasIpv6Addresses
public final boolean hasIpv6Addresses()For responses, this returns true if the service returned a value for the Ipv6Addresses property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
ipv6Addresses
The IPv6 addresses of the instance.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasIpv6Addresses()method.- Returns:
- The IPv6 addresses of the instance.
-
ipAddressType
The IP address type of the instance.
The possible values are
ipv4for IPv4 only,ipv6for IPv6 only, anddualstackfor IPv4 and IPv6.If the service returns an enum value that is not available in the current SDK version,
ipAddressTypewill returnIpAddressType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromipAddressTypeAsString().- Returns:
- The IP address type of the instance.
The possible values are
ipv4for IPv4 only,ipv6for IPv6 only, anddualstackfor IPv4 and IPv6. - See Also:
-
ipAddressTypeAsString
The IP address type of the instance.
The possible values are
ipv4for IPv4 only,ipv6for IPv6 only, anddualstackfor IPv4 and IPv6.If the service returns an enum value that is not available in the current SDK version,
ipAddressTypewill returnIpAddressType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromipAddressTypeAsString().- Returns:
- The IP address type of the instance.
The possible values are
ipv4for IPv4 only,ipv6for IPv6 only, anddualstackfor IPv4 and IPv6. - See Also:
-
hardware
The size of the vCPU and the amount of RAM for the instance.
- Returns:
- The size of the vCPU and the amount of RAM for the instance.
-
networking
Information about the public ports and monthly data transfer rates for the instance.
- Returns:
- Information about the public ports and monthly data transfer rates for the instance.
-
state
The status code and the state (
running) for the instance.- Returns:
- The status code and the state (
running) for the instance.
-
username
The user name for connecting to the instance (
ec2-user).- Returns:
- The user name for connecting to the instance (
ec2-user).
-
sshKeyName
The name of the SSH key being used to connect to the instance (
LightsailDefaultKeyPair).- Returns:
- The name of the SSH key being used to connect to the instance (
LightsailDefaultKeyPair).
-
metadataOptions
The metadata options for the Amazon Lightsail instance.
- Returns:
- The metadata options for the Amazon Lightsail instance.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Instance.Builder,Instance> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-