@Stability(value=Experimental) public static final class InstanceProps.Builder extends Object implements software.amazon.jsii.Builder<InstanceProps>
InstanceProps| Constructor and Description |
|---|
Builder() |
@Stability(value=Experimental) public InstanceProps.Builder instanceType(InstanceType instanceType)
InstanceProps.getInstanceType()instanceType - Type of instance to launch. This parameter is required.this@Stability(value=Experimental) public InstanceProps.Builder machineImage(IMachineImage machineImage)
InstanceProps.getMachineImage()machineImage - AMI to launch. This parameter is required.this@Stability(value=Experimental) public InstanceProps.Builder vpc(IVpc vpc)
InstanceProps.getVpc()vpc - VPC to launch the instance in. This parameter is required.this@Stability(value=Experimental) public InstanceProps.Builder allowAllOutbound(Boolean allowAllOutbound)
InstanceProps.getAllowAllOutbound()allowAllOutbound - Whether the instance could initiate connections to anywhere by default.
This property is only used when you do not provide a security group.this@Stability(value=Experimental) public InstanceProps.Builder availabilityZone(String availabilityZone)
InstanceProps.getAvailabilityZone()availabilityZone - In which AZ to place the instance within the VPC.this@Stability(value=Experimental) public InstanceProps.Builder blockDevices(List<? extends BlockDevice> blockDevices)
InstanceProps.getBlockDevices()blockDevices - Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
Each instance that is launched has an associated root device volume,
either an Amazon EBS volume or an instance store volume.
You can use block device mappings to specify additional EBS volumes or
instance store volumes to attach to an instance when it is launched.this@Stability(value=Experimental) public InstanceProps.Builder init(CloudFormationInit init)
InstanceProps.getInit()init - Apply the given CloudFormation Init configuration to the instance at startup.this@Stability(value=Experimental) public InstanceProps.Builder initOptions(ApplyCloudFormationInitOptions initOptions)
InstanceProps.getInitOptions()initOptions - Use the given options for applying CloudFormation Init.
Describes the configsets to use and the timeout to waitthis@Stability(value=Experimental) public InstanceProps.Builder instanceName(String instanceName)
InstanceProps.getInstanceName()instanceName - The name of the instance.this@Stability(value=Experimental) public InstanceProps.Builder keyName(String keyName)
InstanceProps.getKeyName()keyName - Name of SSH keypair to grant access to instance.this@Stability(value=Experimental) public InstanceProps.Builder privateIpAddress(String privateIpAddress)
InstanceProps.getPrivateIpAddress()privateIpAddress - Defines a private IP address to associate with an instance.
Private IP should be available within the VPC that the instance is build within.this@Stability(value=Experimental) public InstanceProps.Builder resourceSignalTimeout(Duration resourceSignalTimeout)
InstanceProps.getResourceSignalTimeout()resourceSignalTimeout - The length of time to wait for the resourceSignalCount.
The maximum value is 43200 (12 hours).this@Stability(value=Experimental) public InstanceProps.Builder role(IRole role)
InstanceProps.getRole()role - An IAM role to associate with the instance profile assigned to this Auto Scaling Group.
The role must be assumable by the service principal ec2.amazonaws.com:this@Stability(value=Experimental) public InstanceProps.Builder securityGroup(ISecurityGroup securityGroup)
InstanceProps.getSecurityGroup()securityGroup - Security Group to assign to this instance.this@Stability(value=Experimental) public InstanceProps.Builder sourceDestCheck(Boolean sourceDestCheck)
InstanceProps.getSourceDestCheck()sourceDestCheck - Specifies whether to enable an instance launched in a VPC to perform NAT.
This controls whether source/destination checking is enabled on the instance.
A value of true means that checking is enabled, and false means that checking is disabled.
The value must be false for the instance to perform NAT.this@Stability(value=Experimental) public InstanceProps.Builder userData(UserData userData)
InstanceProps.getUserData()userData - Specific UserData to use.
The UserData may still be mutated after creation.this@Stability(value=Experimental) public InstanceProps.Builder userDataCausesReplacement(Boolean userDataCausesReplacement)
InstanceProps.getUserDataCausesReplacement()userDataCausesReplacement - Changes to the UserData force replacement.
Depending the EC2 instance type, changing UserData either
restarts the instance or replaces the instance.
By default, restarting does not execute the new UserData so you will need a different mechanism to ensure the instance is restarted.
Setting this to true will make the instance's Logical ID depend on the
UserData, which will cause CloudFormation to replace it if the UserData
changes.
this@Stability(value=Experimental) public InstanceProps.Builder vpcSubnets(SubnetSelection vpcSubnets)
InstanceProps.getVpcSubnets()vpcSubnets - Where to place the instance within the VPC.this@Stability(value=Experimental) public InstanceProps build()
build in interface software.amazon.jsii.Builder<InstanceProps>InstancePropsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.