Class InstanceSnapshot
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<InstanceSnapshot.Builder,InstanceSnapshot>
Describes an instance snapshot.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringarn()The Amazon Resource Name (ARN) of the snapshot (arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE).static InstanceSnapshot.Builderbuilder()final InstantThe timestamp when the snapshot was created (1479907467.024).final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.An array of disk objects containing information about all block storage disks.final StringThe blueprint ID from which you created the snapshot (amazon_linux_2023).final StringThe bundle ID from which you created the snapshot (micro_x_x).final StringThe Amazon Resource Name (ARN) of the instance from which the snapshot was created (arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE).final StringThe instance from which the snapshot was created.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the FromAttachedDisks property.final inthashCode()final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final BooleanA Boolean value indicating whether the snapshot was created from an automatic snapshot.final ResourceLocationlocation()The region name and Availability Zone where you created the snapshot.final Stringname()The name of the snapshot.final Stringprogress()The progress of the snapshot.final ResourceTypeThe type of resource (usuallyInstanceSnapshot).final StringThe type of resource (usuallyInstanceSnapshot).static Class<? extends InstanceSnapshot.Builder> final IntegersizeInGb()The size in GB of the SSD.final InstanceSnapshotStatestate()The state the snapshot is in.final StringThe state the snapshot is in.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.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
name
-
arn
The Amazon Resource Name (ARN) of the snapshot (
arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE).- Returns:
- The Amazon Resource Name (ARN) of the snapshot (
arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-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 snapshot was created (
1479907467.024).- Returns:
- The timestamp when the snapshot was created (
1479907467.024).
-
location
The region name and Availability Zone where you created the snapshot.
- Returns:
- The region name and Availability Zone where you created the snapshot.
-
resourceType
The type of resource (usually
InstanceSnapshot).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
InstanceSnapshot). - See Also:
-
resourceTypeAsString
The type of resource (usually
InstanceSnapshot).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
InstanceSnapshot). - 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.
-
state
The state the snapshot is in.
If the service returns an enum value that is not available in the current SDK version,
statewill returnInstanceSnapshotState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The state the snapshot is in.
- See Also:
-
stateAsString
The state the snapshot is in.
If the service returns an enum value that is not available in the current SDK version,
statewill returnInstanceSnapshotState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The state the snapshot is in.
- See Also:
-
progress
The progress of the snapshot.
This is populated only for disk snapshots, and is
nullfor instance snapshots.- Returns:
- The progress of the snapshot.
This is populated only for disk snapshots, and is
nullfor instance snapshots.
-
hasFromAttachedDisks
public final boolean hasFromAttachedDisks()For responses, this returns true if the service returned a value for the FromAttachedDisks 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. -
fromAttachedDisks
An array of disk objects containing information about all block storage disks.
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
hasFromAttachedDisks()method.- Returns:
- An array of disk objects containing information about all block storage disks.
-
fromInstanceName
The instance from which the snapshot was created.
- Returns:
- The instance from which the snapshot was created.
-
fromInstanceArn
The Amazon Resource Name (ARN) of the instance from which the snapshot was created (
arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE).- Returns:
- The Amazon Resource Name (ARN) of the instance from which the snapshot was created (
arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE).
-
fromBlueprintId
The blueprint ID from which you created the snapshot (
amazon_linux_2023). A blueprint is a virtual private server (or instance) image used to create instances quickly.- Returns:
- The blueprint ID from which you created the snapshot (
amazon_linux_2023). A blueprint is a virtual private server (or instance) image used to create instances quickly.
-
fromBundleId
The bundle ID from which you created the snapshot (
micro_x_x).- Returns:
- The bundle ID from which you created the snapshot (
micro_x_x).
-
isFromAutoSnapshot
A Boolean value indicating whether the snapshot was created from an automatic snapshot.
- Returns:
- A Boolean value indicating whether the snapshot was created from an automatic snapshot.
-
sizeInGb
-
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<InstanceSnapshot.Builder,InstanceSnapshot> - 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
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-