func BuildShowEnvironmentCmd()

in internal/pkg/cli/env_show.go [53:76]


func BuildShowEnvironmentCmd() *cobra.Command {
	opts := NewShowEnvironmentOpts()
	cmd := &cobra.Command{
		Use:   "show",
		Short: "Describe the oam-ecs environment",
		Long:  `Retrieves and displays the attributes of the oam-ecs default environment`,
		Example: `
  Show the oam-ecs environment:
	$ oam-ecs env show`,
		PreRunE: runCmdE(func(cmd *cobra.Command, args []string) error {
			session, err := session.Default()
			if err != nil {
				return err
			}
			opts.envDescriber = cloudformation.New(session)
			return nil
		}),
		RunE: runCmdE(func(cmd *cobra.Command, args []string) error {
			return opts.Execute()
		}),
	}

	return cmd
}