@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.653Z") @Stability(value=Stable) public class CfnDisk extends CfnResource implements IInspectable
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")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnDisk.AddOnProperty
`AddOn` is a property of the [AWS::Lightsail::Disk](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-disk.html) resource.
|
static interface |
CfnDisk.AutoSnapshotAddOnProperty
`AutoSnapshotAddOn` is a property of the [AddOn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-disk-addon.html) property.
|
static class |
CfnDisk.Builder
A fluent builder for
CfnDisk. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnDisk(software.constructs.Construct scope,
String id,
CfnDiskProps props)
Create a new `AWS::Lightsail::Disk`.
|
protected |
CfnDisk(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDisk(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAddOns()
An array of add-ons for the disk.
|
String |
getAttrAttachedTo()
The instance to which the disk is attached.
|
String |
getAttrAttachmentState()
(Deprecated) The attachment state of the disk.
|
String |
getAttrDiskArn()
The Amazon Resource Name (ARN) of the disk.
|
Number |
getAttrIops()
The input/output operations per second (IOPS) of the disk.
|
IResolvable |
getAttrIsAttached()
A Boolean value indicating whether the disk is attached to an instance.
|
String |
getAttrPath()
The path of the disk.
|
String |
getAttrResourceType()
The resource type of the disk (for example, `Disk` ).
|
String |
getAttrState()
The state of the disk (for example, `in-use` ).
|
String |
getAttrSupportCode()
The support code of the disk.
|
String |
getAvailabilityZone()
The AWS Region and Availability Zone location for the disk (for example, `us-east-1a` ).
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDiskName()
The name of the disk.
|
Number |
getSizeInGb()
The size of the disk in GB.
|
TagManager |
getTags()
An array of key-value pairs to apply to this resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAddOns(IResolvable value)
An array of add-ons for the disk.
|
void |
setAddOns(List<Object> 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 |
setSizeInGb(Number value)
The size of the disk in GB.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnDisk(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDisk(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnDisk(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnDiskProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrAttachedTo()
@Stability(value=Stable) @NotNull public String getAttrAttachmentState()
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.
@Stability(value=Stable) @NotNull public String getAttrDiskArn()
@Stability(value=Stable) @NotNull public Number getAttrIops()
@Stability(value=Stable) @NotNull public IResolvable getAttrIsAttached()
@Stability(value=Stable) @NotNull public String getAttrPath()
@Stability(value=Stable) @NotNull public String getAttrResourceType()
@Stability(value=Stable) @NotNull public String getAttrState()
@Stability(value=Stable) @NotNull public String getAttrSupportCode()
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.
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.
@Stability(value=Stable) @NotNull public String getDiskName()
@Stability(value=Stable)
public void setDiskName(@NotNull
String value)
@Stability(value=Stable) @NotNull public Number getSizeInGb()
@Stability(value=Stable)
public void setSizeInGb(@NotNull
Number value)
@Stability(value=Stable) @Nullable public Object getAddOns()
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.
@Stability(value=Stable)
public void setAddOns(@Nullable
IResolvable value)
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.
@Stability(value=Stable)
public void setAddOns(@Nullable
List<Object> value)
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.
@Stability(value=Stable) @Nullable public String getAvailabilityZone()
@Stability(value=Stable)
public void setAvailabilityZone(@Nullable
String value)
Copyright © 2022. All rights reserved.