Class BastionHostLinux.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BastionHostLinux>
- Enclosing class:
BastionHostLinux
BastionHostLinux
.-
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone
(String availabilityZone) In which AZ to place the instance within the VPC.blockDevices
(List<? extends BlockDevice> blockDevices) Specifies how block devices are exposed to the instance.build()
static BastionHostLinux.Builder
init
(CloudFormationInit init) Apply the given CloudFormation Init configuration to the instance at startup.initOptions
(ApplyCloudFormationInitOptions initOptions) Use the given options for applying CloudFormation Init.instanceName
(String instanceName) The name of the instance.instanceType
(InstanceType instanceType) Type of instance to launch.machineImage
(IMachineImage machineImage) The machine image to use, assumed to have SSM Agent preinstalled.requireImdsv2
(Boolean requireImdsv2) Whether IMDSv2 should be required on this instance.securityGroup
(ISecurityGroup securityGroup) Security Group to assign to this instance.subnetSelection
(SubnetSelection subnetSelection) Select the subnets to run the bastion host in.VPC to launch the instance in.
-
Method Details
-
create
@Stability(Stable) public static BastionHostLinux.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
BastionHostLinux.Builder
.
-
vpc
VPC to launch the instance in.- Parameters:
vpc
- VPC to launch the instance in. This parameter is required.- Returns:
this
-
availabilityZone
In which AZ to place the instance within the VPC.Default: - Random zone.
- Parameters:
availabilityZone
- In which AZ to place the instance within the VPC. This parameter is required.- Returns:
this
-
blockDevices
@Stability(Stable) public BastionHostLinux.Builder blockDevices(List<? extends BlockDevice> 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.
Default: - Uses the block device mapping of the AMI
- Parameters:
blockDevices
- Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes. This parameter is required.- Returns:
this
- See Also:
-
init
Apply the given CloudFormation Init configuration to the instance at startup.Default: - no CloudFormation init
- Parameters:
init
- Apply the given CloudFormation Init configuration to the instance at startup. This parameter is required.- Returns:
this
-
initOptions
@Stability(Stable) public BastionHostLinux.Builder initOptions(ApplyCloudFormationInitOptions initOptions) Use the given options for applying CloudFormation Init.Describes the configsets to use and the timeout to wait
Default: - default options
- Parameters:
initOptions
- Use the given options for applying CloudFormation Init. This parameter is required.- Returns:
this
-
instanceName
The name of the instance.Default: 'BastionHost'
- Parameters:
instanceName
- The name of the instance. This parameter is required.- Returns:
this
-
instanceType
Type of instance to launch.Default: 't3.nano'
- Parameters:
instanceType
- Type of instance to launch. This parameter is required.- Returns:
this
-
machineImage
The machine image to use, assumed to have SSM Agent preinstalled.Default: - An Amazon Linux 2 image which is kept up-to-date automatically (the instance may be replaced on every deployment) and already has SSM Agent installed.
- Parameters:
machineImage
- The machine image to use, assumed to have SSM Agent preinstalled. This parameter is required.- Returns:
this
-
requireImdsv2
Whether IMDSv2 should be required on this instance.Default: - false
- Parameters:
requireImdsv2
- Whether IMDSv2 should be required on this instance. This parameter is required.- Returns:
this
-
securityGroup
Security Group to assign to this instance.Default: - create new security group with no inbound and all outbound traffic allowed
- Parameters:
securityGroup
- Security Group to assign to this instance. This parameter is required.- Returns:
this
-
subnetSelection
Select the subnets to run the bastion host in.Set this to PUBLIC if you need to connect to this instance via the internet and cannot use SSM. You have to allow port 22 manually by using the connections field
Default: - private subnets of the supplied VPC
- Parameters:
subnetSelection
- Select the subnets to run the bastion host in. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BastionHostLinux>
- Returns:
- a newly built instance of
BastionHostLinux
.
-