Documentation ¶
Index ¶
- Variables
- func PrintCommandOutput(wrt io.Writer, output *manager.CommandOutput) error
- func PrintDocumentDescription(wrt io.Writer, document *manager.DocumentDescription) error
- func PrintDocuments(wrt io.Writer, documents []*manager.DocumentIdentifier) error
- func PrintInstances(wrt io.Writer, instances []*manager.Instance) error
- func WriteInstances(wrt io.Writer, instances []*manager.Instance) error
- type AwsOptions
- type DescribeCommand
- type DescribeDocumentCommand
- type ListCommand
- type ListDocumentsCommand
- type ListInstancesCommand
- type RootCommand
- type RunCmdCommand
- type RunCommand
- type RunDocumentCommand
- type SSMOptions
- type ShellCommand
- type TargetOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandVersion string
CommandVersion (set from main.go)
Functions ¶
func PrintCommandOutput ¶
func PrintCommandOutput(wrt io.Writer, output *manager.CommandOutput) error
PrintCommandOutput writes the output from command invocations.
func PrintDocumentDescription ¶ added in v1.0.0
func PrintDocumentDescription(wrt io.Writer, document *manager.DocumentDescription) error
PrintDocumentDescription writes the output from DescribeDocument.
func PrintDocuments ¶ added in v1.0.0
func PrintDocuments(wrt io.Writer, documents []*manager.DocumentIdentifier) error
PrintDocuments writes the output from ListDocuments.
func PrintInstances ¶
PrintInstances writes the output from ListInstances.
Types ¶
type AwsOptions ¶
type DescribeCommand ¶ added in v1.0.0
type DescribeCommand struct {
Describe DescribeDocumentCommand `command:"document" alias:"doc" description:"Description a document from ssm."`
}
type DescribeDocumentCommand ¶ added in v1.0.0
type DescribeDocumentCommand struct {
Name string `short:"n" long:"name" description:"Name of document in ssm."`
}
DescribeDocumentCommand contains all arguments for describe-document command
func (*DescribeDocumentCommand) Execute ¶ added in v1.0.0
func (command *DescribeDocumentCommand) Execute(args []string) error
Execute describe-documents command
type ListCommand ¶
type ListCommand struct { Instances ListInstancesCommand `command:"instances" alias:"ins" description:"List managed instances."` Documents ListDocumentsCommand `command:"documents" alias:"doc" description:"List managed documents."` }
type ListDocumentsCommand ¶ added in v1.0.0
type ListDocumentsCommand struct { Filters []*documentFilter `short:"f" long:"filter" description:"Filter the produced list by property (Name, Owner, DocumentType, PlatformTypes)"` Limit int64 `short:"l" long:"limit" description:"Limit the number of instances printed" default:"50"` }
ListDocumentsCommand contains all arguments for list-documents command
func (*ListDocumentsCommand) Execute ¶ added in v1.0.0
func (command *ListDocumentsCommand) Execute([]string) error
Execute list-documents command
type ListInstancesCommand ¶ added in v1.0.0
type ListInstancesCommand struct { Tags []*tag `short:"f" long:"filter" description:"Filter the produced list by tag (key=value,..)"` Limit int64 `short:"l" long:"limit" description:"Limit the number of instances printed" default:"50"` Output string `short:"o" long:"output" description:"Path to a file where the list of instances will be written as JSON."` }
func (*ListInstancesCommand) Execute ¶ added in v1.0.0
func (command *ListInstancesCommand) Execute([]string) error
type RootCommand ¶
type RootCommand struct { Version func() `short:"v" long:"version" description:"Print the version and exit."` List ListCommand `command:"list" alias:"ls" description:"List managed instances or documents."` Shell ShellCommand `command:"shell" alias:"sh" description:"Start an interactive shell."` Run RunCommand `command:"run" description:"Run a command or document on the targeted instances."` Describe DescribeCommand `command:"describe" description:"Description a document from ssm."` AwsOpts AwsOptions `group:"AWS Options"` }
var Command RootCommand
type RunCmdCommand ¶ added in v1.0.0
type RunCmdCommand struct { Timeout int `short:"i" long:"timeout" description:"Seconds to wait for command result before timing out." default:"30"` SSMOpts SSMOptions `group:"SSM options"` TargetOpts TargetOptions }
func (*RunCmdCommand) Execute ¶ added in v1.0.0
func (command *RunCmdCommand) Execute(args []string) error
type RunCommand ¶
type RunCommand struct { RunCmd RunCmdCommand `command:"command" alias:"cmd" description:"Run a command on the targeted instances."` RunDocument RunDocumentCommand `command:"document" alias:"doc" description:"Runs a document from ssm."` }
type RunDocumentCommand ¶ added in v1.0.0
type RunDocumentCommand struct { Name string `short:"n" long:"name" description:"Name of document in ssm."` Timeout int `short:"i" long:"timeout" description:"Seconds to wait for command result before timing out." default:"30"` Parameters map[string]string `short:"p" long:"parameter" description:"Zero or more parameters for the document (name:value)"` SSMOpts SSMOptions `group:"SSM options"` TargetOpts TargetOptions }
RunDocumentCommand contains all arguments for run-document command
func (*RunDocumentCommand) Execute ¶ added in v1.0.0
func (command *RunDocumentCommand) Execute(args []string) error
Execute run-document command
type SSMOptions ¶ added in v0.4.0
type SSMOptions struct { ExtendOutput bool `short:"x" long:"extend-output" description:"Extend truncated command outputs by fetching S3 objects containing full ones"` S3Bucket string `` /* 168-byte string literal not displayed */ S3KeyPrefix string `short:"k" long:"s3-key-prefix" description:"Key prefix of S3 objects containing full command outputs." default:""` }
func (SSMOptions) Validate ¶ added in v0.4.0
func (o SSMOptions) Validate() error
type ShellCommand ¶
type ShellCommand struct { SSMOpts SSMOptions `group:"SSM options"` TargetOpts TargetOptions }
func (*ShellCommand) Execute ¶
func (command *ShellCommand) Execute([]string) error
type TargetOptions ¶
Click to show internal directories.
Click to hide internal directories.