console

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "console [stack]",
	Short: "Login to the AWS console",
	Long: `Use your current credentials to create a sign-in URL for the AWS console and open it in a web browser.

If you supply a stack name (and didn't use the --service option), the browser will open with that stack selected.

The console command is only valid with an IAM role; not an IAM user.

Unless you specify the --name/-n flag, your AWS console user name will be derived from the role name.`,
	Args:                  cobra.MaximumNArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		stackName := ""
		if len(args) == 1 {
			stackName = args[0]
		}

		Open(printOnlyFlag, logoutFlag, serviceParam, stackName, userName)
	},
}

Cmd is the console command's entrypoint

Functions

func Open added in v1.1.2

func Open(printOnly bool, logout bool, service, resource, userName string)

Open generates a sign-in URL to the AWS console with an optional service and resource If printOnly is true, the URL is printed to the console If printOnly is false, Open attempts to call the OS's browser with the URL

Types

This section is empty.

Jump to

Keyboard shortcuts

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