Class CfnDiskProps.Builder
java.lang.Object
software.amazon.awscdk.services.lightsail.CfnDiskProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDiskProps>
- Enclosing interface:
CfnDiskProps
@Stability(Stable)
public static final class CfnDiskProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnDiskProps>
A builder for
CfnDiskProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnDiskProps.getAddOns()
addOns
(IResolvable addOns) Sets the value ofCfnDiskProps.getAddOns()
availabilityZone
(String availabilityZone) Sets the value ofCfnDiskProps.getAvailabilityZone()
build()
Builds the configured instance.Sets the value ofCfnDiskProps.getDiskName()
location
(IResolvable location) Sets the value ofCfnDiskProps.getLocation()
location
(CfnDisk.LocationProperty location) Sets the value ofCfnDiskProps.getLocation()
Sets the value ofCfnDiskProps.getSizeInGb()
Sets the value ofCfnDiskProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
diskName
Sets the value ofCfnDiskProps.getDiskName()
- Parameters:
diskName
- The name of the disk. This parameter is required.- Returns:
this
-
sizeInGb
Sets the value ofCfnDiskProps.getSizeInGb()
- Parameters:
sizeInGb
- The size of the disk in GB. This parameter is required.- Returns:
this
-
addOns
Sets the value ofCfnDiskProps.getAddOns()
- Parameters:
addOns
- 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.
- Returns:
this
-
addOns
Sets the value ofCfnDiskProps.getAddOns()
- Parameters:
addOns
- 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.
- Returns:
this
-
availabilityZone
Sets the value ofCfnDiskProps.getAvailabilityZone()
- Parameters:
availabilityZone
- The AWS Region and Availability Zone location for the disk (for example,us-east-1a
).- Returns:
this
-
location
Sets the value ofCfnDiskProps.getLocation()
- Parameters:
location
- The AWS Region and Availability Zone where the disk is located.- Returns:
this
-
location
Sets the value ofCfnDiskProps.getLocation()
- Parameters:
location
- The AWS Region and Availability Zone where the disk is located.- Returns:
this
-
tags
Sets the value ofCfnDiskProps.getTags()
- Parameters:
tags
- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnDiskProps>
- Returns:
- a new instance of
CfnDiskProps
- Throws:
NullPointerException
- if any required attribute was not provided
-