Class CfnInstanceProps.Builder
- All Implemented Interfaces:
- software.amazon.jsii.Builder<CfnInstanceProps>
- Enclosing interface:
- CfnInstanceProps
CfnInstanceProps- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionSets the value ofCfnInstanceProps.getAddOns()addOns(IResolvable addOns) Sets the value ofCfnInstanceProps.getAddOns()availabilityZone(String availabilityZone) Sets the value ofCfnInstanceProps.getAvailabilityZone()blueprintId(String blueprintId) Sets the value ofCfnInstanceProps.getBlueprintId()build()Builds the configured instance.Sets the value ofCfnInstanceProps.getBundleId()hardware(IResolvable hardware) Sets the value ofCfnInstanceProps.getHardware()hardware(CfnInstance.HardwareProperty hardware) Sets the value ofCfnInstanceProps.getHardware()instanceName(String instanceName) Sets the value ofCfnInstanceProps.getInstanceName()keyPairName(String keyPairName) Sets the value ofCfnInstanceProps.getKeyPairName()location(IResolvable location) Sets the value ofCfnInstanceProps.getLocation()location(CfnInstance.LocationProperty location) Sets the value ofCfnInstanceProps.getLocation()networking(IResolvable networking) Sets the value ofCfnInstanceProps.getNetworking()networking(CfnInstance.NetworkingProperty networking) Sets the value ofCfnInstanceProps.getNetworking()state(IResolvable state) Sets the value ofCfnInstanceProps.getState()state(CfnInstance.StateProperty state) Sets the value ofCfnInstanceProps.getState()Sets the value ofCfnInstanceProps.getTags()Sets the value ofCfnInstanceProps.getUserData()
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
blueprintIdSets the value ofCfnInstanceProps.getBlueprintId()- Parameters:
- blueprintId- The blueprint ID for the instance (for example,- os_amlinux_2016_03). This parameter is required.
- Returns:
- this
 
- 
bundleIdSets the value ofCfnInstanceProps.getBundleId()- Parameters:
- bundleId- The bundle ID for the instance (for example,- micro_1_0). This parameter is required.
- Returns:
- this
 
- 
instanceNameSets the value ofCfnInstanceProps.getInstanceName()- Parameters:
- instanceName- The name of the instance. This parameter is required.
- Returns:
- this
 
- 
addOnsSets the value ofCfnInstanceProps.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
 
- 
addOnsSets the value ofCfnInstanceProps.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
 
- 
availabilityZoneSets the value ofCfnInstanceProps.getAvailabilityZone()- Parameters:
- availabilityZone- The Availability Zone for the instance.
- Returns:
- this
 
- 
hardwareSets the value ofCfnInstanceProps.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
 
- 
hardwareSets the value ofCfnInstanceProps.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
 
- 
keyPairNameSets the value ofCfnInstanceProps.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
 
- 
locationSets the value ofCfnInstanceProps.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
 
- 
locationSets the value ofCfnInstanceProps.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
 
- 
networkingSets the value ofCfnInstanceProps.getNetworking()- Parameters:
- networking- The public ports and the monthly amount of data transfer allocated for the instance.
- Returns:
- this
 
- 
networking@Stability(Stable) public CfnInstanceProps.Builder networking(CfnInstance.NetworkingProperty networking) Sets the value ofCfnInstanceProps.getNetworking()- Parameters:
- networking- The public ports and the monthly amount of data transfer allocated for the instance.
- Returns:
- this
 
- 
stateSets the value ofCfnInstanceProps.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
 
- 
stateSets the value ofCfnInstanceProps.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
 
- 
tagsSets the value ofCfnInstanceProps.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 - Valueof- Tagsis optional for Lightsail resources.
- Returns:
- this
 
- 
userDataSets the value ofCfnInstanceProps.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 specify- apt-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 use- apt-get, and FreeBSD uses- pkg.
- Returns:
- this
 
- 
buildBuilds the configured instance.- Specified by:
- buildin interface- software.amazon.jsii.Builder<CfnInstanceProps>
- Returns:
- a new instance of CfnInstanceProps
- Throws:
- NullPointerException- if any required attribute was not provided
 
 
-