@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.666Z") @Stability(value=Stable) public interface CfnInstanceProps extends software.amazon.jsii.JsiiSerializable
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.*;
CfnInstanceProps cfnInstanceProps = CfnInstanceProps.builder()
.blueprintId("blueprintId")
.bundleId("bundleId")
.instanceName("instanceName")
// 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")
.hardware(HardwareProperty.builder()
.cpuCount(123)
.disks(List.of(DiskProperty.builder()
.diskName("diskName")
.path("path")
// the properties below are optional
.attachedTo("attachedTo")
.attachmentState("attachmentState")
.iops(123)
.isSystemDisk(false)
.sizeInGb("sizeInGb")
.build()))
.ramSizeInGb(123)
.build())
.keyPairName("keyPairName")
.networking(NetworkingProperty.builder()
.ports(List.of(PortProperty.builder()
.accessDirection("accessDirection")
.accessFrom("accessFrom")
.accessType("accessType")
.cidrListAliases(List.of("cidrListAliases"))
.cidrs(List.of("cidrs"))
.commonName("commonName")
.fromPort(123)
.ipv6Cidrs(List.of("ipv6Cidrs"))
.protocol("protocol")
.toPort(123)
.build()))
// the properties below are optional
.monthlyTransfer(123)
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.userData("userData")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnInstanceProps.Builder
A builder for
CfnInstanceProps |
static class |
CfnInstanceProps.Jsii$Proxy
An implementation for
CfnInstanceProps |
| Modifier and Type | Method and Description |
|---|---|
static CfnInstanceProps.Builder |
builder() |
default Object |
getAddOns()
An array of add-ons for the instance.
|
default String |
getAvailabilityZone()
The Availability Zone for the instance.
|
String |
getBlueprintId()
The blueprint ID for the instance (for example, `os_amlinux_2016_03` ).
|
String |
getBundleId()
The bundle ID for the instance (for example, `micro_1_0` ).
|
default Object |
getHardware()
The hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.
|
String |
getInstanceName()
The name of the instance.
|
default String |
getKeyPairName()
The name of the key pair to use for the instance.
|
default Object |
getNetworking()
The public ports and the monthly amount of data transfer allocated for the instance.
|
default List<CfnTag> |
getTags()
An array of key-value pairs to apply to this resource.
|
default String |
getUserData()
The optional launch script for the instance.
|
@Stability(value=Stable) @NotNull String getBlueprintId()
@Stability(value=Stable) @NotNull String getBundleId()
@Stability(value=Stable) @NotNull String getInstanceName()
@Stability(value=Stable) @Nullable default Object getAddOns()
If the instance has an add-on enabled when performing a delete instance request, the add-on is automatically disabled before the instance is deleted.
@Stability(value=Stable) @Nullable default String getAvailabilityZone()
@Stability(value=Stable) @Nullable default Object getHardware()
The instance restarts when performing an attach disk or detach disk request. This resets the public IP address of your instance if a static IP isn't attached to it.
@Stability(value=Stable) @Nullable default String getKeyPairName()
If no key pair name is specified, the Regional Lightsail default key pair is used.
@Stability(value=Stable) @Nullable default Object getNetworking()
@Stability(value=Stable) @Nullable default List<CfnTag> getTags()
For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.
@Stability(value=Stable) @Nullable default String getUserData()
Specify a launch script to configure an instance with additional user data. For example, you might want to specify apt-get -y update as a launch script.
Depending on the blueprint of your instance, the command to get software on your instance varies. Amazon Linux and CentOS use
yum, Debian and Ubuntu useapt-get, and FreeBSD usespkg.
@Stability(value=Stable) static CfnInstanceProps.Builder builder()
CfnInstanceProps.Builder of CfnInstancePropsCopyright © 2022. All rights reserved.