in commands/profile.go [160:192]
func init() {
profileCommand.AddCommand(createProfileCmd)
profileCommand.AddCommand(deleteProfilesCmd)
profileCommand.AddCommand(listProfileCmd)
//profile flags
profileCommand.Flags().BoolP(FlagProfileHelp, "h", false, "Help for "+ProfileCommandName)
//profile list flags
listProfileCmd.Flags().BoolP(FlagProfileVerbose, "l", false, "Shows information like name, endpoint, user")
listProfileCmd.Flags().BoolP(FlagProfileHelp, "h", false, "Help for "+ListProfilesCommandName)
//profile create flags
createProfileCmd.Flags().StringP(FlagProfileCreateName, "n", "", "Create profile with this name")
_ = createProfileCmd.MarkFlagRequired(FlagProfileCreateName)
createProfileCmd.Flags().StringP(FlagProfileCreateEndpoint, "e", "", "Create profile with this endpoint or host")
_ = createProfileCmd.MarkFlagRequired(FlagProfileCreateEndpoint)
createProfileCmd.Flags().StringP(FlagProfileCreateAuthType, "a", "", "Authentication type. Options are disabled, basic and aws-iam."+
"\nIf security is disabled, provide --auth-type='disabled'.\nIf security uses HTTP basic authentication, provide --auth-type='basic'.\n"+
"If security uses client certificate authentication, provide --auth-type='cert'.\n"+
"If security uses AWS IAM ARNs as users, provide --auth-type='aws-iam'.\nopensearch-cli asks for additional information based on your choice of authentication type.")
_ = createProfileCmd.MarkFlagRequired(FlagProfileCreateAuthType)
createProfileCmd.Flags().IntP(FlagProfileMaxRetry, "m", 3, "Maximum retry attempts allowed if transient problems occur.\n"+
"You can override this value by using the "+environment.OPENSEARCH_MAX_RETRY+" environment variable.")
createProfileCmd.Flags().Int64P(FlagProfileTimeout, "t", 10, "Maximum time allowed for connection in seconds.\n"+
"You can override this value by using the "+environment.OPENSEARCH_TIMEOUT+" environment variable.")
createProfileCmd.Flags().BoolP(FlagProfileHelp, "h", false, "Help for "+CreateNewProfileCommandName)
//profile delete flags
deleteProfilesCmd.Flags().BoolP(FlagProfileHelp, "h", false, "Help for "+DeleteProfilesCommandName)
GetRoot().AddCommand(profileCommand)
}