Class Instance
- java.lang.Object
-
- software.amazon.awssdk.services.lightsail.model.Instance
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Instance.Builder,Instance>
@Generated("software.amazon.awssdk:codegen") public final class Instance extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Instance.Builder,Instance>
Describes an instance (a virtual private server).
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceInstance.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AddOn>addOns()An array of objects representing the add-ons enabled on the instance.Stringarn()The Amazon Resource Name (ARN) of the instance (arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE).StringblueprintId()The blueprint ID (os_amlinux_2016_03).StringblueprintName()The friendly name of the blueprint (Amazon Linux).static Instance.Builderbuilder()StringbundleId()The bundle for the instance (micro_1_0).InstantcreatedAt()The timestamp when the instance was created (1479734909.17) in Unix time format.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)InstanceHardwarehardware()The size of the vCPU and the amount of RAM for the instance.booleanhasAddOns()For responses, this returns true if the service returned a value for the AddOns property.inthashCode()booleanhasIpv6Addresses()For responses, this returns true if the service returned a value for the Ipv6Addresses property.booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.IpAddressTypeipAddressType()The IP address type of the instance.StringipAddressTypeAsString()The IP address type of the instance.List<String>ipv6Addresses()The IPv6 addresses of the instance.BooleanisStaticIp()A Boolean value indicating whether this instance has a static IP assigned to it.ResourceLocationlocation()The region name and Availability Zone where the instance is located.InstanceMetadataOptionsmetadataOptions()The metadata options for the Amazon Lightsail instance.Stringname()The name the user gave the instance (Amazon_Linux-1GB-Ohio-1).InstanceNetworkingnetworking()Information about the public ports and monthly data transfer rates for the instance.StringprivateIpAddress()The private IP address of the instance.StringpublicIpAddress()The public IP address of the instance.ResourceTyperesourceType()The type of resource (usuallyInstance).StringresourceTypeAsString()The type of resource (usuallyInstance).List<SdkField<?>>sdkFields()static Class<? extends Instance.Builder>serializableBuilderClass()StringsshKeyName()The name of the SSH key being used to connect to the instance (LightsailDefaultKeyPair).InstanceStatestate()The status code and the state (running) for the instance.StringsupportCode()The support code.List<Tag>tags()The tag keys and optional values for the resource.Instance.BuildertoBuilder()StringtoString()Returns a string representation of this object.Stringusername()The user name for connecting to the instance (ec2-user).-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
name
public final String name()
The name the user gave the instance (
Amazon_Linux-1GB-Ohio-1).- Returns:
- The name the user gave the instance (
Amazon_Linux-1GB-Ohio-1).
-
arn
public final String 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
public final 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.
- 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
public final Instant 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
public final ResourceLocation 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
public final ResourceType 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:
ResourceType
-
resourceTypeAsString
public final String 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:
ResourceType
-
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
public final List<Tag> 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
public final String blueprintId()
The blueprint ID (
os_amlinux_2016_03).- Returns:
- The blueprint ID (
os_amlinux_2016_03).
-
blueprintName
public final String blueprintName()
The friendly name of the blueprint (
Amazon Linux).- Returns:
- The friendly name of the blueprint (
Amazon Linux).
-
bundleId
public final String bundleId()
The bundle for the instance (
micro_1_0).- Returns:
- The bundle for the instance (
micro_1_0).
-
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
public final List<AddOn> 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
public final Boolean 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
public final String privateIpAddress()
The private IP address of the instance.
- Returns:
- The private IP address of the instance.
-
publicIpAddress
public final String 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
public final List<String> 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
public final IpAddressType ipAddressType()
The IP address type of the instance.
The possible values are
ipv4for IPv4 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, anddualstackfor IPv4 and IPv6. - See Also:
IpAddressType
-
ipAddressTypeAsString
public final String ipAddressTypeAsString()
The IP address type of the instance.
The possible values are
ipv4for IPv4 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, anddualstackfor IPv4 and IPv6. - See Also:
IpAddressType
-
hardware
public final InstanceHardware 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
public final InstanceNetworking 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
public final InstanceState state()
The status code and the state (
running) for the instance.- Returns:
- The status code and the state (
running) for the instance.
-
username
public final String username()
The user name for connecting to the instance (
ec2-user).- Returns:
- The user name for connecting to the instance (
ec2-user).
-
sshKeyName
public final String 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
public final InstanceMetadataOptions metadataOptions()
The metadata options for the Amazon Lightsail instance.
- Returns:
- The metadata options for the Amazon Lightsail instance.
-
toBuilder
public Instance.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Instance.Builder,Instance>
-
builder
public static Instance.Builder builder()
-
serializableBuilderClass
public static Class<? extends Instance.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-