Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AwsxVpcConfigCmd = &cobra.Command{ Use: "getVpcConfig", Short: "getVpcConfig command gets vpc configuration", Long: `getVpcConfig command gets vpc configuration`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getVpcConfig 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 { instanceId, _ := cmd.Flags().GetString("instanceId") if instanceId == "" { log.Printf("vpc id missing") err := cmd.Help() if err != nil { return } return } instances, err := GetVpcInstanceById(instanceId, clientAuth, nil) if err != nil { log.Println("error getting getVpcConfig by bucket name: ", err) return } fmt.Println(instances) } }, }
View Source
var AwsxVpcListCmd = &cobra.Command{ Use: "getVpcList", Short: "getVpcList command gets list of vpc instances of an aws account", Long: `getVpcList command gets list of vpc instances of an aws account`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("executing getVpcList 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 := ListVpcInstances(clientAuth, nil) if err != nil { log.Println("error getting getVpcList: ", err) return } fmt.Println(resp) } }, }
Functions ¶
This section is empty.
Types ¶
type VpcOutput ¶ added in v1.0.2
type VpcOutput struct { VPC interface{} `json:"vpc"` Region interface{} `json:"region"` }
func GetVpcInstanceById ¶
Click to show internal directories.
Click to hide internal directories.