Class CfnDisk
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::Lightsail::Disk
.
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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
AddOn
is a property of the AWS::Lightsail::Disk resource.static interface
AutoSnapshotAddOn
is a property of the AddOn property.static final class
A fluent builder forCfnDisk
.static interface
Example:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAn array of add-ons for the disk.The instance 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 to an instance.The path of the disk.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.AWS::Lightsail::Disk.Location
.The size of the disk in GB.getTags()
An array of key-value pairs to apply to this resource.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
An array of add-ons for the disk.void
setAddOns
(IResolvable value) An array of add-ons for the disk.void
setAvailabilityZone
(String value) The AWS Region and Availability Zone location for the disk (for example,us-east-1a
).void
setDiskName
(String value) The name of the disk.void
setLocation
(IResolvable value) AWS::Lightsail::Disk.Location
.void
AWS::Lightsail::Disk.Location
.void
setSizeInGb
(Number value) The size of the disk in GB.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 Construct scope, @NotNull String id, @NotNull CfnDiskProps props) Create a newAWS::Lightsail::Disk
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrAttachedTo
The instance to which the disk is attached. -
getAttrAttachmentState
(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. UseisAttached
instead. -
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 to an instance. -
getAttrLocationAvailabilityZone
-
getAttrLocationRegionName
-
getAttrPath
The path of the disk. -
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:
getCfnProperties
in classCfnResource
-
getTags
An array of key-value pairs to apply to this resource.For more information, see Tag in the AWS CloudFormation User Guide .
The
Value
ofTags
is optional for Lightsail resources. -
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.If the disk has an add-on enabled when performing a delete disk request, the add-on is automatically disabled before the disk is deleted.
-
setAddOns
An array of add-ons for the disk.If the disk has an add-on enabled when performing a delete disk request, the add-on is automatically disabled before the disk is deleted.
-
setAddOns
An array of add-ons for the disk.If the disk has an add-on enabled when performing a delete disk request, the add-on is automatically disabled before the disk is deleted.
-
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
AWS::Lightsail::Disk.Location
. -
setLocation
AWS::Lightsail::Disk.Location
. -
setLocation
AWS::Lightsail::Disk.Location
.
-