Documentation
¶
Index ¶
Constants ¶
const DefaultDocumentName = "AWS-StartPortForwardingSession"
DefaultDocumentName is the AWS managed document used to start a port forwarding session when no custom document is specified.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSMAPI ¶ added in v1.8.4
type SSMAPI interface {
StartSession(ctx context.Context, params *ssm.StartSessionInput, optFns ...func(*ssm.Options)) (*ssm.StartSessionOutput, error)
TerminateSession(ctx context.Context, params *ssm.TerminateSessionInput, optFns ...func(*ssm.Options)) (*ssm.TerminateSessionOutput, error)
GetConnectionStatus(ctx context.Context, params *ssm.GetConnectionStatusInput, optFns ...func(*ssm.Options)) (*ssm.GetConnectionStatusOutput, error)
}
SSMAPI is the subset of the SSM client used to manage port forwarding sessions.
type Session ¶
type Session struct {
SvcClient SSMAPI
Region string
InstanceID string
LocalPort, RemotePort int
Ec2Client clients.Ec2Client
DocumentName string
// RestartOnAgentDisconnect restarts the port forwarding session when the SSM agent on
// the instance disconnects from Session Manager, e.g. during a reboot.
RestartOnAgentDisconnect bool
// contains filtered or unexported fields
}
func (Session) Start ¶
Start an interactive Systems Manager session with a remote instance via the AWS session-manager-plugin. To terminate the session you must cancel the context. If you do not wish to terminate the session manually: calling StopSession on a instance of this driver will terminate the active session created from calling StartSession. To stop the session you must cancel the context.