@Generated(value="software.amazon.awssdk:codegen") public final class Disk extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Disk.Builder,Disk>
Describes a block storage disk.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Disk.Builder |
| Modifier and Type | Method and Description |
|---|---|
List<AddOn> |
addOns()
An array of objects representing the add-ons enabled on the disk.
|
String |
arn()
The Amazon Resource Name (ARN) of the disk.
|
String |
attachedTo()
The resources to which the disk is attached.
|
String |
attachmentState()
Deprecated.
|
static Disk.Builder |
builder() |
Instant |
createdAt()
The date when the disk was created.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
Integer |
gbInUse()
Deprecated.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasAddOns()
For responses, this returns true if the service returned a value for the AddOns property.
|
int |
hashCode() |
boolean |
hasTags()
For responses, this returns true if the service returned a value for the Tags property.
|
Integer |
iops()
The input/output operations per second (IOPS) of the disk.
|
Boolean |
isAttached()
A Boolean value indicating whether the disk is attached.
|
Boolean |
isSystemDisk()
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
|
ResourceLocation |
location()
The AWS Region and Availability Zone where the disk is located.
|
String |
name()
The unique name of the disk.
|
String |
path()
The disk path.
|
ResourceType |
resourceType()
The Lightsail resource type (e.g.,
Disk). |
String |
resourceTypeAsString()
The Lightsail resource type (e.g.,
Disk). |
List<SdkField<?>> |
sdkFields() |
static Class<? extends Disk.Builder> |
serializableBuilderClass() |
Integer |
sizeInGb()
The size of the disk in GB.
|
DiskState |
state()
Describes the status of the disk.
|
String |
stateAsString()
Describes the status of the disk.
|
String |
supportCode()
The support code.
|
List<Tag> |
tags()
The tag keys and optional values for the resource.
|
Disk.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String name()
The unique name of the disk.
public final String arn()
The Amazon Resource Name (ARN) of the disk.
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 date when the disk was created.
public final ResourceLocation location()
The AWS Region and Availability Zone where the disk is located.
public final ResourceType resourceType()
The Lightsail resource type (e.g., Disk).
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().
Disk).ResourceTypepublic final String resourceTypeAsString()
The Lightsail resource type (e.g., Disk).
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().
Disk).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 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 disk.
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 Integer sizeInGb()
The size of the disk in GB.
public final Boolean isSystemDisk()
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
public final Integer iops()
The input/output operations per second (IOPS) of the disk.
public final String path()
The disk path.
public final DiskState state()
Describes the status of the disk.
If the service returns an enum value that is not available in the current SDK version, state will return
DiskState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
stateAsString().
DiskStatepublic final String stateAsString()
Describes the status of the disk.
If the service returns an enum value that is not available in the current SDK version, state will return
DiskState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
stateAsString().
DiskStatepublic final String attachedTo()
The resources to which the disk is attached.
public final Boolean isAttached()
A Boolean value indicating whether the disk is attached.
@Deprecated public final String attachmentState()
(Deprecated) The attachment state of the disk.
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API
response. It is now deprecated, but still included in the response. Use isAttached instead.
In releases prior to November 14, 2017, this parameter returned attached for system disks in
the API response. It is now deprecated, but still included in the response. Use isAttached
instead.
@Deprecated public final Integer gbInUse()
(Deprecated) The number of GB in use by the disk.
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
public Disk.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<Disk.Builder,Disk>public static Disk.Builder builder()
public static Class<? extends Disk.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2022. All rights reserved.