ssm

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteActivation added in v0.9.2

func DeleteActivation(session *session.Session, activationId string) (*ssm.DeleteActivationOutput, error)

func DeregisterInstance added in v0.9.2

func DeregisterInstance(session *session.Session, id string) (*ssm.DeregisterManagedInstanceOutput, error)

func GetInstanceByActivationId added in v0.9.2

func GetInstanceByActivationId(session *session.Session, id string) (*ssm.InstanceInformation, error)

func Run

func Run(session *session.Session, logger logr.Logger, instanceID, command string, timeout time.Duration, opts ...CommandOpt) error

Run runs the command using SSM on the instance corresponding to the instanceID.

func WaitForSSMReady

func WaitForSSMReady(session *session.Session, instanceID string, timeout time.Duration) error

WaitForSSMReady waits for the SSM command to be ready.

Types

type ActivationInfo added in v0.9.2

type ActivationInfo struct {
	ActivationCode string
	ActivationID   string
}

func CreateActivation added in v0.9.2

func CreateActivation(session *session.Session, instanceName, role string) (*ActivationInfo, error)

type CommandOpt

type CommandOpt func(c *ssm.SendCommandInput)

func WithOutputToCloudwatch added in v0.6.0

func WithOutputToCloudwatch() CommandOpt

func WithOutputToS3

func WithOutputToS3(bucket, dir string) CommandOpt

type RunOutput added in v0.7.0

type RunOutput struct {
	CommandId      string
	StdOut, StdErr []byte
	// contains filtered or unexported fields
}

func RunCommand added in v0.7.0

func RunCommand(session *session.Session, logger logr.Logger, instanceID, command string, timeout time.Duration, opts ...CommandOpt) (*RunOutput, error)

RunCommand runs the command using SSM on the instance corresponding to the instanceID.

func (*RunOutput) Successful added in v0.7.0

func (r *RunOutput) Successful() bool

Jump to

Keyboard shortcuts

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