@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.106Z") @Stability(value=Stable) public class BastionHostLinux extends Resource implements IInstance
The recommended way to connect to the bastion host is by using AWS Systems Manager Session Manager.
The operating system is Amazon Linux 2 with the latest SSM agent installed
You can also configure this bastion host to allow connections via SSH
Example:
BastionHostLinux host = BastionHostLinux.Builder.create(this, "BastionHost")
.vpc(vpc)
.blockDevices(List.of(BlockDevice.builder()
.deviceName("EBSBastionHost")
.volume(BlockDeviceVolume.ebs(10, EbsDeviceOptions.builder()
.encrypted(true)
.build()))
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
BastionHostLinux.Builder
A fluent builder for
BastionHostLinux. |
software.amazon.jsii.JsiiObject.InitializationModeIInstance.Jsii$Default, IInstance.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
BastionHostLinux(software.constructs.Construct scope,
String id,
BastionHostLinuxProps props) |
protected |
BastionHostLinux(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
BastionHostLinux(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
allowSshAccessFrom(IPeer... peer)
Allow SSH access from the given peer or peers.
|
Connections |
getConnections()
Allows specify security group connections for the instance.
|
IPrincipal |
getGrantPrincipal()
The principal to grant permissions to.
|
Instance |
getInstance()
The underlying instance resource.
|
String |
getInstanceAvailabilityZone()
The availability zone the instance was launched in.
|
String |
getInstanceId()
The instance's ID.
|
String |
getInstancePrivateDnsName()
Private DNS name for this instance.
|
String |
getInstancePrivateIp()
Private IP for this instance.
|
String |
getInstancePublicDnsName()
Publicly-routable DNS name for this instance.
|
String |
getInstancePublicIp()
Publicly-routable IP address for this instance.
|
IRole |
getRole()
The IAM role assumed by the instance.
|
Stack |
getStack()
The stack in which this resource is defined.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnvprotected BastionHostLinux(software.amazon.jsii.JsiiObjectRef objRef)
protected BastionHostLinux(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public BastionHostLinux(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
BastionHostLinuxProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable)
public void allowSshAccessFrom(@NotNull
IPeer... peer)
Necessary if you want to connect to the instance using ssh. If not called, you should use SSM Session Manager to connect to the instance.
peer - This parameter is required.@Stability(value=Stable) @NotNull public Connections getConnections()
getConnections in interface IConnectable@Stability(value=Stable) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantable@Stability(value=Stable) @NotNull public Instance getInstance()
@Stability(value=Stable) @NotNull public String getInstanceAvailabilityZone()
getInstanceAvailabilityZone in interface IInstance@Stability(value=Stable) @NotNull public String getInstanceId()
getInstanceId in interface IInstance@Stability(value=Stable) @NotNull public String getInstancePrivateDnsName()
getInstancePrivateDnsName in interface IInstance@Stability(value=Stable) @NotNull public String getInstancePrivateIp()
getInstancePrivateIp in interface IInstance@Stability(value=Stable) @NotNull public String getInstancePublicDnsName()
(May be an empty string if the instance does not have a public name).
getInstancePublicDnsName in interface IInstance@Stability(value=Stable) @NotNull public String getInstancePublicIp()
(May be an empty string if the instance does not have a public IP).
getInstancePublicIp in interface IInstance@Stability(value=Stable) @NotNull public IRole getRole()
Copyright © 2022. All rights reserved.