ssm

package
v1.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MPL-2.0 Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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

func (s Session) Start(ctx context.Context, ui packersdk.Ui, sessionChan chan struct{}) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL