@Generated(value="software.amazon.awssdk:codegen") public final class Instance extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Instance.Builder,Instance>
Describes an instance (a virtual private server).
| Modifier and Type | Class and Description |
|---|---|
static interface |
Instance.Builder |
| Modifier and Type | Method and Description |
|---|---|
List<AddOn> |
addOns()
An array of objects representing the add-ons enabled on the instance.
|
String |
arn()
The Amazon Resource Name (ARN) of the instance (e.g.,
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). |
String |
blueprintId()
The blueprint ID (e.g.,
os_amlinux_2016_03). |
String |
blueprintName()
The friendly name of the blueprint (e.g.,
Amazon Linux). |
static Instance.Builder |
builder() |
String |
bundleId()
The bundle for the instance (e.g.,
micro_1_0). |
Instant |
createdAt()
The timestamp when the instance was created (e.g.,
1479734909.17) in Unix time format. |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
InstanceHardware |
hardware()
The size of the vCPU and the amount of RAM for the instance.
|
boolean |
hasAddOns()
For responses, this returns true if the service returned a value for the AddOns property.
|
int |
hashCode() |
boolean |
hasIpv6Addresses()
For responses, this returns true if the service returned a value for the Ipv6Addresses property.
|
boolean |
hasTags()
For responses, this returns true if the service returned a value for the Tags property.
|
IpAddressType |
ipAddressType()
The IP address type of the instance.
|
String |
ipAddressTypeAsString()
The IP address type of the instance.
|
List<String> |
ipv6Addresses()
The IPv6 addresses of the instance.
|
Boolean |
isStaticIp()
A Boolean value indicating whether this instance has a static IP assigned to it.
|
ResourceLocation |
location()
The region name and Availability Zone where the instance is located.
|
InstanceMetadataOptions |
metadataOptions()
The metadata options for the Amazon Lightsail instance.
|
String |
name()
The name the user gave the instance (e.g.,
Amazon_Linux-1GB-Ohio-1). |
InstanceNetworking |
networking()
Information about the public ports and monthly data transfer rates for the instance.
|
String |
privateIpAddress()
The private IP address of the instance.
|
String |
publicIpAddress()
The public IP address of the instance.
|
ResourceType |
resourceType()
The type of resource (usually
Instance). |
String |
resourceTypeAsString()
The type of resource (usually
Instance). |
List<SdkField<?>> |
sdkFields() |
static Class<? extends Instance.Builder> |
serializableBuilderClass() |
String |
sshKeyName()
The name of the SSH key being used to connect to the instance (e.g.,
LightsailDefaultKeyPair). |
InstanceState |
state()
The status code and the state (e.g.,
running) for the instance. |
String |
supportCode()
The support code.
|
List<Tag> |
tags()
The tag keys and optional values for the resource.
|
Instance.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
String |
username()
The user name for connecting to the instance (e.g.,
ec2-user). |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String name()
The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1).
Amazon_Linux-1GB-Ohio-1).public final String arn()
The Amazon Resource Name (ARN) of the instance (e.g.,
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 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.
public final Instant createdAt()
The timestamp when the instance was created (e.g., 1479734909.17) in Unix time format.
1479734909.17) in Unix time format.public final ResourceLocation location()
The region name and Availability Zone where the instance is located.
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, resourceType will
return ResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
resourceTypeAsString().
Instance).ResourceTypepublic 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, resourceType will
return ResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
resourceTypeAsString().
Instance).ResourceTypepublic final boolean hasTags()
isEmpty() 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.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.
public final String blueprintId()
The blueprint ID (e.g., os_amlinux_2016_03).
os_amlinux_2016_03).public final String blueprintName()
The friendly name of the blueprint (e.g., Amazon Linux).
Amazon Linux).public final String bundleId()
The bundle for the instance (e.g., micro_1_0).
micro_1_0).public final boolean hasAddOns()
isEmpty() 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.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.
public final Boolean isStaticIp()
A Boolean value indicating whether this instance has a static IP assigned to it.
public final String privateIpAddress()
The private IP address of the instance.
public final String publicIpAddress()
The public IP address of the instance.
public final boolean hasIpv6Addresses()
isEmpty() 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.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.
public final IpAddressType ipAddressType()
The IP address type of the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
If the service returns an enum value that is not available in the current SDK version, ipAddressType
will return IpAddressType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
ipAddressTypeAsString().
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
IpAddressTypepublic final String ipAddressTypeAsString()
The IP address type of the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
If the service returns an enum value that is not available in the current SDK version, ipAddressType
will return IpAddressType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
ipAddressTypeAsString().
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
IpAddressTypepublic final InstanceHardware hardware()
The size of the vCPU and the amount of RAM for the instance.
public final InstanceNetworking networking()
Information about the public ports and monthly data transfer rates for the instance.
public final InstanceState state()
The status code and the state (e.g., running) for the instance.
running) for the instance.public final String username()
The user name for connecting to the instance (e.g., ec2-user).
ec2-user).public final String sshKeyName()
The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair).
LightsailDefaultKeyPair
).public final InstanceMetadataOptions metadataOptions()
The metadata options for the Amazon Lightsail instance.
public Instance.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<Instance.Builder,Instance>public static Instance.Builder builder()
public static Class<? extends Instance.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2022. All rights reserved.