Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AwsxEcsConfigCmd = &cobra.Command{ Use: "getEcsConfig", Short: "getEcsConfig command gets ecs configuration", Long: `getEcsConfig command gets ecs configuration`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getEcsConfig command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { clusterName, _ := cmd.Flags().GetString("clusterName") if clusterName == "" { log.Printf("ecs cluster name missing") err := cmd.Help() if err != nil { return } return } instances, err := GetEcsInstanceByClusterName(clusterName, clientAuth, nil) if err != nil { log.Println("error getting getEcsConfig by instance id: ", err) return } fmt.Println(instances) } }, }
View Source
var AwsxEcsListCmd = &cobra.Command{ Use: "getEcsList", Short: "getEcsList command gets list of ecs instances of an aws account", Long: `getEcsList command gets list of ecs instances of an aws account`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getEcsList command") var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd) if err != nil { log.Printf("error during authentication: %v\n", err) err := cmd.Help() if err != nil { return } return } if authFlag { resp, err := ListEcsInstances(clientAuth, nil) if err != nil { log.Println("error getting getEcsList: ", err) return } fmt.Println(resp) } }, }
Functions ¶
func ListEcsInstances ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.