@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:17.534Z") 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 . |
static interface |
CfnDisk.LocationProperty
Example:
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDisk(Construct scope,
java.lang.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 |
---|---|
java.lang.Object |
getAddOns()
An array of add-ons for the disk.
|
java.lang.String |
getAttrAttachedTo()
The instance to which the disk is attached.
|
java.lang.String |
getAttrAttachmentState()
(Deprecated) The attachment state of the disk.
|
java.lang.String |
getAttrDiskArn()
The Amazon Resource Name (ARN) of the disk.
|
java.lang.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.
|
java.lang.String |
getAttrLocationAvailabilityZone() |
java.lang.String |
getAttrLocationRegionName() |
java.lang.String |
getAttrPath()
The path of the disk.
|
java.lang.String |
getAttrResourceType()
The resource type of the disk (for example, `Disk` ).
|
java.lang.String |
getAttrState()
The state of the disk (for example, `in-use` ).
|
java.lang.String |
getAttrSupportCode()
The support code of the disk.
|
java.lang.String |
getAvailabilityZone()
The AWS Region and Availability Zone location for the disk (for example, `us-east-1a` ).
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDiskName()
The name of the disk.
|
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAddOns(IResolvable value)
An array of add-ons for the disk.
|
void |
setAddOns(java.util.List<java.lang.Object> value)
An array of add-ons for the disk.
|
void |
setAvailabilityZone(java.lang.String value)
The AWS Region and Availability Zone location for the disk (for example, `us-east-1a` ).
|
void |
setDiskName(java.lang.String value)
The name of the disk.
|
void |
setSizeInGb(java.lang.Number value)
The size of the disk in GB.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDisk(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDisk(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDisk(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrAttachedTo()
public java.lang.String getAttrAttachmentState()
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.
public java.lang.String getAttrDiskArn()
public java.lang.Number getAttrIops()
public IResolvable getAttrIsAttached()
public java.lang.String getAttrLocationAvailabilityZone()
public java.lang.String getAttrLocationRegionName()
public java.lang.String getAttrPath()
public java.lang.String getAttrResourceType()
public java.lang.String getAttrState()
public java.lang.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.
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For more information, see Tag in the AWS CloudFormation User Guide .
The
Value
ofTags
is optional for Lightsail resources.
public java.lang.String getDiskName()
public void setDiskName(java.lang.String value)
public java.lang.Number getSizeInGb()
public void setSizeInGb(java.lang.Number value)
public java.lang.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.
public void setAddOns(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.
public void setAddOns(java.util.List<java.lang.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.
public java.lang.String getAvailabilityZone()
public void setAvailabilityZone(java.lang.String value)