Class CfnDisk
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lightsail.CfnDisk
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IDiskRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:39.712Z")
@Stability(Stable)
public class CfnDisk
extends CfnResource
implements IInspectable, IDiskRef, ITaggable
The
AWS::Lightsail::Disk resource specifies a disk that can be attached to an Amazon Lightsail instance that is in the same AWS Region and Availability Zone.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lightsail.*;
CfnDisk cfnDisk = CfnDisk.Builder.create(this, "MyCfnDisk")
.diskName("diskName")
.sizeInGb(123)
// the properties below are optional
.addOns(List.of(AddOnProperty.builder()
.addOnType("addOnType")
// the properties below are optional
.autoSnapshotAddOnRequest(AutoSnapshotAddOnProperty.builder()
.snapshotTimeOfDay("snapshotTimeOfDay")
.build())
.status("status")
.build()))
.availabilityZone("availabilityZone")
.location(LocationProperty.builder()
.availabilityZone("availabilityZone")
.regionName("regionName")
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAddOnis a property of the AWS::Lightsail::Disk resource.static interfaceAutoSnapshotAddOnis a property of the AddOn property.static final classA fluent builder forCfnDisk.static interfaceThe AWS Region and Availability Zone where the disk is located.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.lightsail.IDiskRef
IDiskRef.Jsii$Default, IDiskRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDisk(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDisk(software.amazon.jsii.JsiiObjectRef objRef) CfnDisk(software.constructs.Construct scope, String id, CfnDiskProps props) Create a newAWS::Lightsail::Disk. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForDisk(IDiskRef resource) An array of add-ons for the disk.The resources to which the disk is attached.(Deprecated) The attachment state of the disk.The Amazon Resource Name (ARN) of the disk.The input/output operations per second (IOPS) of the disk.A Boolean value indicating whether the disk is attached.The Availability Zone where the disk is located.The AWS Region where the disk is located.The disk path.The resource type of the disk (for example,Disk).The state of the disk (for example,in-use).The support code of the disk.The AWS Region and Availability Zone location for the disk (for example,us-east-1a).The name of the disk.A reference to a Disk resource.The AWS Region and Availability Zone where the disk is located.The size of the disk in GB.getTags()Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnDisk.renderProperties(Map<String, Object> props) voidAn array of add-ons for the disk.voidsetAddOns(IResolvable value) An array of add-ons for the disk.voidsetAvailabilityZone(String value) The AWS Region and Availability Zone location for the disk (for example,us-east-1a).voidsetDiskName(String value) The name of the disk.voidsetLocation(IResolvable value) The AWS Region and Availability Zone where the disk is located.voidThe AWS Region and Availability Zone where the disk is located.voidsetSizeInGb(Number value) The size of the disk in GB.voidsetTagsRaw(List<CfnTag> value) An array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDisk
protected CfnDisk(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDisk
protected CfnDisk(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDisk
@Stability(Stable) public CfnDisk(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDiskProps props) Create a newAWS::Lightsail::Disk.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForDisk
- Parameters:
resource- This parameter is required.
-
isCfnDisk
Checks whether the given object is a CfnDisk.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAttachedTo
The resources to which the disk is attached. -
getAttrAttachmentState
(Deprecated) The attachment state of the disk.In releases prior to November 14, 2017, this parameter returned
attachedfor system disks in the API response. It is now deprecated, but still included in the response. UseisAttachedinstead. -
getAttrDiskArn
The Amazon Resource Name (ARN) of the disk. -
getAttrIops
The input/output operations per second (IOPS) of the disk. -
getAttrIsAttached
A Boolean value indicating whether the disk is attached. -
getAttrLocationAvailabilityZone
The Availability Zone where the disk is located. -
getAttrLocationRegionName
The AWS Region where the disk is located. -
getAttrPath
The disk path. -
getAttrResourceType
The resource type of the disk (for example,Disk). -
getAttrState
The state of the disk (for example,in-use). -
getAttrSupportCode
The support code of the disk.Include this code in your email to support when you have questions about a disk or another resource in Lightsail . This code helps our support team to look up your Lightsail information.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDiskRef
A reference to a Disk resource.- Specified by:
getDiskRefin interfaceIDiskRef
-
getTags
Tag Manager which manages the tags for this resource. -
getDiskName
The name of the disk. -
setDiskName
The name of the disk. -
getSizeInGb
The size of the disk in GB. -
setSizeInGb
The size of the disk in GB. -
getAddOns
An array of add-ons for the disk.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnDisk.AddOnProperty> -
setAddOns
An array of add-ons for the disk. -
setAddOns
An array of add-ons for the disk. -
getAvailabilityZone
The AWS Region and Availability Zone location for the disk (for example,us-east-1a). -
setAvailabilityZone
The AWS Region and Availability Zone location for the disk (for example,us-east-1a). -
getLocation
The AWS Region and Availability Zone where the disk is located.Returns union: either
IResolvableorCfnDisk.LocationProperty -
setLocation
The AWS Region and Availability Zone where the disk is located. -
setLocation
The AWS Region and Availability Zone where the disk is located. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource.
-