command

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AwsxEc2Cmd = &cobra.Command{
	Use:   "getEC2List",
	Short: "getEC2List command gets list of EC2 instances for a AWS account",
	Long:  `getEC2List command gets resource Arn details of an AWS account`,

	Run: func(cmd *cobra.Command, args []string) {
		log.Println("Command getEC2List started")
		authFlag, clientAuth, err := authenticate.CommandAuth(cmd)
		if err != nil {
			cmd.Help()
			return
		}
		if authFlag {
			ListInstances(*clientAuth)
		} else {
			cmd.Help()
			return
		}

	},
}

AwsxEc2Cmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

func ListInstances

func ListInstances(auth client.Auth) (*ec2.DescribeInstancesOutput, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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