Class CfnInstanceMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstanceMixinProps>
- Enclosing interface:
CfnInstanceMixinProps
CfnInstanceMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnInstanceMixinProps.getAddOns()addOns(IResolvable addOns) Sets the value ofCfnInstanceMixinProps.getAddOns()availabilityZone(String availabilityZone) Sets the value ofCfnInstanceMixinProps.getAvailabilityZone()blueprintId(String blueprintId) Sets the value ofCfnInstanceMixinProps.getBlueprintId()build()Builds the configured instance.Sets the value ofCfnInstanceMixinProps.getBundleId()Sets the value ofCfnInstanceMixinProps.getHardware()hardware(IResolvable hardware) Sets the value ofCfnInstanceMixinProps.getHardware()instanceName(String instanceName) Sets the value ofCfnInstanceMixinProps.getInstanceName()keyPairName(String keyPairName) Sets the value ofCfnInstanceMixinProps.getKeyPairName()Sets the value ofCfnInstanceMixinProps.getLocation()location(IResolvable location) Sets the value ofCfnInstanceMixinProps.getLocation()networking(CfnInstancePropsMixin.NetworkingProperty networking) Sets the value ofCfnInstanceMixinProps.getNetworking()networking(IResolvable networking) Sets the value ofCfnInstanceMixinProps.getNetworking()Sets the value ofCfnInstanceMixinProps.getState()state(IResolvable state) Sets the value ofCfnInstanceMixinProps.getState()Sets the value ofCfnInstanceMixinProps.getTags()Sets the value ofCfnInstanceMixinProps.getUserData()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addOns
Sets the value ofCfnInstanceMixinProps.getAddOns()- Parameters:
addOns- An array of add-ons for the instance.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.
- Returns:
this
-
addOns
Sets the value ofCfnInstanceMixinProps.getAddOns()- Parameters:
addOns- An array of add-ons for the instance.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.
- Returns:
this
-
availabilityZone
Sets the value ofCfnInstanceMixinProps.getAvailabilityZone()- Parameters:
availabilityZone- The Availability Zone for the instance.- Returns:
this
-
blueprintId
Sets the value ofCfnInstanceMixinProps.getBlueprintId()- Parameters:
blueprintId- The blueprint ID for the instance (for example,os_amlinux_2016_03).- Returns:
this
-
bundleId
Sets the value ofCfnInstanceMixinProps.getBundleId()- Parameters:
bundleId- The bundle ID for the instance (for example,micro_1_0).- Returns:
this
-
hardware
Sets the value ofCfnInstanceMixinProps.getHardware()- Parameters:
hardware- The hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.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.
- Returns:
this
-
hardware
@Stability(Stable) public CfnInstanceMixinProps.Builder hardware(CfnInstancePropsMixin.HardwareProperty hardware) Sets the value ofCfnInstanceMixinProps.getHardware()- Parameters:
hardware- The hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.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.
- Returns:
this
-
instanceName
Sets the value ofCfnInstanceMixinProps.getInstanceName()- Parameters:
instanceName- The name of the instance.- Returns:
this
-
keyPairName
Sets the value ofCfnInstanceMixinProps.getKeyPairName()- Parameters:
keyPairName- The name of the key pair to use for the instance. If no key pair name is specified, the Regional Lightsail default key pair is used.- Returns:
this
-
location
Sets the value ofCfnInstanceMixinProps.getLocation()- Parameters:
location- The location for the instance, such as the AWS Region and Availability Zone.The
Locationproperty is read-only and should not be specified in a create instance or update instance request.- Returns:
this
-
location
@Stability(Stable) public CfnInstanceMixinProps.Builder location(CfnInstancePropsMixin.LocationProperty location) Sets the value ofCfnInstanceMixinProps.getLocation()- Parameters:
location- The location for the instance, such as the AWS Region and Availability Zone.The
Locationproperty is read-only and should not be specified in a create instance or update instance request.- Returns:
this
-
networking
Sets the value ofCfnInstanceMixinProps.getNetworking()- Parameters:
networking- The public ports and the monthly amount of data transfer allocated for the instance.- Returns:
this
-
networking
@Stability(Stable) public CfnInstanceMixinProps.Builder networking(CfnInstancePropsMixin.NetworkingProperty networking) Sets the value ofCfnInstanceMixinProps.getNetworking()- Parameters:
networking- The public ports and the monthly amount of data transfer allocated for the instance.- Returns:
this
-
state
Sets the value ofCfnInstanceMixinProps.getState()- Parameters:
state- The status code and the state (for example,running) of the instance.The
Stateproperty is read-only and should not be specified in a create instance or update instance request.- Returns:
this
-
state
@Stability(Stable) public CfnInstanceMixinProps.Builder state(CfnInstancePropsMixin.StateProperty state) Sets the value ofCfnInstanceMixinProps.getState()- Parameters:
state- The status code and the state (for example,running) of the instance.The
Stateproperty is read-only and should not be specified in a create instance or update instance request.- Returns:
this
-
tags
Sets the value ofCfnInstanceMixinProps.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
ValueofTagsis optional for Lightsail resources.- Returns:
this
-
userData
Sets the value ofCfnInstanceMixinProps.getUserData()- Parameters:
userData- The optional launch script for the instance. Specify a launch script to configure an instance with additional user data. For example, you might want to specifyapt-get -y updateas 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInstanceMixinProps>- Returns:
- a new instance of
CfnInstanceMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-