Interface BastionHostLinuxProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BastionHostLinuxProps.Jsii$Proxy
Example:
BastionHostLinux host = BastionHostLinux.Builder.create(this, "BastionHost") .vpc(vpc) .blockDevices(List.of(BlockDevice.builder() .deviceName("/dev/sdh") .volume(BlockDeviceVolume.ebs(10, EbsDeviceOptions.builder() .encrypted(true) .build())) .build())) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forBastionHostLinuxProps
static final class
An implementation forBastionHostLinuxProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
In which AZ to place the instance within the VPC.default List<BlockDevice>
Specifies how block devices are exposed to the instance.default CloudFormationInit
getInit()
Apply the given CloudFormation Init configuration to the instance at startup.default ApplyCloudFormationInitOptions
Use the given options for applying CloudFormation Init.default String
The name of the instance.default InstanceType
Type of instance to launch.default IMachineImage
The machine image to use, assumed to have SSM Agent preinstalled.default Boolean
Whether IMDSv2 should be required on this instance.default ISecurityGroup
Security Group to assign to this instance.default SubnetSelection
Select the subnets to run the bastion host in.default Boolean
Determines whether changes to the UserData will force instance replacement.getVpc()
VPC to launch the instance in.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVpc
VPC to launch the instance in. -
getAvailabilityZone
In which AZ to place the instance within the VPC.Default: - Random zone.
-
getBlockDevices
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
- See Also:
-
getInit
Apply the given CloudFormation Init configuration to the instance at startup.Default: - no CloudFormation init
-
getInitOptions
Use the given options for applying CloudFormation Init.Describes the configsets to use and the timeout to wait
Default: - default options
-
getInstanceName
The name of the instance.Default: 'BastionHost'
-
getInstanceType
Type of instance to launch.Default: 't3.nano'
-
getMachineImage
The machine image to use, assumed to have SSM Agent preinstalled.Default: - An Amazon Linux 2023 image if the `@aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault` feature flag is enabled. Otherwise, an Amazon Linux 2 image. In both cases, the image is kept up-to-date automatically (the instance may be replaced on every deployment) and already has SSM Agent installed.
-
getRequireImdsv2
Whether IMDSv2 should be required on this instance.Default: - false
-
getSecurityGroup
Security Group to assign to this instance.Default: - create new security group with no inbound and all outbound traffic allowed
-
getSubnetSelection
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
-
getUserDataCausesReplacement
Determines whether changes to the UserData will force instance replacement.Depending on the EC2 instance type, modifying the UserData may either restart or replace the instance:
- Instance store-backed instances are replaced.
- EBS-backed instances are restarted.
Note that by default, restarting does not execute the updated UserData, so an alternative mechanism is needed to ensure the instance re-executes the UserData.
When set to
true
, the instance's Logical ID will depend on the UserData, causing CloudFormation to replace the instance if the UserData changes.Default: - `true` if `initOptions` is specified, otherwise `false`.
-
builder
- Returns:
- a
BastionHostLinuxProps.Builder
ofBastionHostLinuxProps
-