Lambda

package
v1.17.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AwsxApiTopEventCmd = &cobra.Command{

	Use:   "function_caller_details_panel",
	Short: "Get caller details data",
	Long:  `Command to get top event metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running top event panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetFunctionCallerDetails(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxApiTopLambdaInMultipleRegionsDataCmd = &cobra.Command{

	Use:   "top_lambda_in_multiple_regions",
	Short: "Get top lambda in multiple regions data",
	Long:  `Command to get lambda in multiple regions metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running top lambda in multiple regions command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetTopLambdaInMultipleRegionsData(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxDeadLetterErrorsTrendsCmd = &cobra.Command{
	Use:   "dead_letter_errors_trends_panel",
	Short: "Get error trend events",
	Long:  `Command to retrieve error trend events`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running  panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetLambdaDeadLetterErrorsTrendsEvents(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)

		}
	},
}
View Source
var AwsxErrorTrendPanelCmd = &cobra.Command{
	Use:   "error_trend_panel",
	Short: "Get error trend events",
	Long:  `Command to retrieve error trend events`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running  panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetLambdaErrorTrendEvents(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)

		}
	},
}
View Source
var AwsxLambdaColdStartCmd = &cobra.Command{
	Use:   "cold_start_duration_panel",
	Short: "get lambda cold start duration metrics data",
	Long:  `Command to get lambda cold start duration metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		log.Println("Running from child 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 {

			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaColdStartData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda cold start duration data: ", err)
				return
			}

			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaConcurrencyCmd = &cobra.Command{
	Use:   "concurrency_panel",
	Short: "get lambda concurrency metrics data",
	Long:  `Command to get lambda concurrency metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running from child 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 {

			responseType, _ := cmd.PersistentFlags().GetString("responseType")

			jsonResp, cloudwatchMetricResp, err := GetLambdaConcurrencyData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda concurrency data: ", err)
				return
			}

			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaConcurrencyGraphCmd = &cobra.Command{
	Use:   "concurrency_graph_panel",
	Short: "get concurrency graph metrics data",
	Long:  `command to get concurrency graph metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaConcurrencyGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda concurrency response data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaCpuCmd = &cobra.Command{
	Use:   "cpu_panel",
	Short: "get cpu metrics data",
	Long:  `command to get cpu metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaLatencyData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda cpu data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaDurationCmd = &cobra.Command{
	Use:   "duration_panel",
	Short: "Get duration metrics data for a Lambda function",
	Long:  `Command to get duration metrics data for a Lambda function`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running duration panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaDurationData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting cpu utilization: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaErrorAndWarningCmd = &cobra.Command{
	Use:   "error_and_warning_events_panel",
	Short: "Get error and warning events metrics data",
	Long:  `Command to get error and warning events metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		log.Println("Running from child command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetLambdaErrorAndWarningData(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxLambdaErrorBreakdownCmd = &cobra.Command{
	Use:   "error_breakdown_panel",
	Short: "get error metrics data",
	Long:  `command to get error metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetErrorBreakdownData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda error breakdown data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaErrorCmd = &cobra.Command{
	Use:   "error_panel",
	Short: "get error metrics data",
	Long:  `command to get error metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaErrorData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda errors data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaErrorGraphCmd = &cobra.Command{
	Use:   "error_graph_panel",
	Short: "get error count  graph metrics data",
	Long:  `command to get error count graph metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaErrorGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda error response data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaErrorMessageCmd = &cobra.Command{

	Use:   "error_message_count_panel",
	Short: "Get error message count metrics data",
	Long:  `Command to get error message count metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running error message panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetErrorMessageCountData(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxLambdaFailureCmd = &cobra.Command{
	Use:   "failure_panel",
	Short: "get failure metrics data",
	Long:  `command to get failure metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaErrorData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda failure data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaFullConcurrencyCommmand = &cobra.Command{
	Use:   "full_concurrency_panel",
	Short: "get full concurrency metrics data",
	Long:  `command to get full concurrency metrics data`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, resp, err := GetLambdaFullConcurrencyData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting full concurrency data : ", err)
				return
			}
			if responseType == "json" {
				fmt.Println(jsonResp)
			} else {
				fmt.Println(resp)
			}
		}
	},
}
View Source
var AwsxLambdaFunctionByAvailabilityZoneCmd = &cobra.Command{
	Use:   "function_by_availability_zones_panel",
	Short: "gets lambda functions by availability zone",
	Long:  `Command to get AWS Lambda functions by availability zone`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, functionCounts, err := GetFunctionByAvailabilityZone(clientAuth)
			if err != nil {
				log.Println("Error getting function by availalbility zones : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(functionCounts)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaFunctionCmd = &cobra.Command{

	Use: "lambda_function_panel",

	Short: "get function metrics data",

	Long: `command to get function metrics data`,

	Run: func(cmd *cobra.Command, args []string) {

		fmt.Println("running from child 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 {

			GetFunctionPanel(cmd, clientAuth, nil)

		}

	},
}
View Source
var AwsxLambdaFunctionFailureCmd = &cobra.Command{

	Use: "lambda_failure_panel",

	Short: "get lambda failure metrics data",

	Long: `command to get lambda failure metrics data`,

	Run: func(cmd *cobra.Command, args []string) {

		fmt.Println("running from child 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 {

			GetTotalFailureFunctionsPanel(cmd, clientAuth, nil)

		}

	},
}
View Source
var AwsxLambdaFunctionsByRegionCmd = &cobra.Command{
	Use:   "functions_by_region_panel",
	Short: "get Lambda functions by region",
	Long:  `command to get Lambda functions by region`,

	Run: func(cmd *cobra.Command, args []string) {
		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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, functionCounts, err := GetLambdaFunctionsByRegion(clientAuth)
			if err != nil {
				log.Println("Error getting Lambda functions by region: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(functionCounts)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaIdleFunctionCmd = &cobra.Command{
	Use:   "idle_function_panel",
	Short: "get idle function metrics data",
	Long:  `Command to get idle function metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			idleFunctionCount, err := GetLambdaIdleFunctionData(clientAuth, nil)
			if err != nil {
				log.Println("Error getting idle function data: ", err)
				return
			}
			if responseType == "frame" {

			} else {
				fmt.Println("Idle Function Count:", idleFunctionCount)
			}
		}
	},
}
View Source
var AwsxLambdaInvocationCmd = &cobra.Command{
	Use:   "invocation_panel",
	Short: "Get duration metrics data for a Lambda function",
	Long:  `Command to get duration metrics data for a Lambda function`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running duration panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaInvocationData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting cpu utilization: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaInvocationTrendCmd = &cobra.Command{

	Use:   "invocation_trend_panel",
	Short: "Get invocation trend metrics data",
	Long:  `Command to get invocation trend metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running invocation trend panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetInvocationTrendData(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxLambdaInvocationsGraphCmd = &cobra.Command{
	Use:   "Invocations_graph_panel",
	Short: "get Invocations count graph metrics data",
	Long:  `command to get Invocations count graph metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaInvocationsGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda Invocations response data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaLatencyCmd = &cobra.Command{
	Use:   "latency_panel",
	Short: "get latency metrics data",
	Long:  `command to get latency metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaLatencyData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda latency data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaLatencyGraphCmd = &cobra.Command{
	Use:   "Latency_graph_panel",
	Short: "get Latency count graph metrics data",
	Long:  `command to get Latency count graph metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaLatencyGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda Latency response data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaLocationOfCallersCmd = &cobra.Command{

	Use:   "location_of_caller_panel",
	Short: "get location of caller logs data",
	Long:  `command to get location of caller logs data`,

	Run: func(cmd *cobra.Command, args []string) {

		fmt.Println("running from child command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetLambdaLocationOfCaller(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)

		}

	},
}
View Source
var AwsxLambdaMaxMemoryCmd = &cobra.Command{
	Use:   "max_memory_used_panel",
	Short: "get lambda memory metrics data",
	Long:  `Command to get lambda memory metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		log.Println("Running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaMaxMemoryData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda max memory used data: ", err)
				return
			}

			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaMaxMemoryGraphCmd = &cobra.Command{
	Use:   "max_memory_used_graph_panel",
	Short: "get lambda memory used data",
	Long:  `Command to get lambda memory used data`,

	Run: func(cmd *cobra.Command, args []string) {
		log.Println("Running from child 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 {

			responseType, _ := cmd.PersistentFlags().GetString("responseType")

			jsonResp, cloudwatchMetricResp, err := GetLambdaMaxMemoryGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda max memory used data: ", err)
				return
			}

			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaMemoryCmd = &cobra.Command{
	Use:   "memory_used_panel",
	Short: "get memory metrics data",
	Long:  `command to get memory metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaMemoryData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda memory data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaMemoryUsageCmd = &cobra.Command{
	Use:   "invocation_panel",
	Short: "Get duration metrics data for a Lambda function",
	Long:  `Command to get duration metrics data for a Lambda function`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running duration panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaMemoryUsageData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting cpu utilization: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaNetReceivedCmd = &cobra.Command{
	Use:   "net_received_panel",
	Short: "get net received metrics data",
	Long:  `command to get net received metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaNetReceivedData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda net received data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaNumberOfCallsCmd = &cobra.Command{
	Use:   "number of calls panel",
	Short: "get number of calls metrics data",
	Long:  `command to get number of calls metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaNumberOfCallsPanel(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting number of calls data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaRequestCmd = &cobra.Command{
	Use:   "request_panel",
	Short: "get request metrics data",
	Long:  `command to get request metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaRequestData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda cpu received data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaResponseTimeGraphCmd = &cobra.Command{
	Use:   "response_time_graph_panel",
	Short: "get response time graph metrics data",
	Long:  `command to get response time graph metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaResponseTimeGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda response time data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaSuccessFailedCountCmd = &cobra.Command{
	Use:   "success_and_failed_function_panel",
	Short: "get SuccessFailedCount  data",
	Long:  `command to get concurrency graph metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaSuccessFailedCountData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda response data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaThrottleCmd = &cobra.Command{
	Use:   "throttle_panel",
	Short: "get lambda throttle metrics data",
	Long:  `Command to get lambda throttle metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		log.Println("Running from child command")
		authFlag, clientAuth, err := authenticate.AuthenticateCommand(cmd)
		if err != nil {
			log.Printf("Error during authentication: %v\n", err)
			return
		}
		if !authFlag {
			log.Println("Authentication failed")
			return
		}

		responseType, _ := cmd.PersistentFlags().GetString("responseType")
		if responseType != "json" && responseType != "frame" {
			log.Println("Invalid response type. Valid options are 'json' or 'frame'.")
			return
		}

		jsonResp, cloudwatchMetricResp, err := GetLambdaThrottleData(cmd, clientAuth, nil)
		if err != nil {
			log.Println("Error getting lambda throttle data: ", err)
			return
		}

		if responseType == "frame" {
			fmt.Println(cloudwatchMetricResp)
		} else {
			fmt.Println(jsonResp)
		}
	},
}
View Source
var AwsxLambdaThrottlesFunctionCmd = &cobra.Command{
	Use:   "throttles_function_panel",
	Short: "get throttles function metrics data",
	Long:  `Command to get throttles function metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			throttlesFunctionCount, err := GetLambdaThrottlesFunctionData(clientAuth)
			if err != nil {
				log.Println("Error getting throttles function data: ", err)
				return
			}
			if responseType == "frame" {

			} else {
				fmt.Println("Throttles Function Count:", throttlesFunctionCount)
			}
		}
	},
}
View Source
var AwsxLambdaThrottlesGraphCmd = &cobra.Command{
	Use:   "throttles_graph_panel",
	Short: "get throttles count graph metrics data",
	Long:  `command to get throttles count graph metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaThrottlesGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda throttles response data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaThrottlingTrendsCmd = &cobra.Command{

	Use:   "throttling_trends_panel",
	Short: "Get throttling trends metrics data",
	Long:  `Command to get throttling trends metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running throttling trends panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetThrottlingTrendsData(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxLambdaTopFailureCmd = &cobra.Command{

	Use:   "top_failure_count_panel",
	Short: "Get top failure count metrics data",
	Long:  `Command to get top failure count metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running top failure count panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetLambdaTopFailurePanel(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxLambdaTopLambdaWarningsCommmand = &cobra.Command{
	Use:   "top_lambda_warnings",
	Short: "get top lambda warnings data",
	Long:  `command to get top lambda warnings metrics data`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, resp, err := GetLambdaTopLambdaWarningsData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting top lambda zones data : ", err)
				return
			}
			if responseType == "json" {
				fmt.Println(jsonResp)
			} else {
				fmt.Println(resp)

			}
		}
	},
}
View Source
var AwsxLambdaTopLambdaZonesCmd = &cobra.Command{

	Use:   "top_lambda_zones_panel",
	Short: "Get top 5 Lambda zones, event sources, and function names",
	Long:  `Command to get top 5 Lambda zones along with their event sources and function names.`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running top lambda zones panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetTopLambdaZonesData(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxLambdaTotalFunctionCmd = &cobra.Command{
	Use:   "total_function_panel",
	Short: "get total function metrics data",
	Long:  `command to get total function metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaTotalFunctionData(clientAuth, nil)
			if err != nil {
				log.Println("Error getting total function data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaTrendsCmd = &cobra.Command{
	Use:   "trends_panel",
	Short: "get trends metrics data",
	Long:  `command to get trends metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaTrendsData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda trends data : ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}

	},
}
View Source
var AwsxLambdaTrendsGraphCmd = &cobra.Command{
	Use:   "trends_graph_panel",
	Short: "get trends count graph metrics data",
	Long:  `command to get trends count graph metrics data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, cloudwatchMetricResp, err := GetLambdaTrendsGraphData(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting lambda Invocations response data: ", err)
				return
			}
			if responseType == "frame" {
				fmt.Println(cloudwatchMetricResp)
			} else {
				fmt.Println(jsonResp)
			}
		}
	},
}
View Source
var AwsxLambdaUnreservedConcurrencyCommmand = &cobra.Command{
	Use:   "unreserved_concurrency_panel",
	Short: "get unreserved concurrency metrics data",
	Long:  `command to get unreserved concurrency metrics data`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("running from child 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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, resp, err := GetLambdaUnreservedConcurrencyCommmand(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting unreserved concurrency data : ", err)
				return
			}
			if responseType == "json" {
				fmt.Println(jsonResp)
			} else {
				fmt.Println(resp)
			}
		}
	},
}
View Source
var AwsxTopErrorsMessagesPanelCmd = &cobra.Command{
	Use:   "top_errors_messages_panel",
	Short: "Get top errors messages events",
	Long:  `Command to retrieve top errors events`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running  panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, resp, err := GetLambdaTopErrorsMessagesEvents(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting top lambda zones data : ", err)
				return
			}
			if responseType == "json" {
				fmt.Println(jsonResp)
			} else {
				fmt.Println(resp)

			}

		}
	},
}
View Source
var AwsxTopErrorsPanelCmd = &cobra.Command{
	Use:   "top_errors_in_lambda_panel",
	Short: "Get top errors in lambda events",
	Long:  `Command to retrieve top errors events`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running  panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetLambdaTopErrorsEvents(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)

		}
	},
}
View Source
var AwsxTopFailureFunctionsLogCmd = &cobra.Command{

	Use:   "top_failure_functions_panel",
	Short: "Get top failure functions data",
	Long:  `Command to get top failure functions data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running error log panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetTopFailureFunctionsLogData(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxTopUsedFunctionsLogCmd = &cobra.Command{

	Use:   "top_used_functions_panel",
	Short: "Get top used functions data",
	Long:  `Command to get top used functions data`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running error log panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			panel, err := GetTopUsedFunctionsLogData(cmd, clientAuth, nil)
			if err != nil {
				return
			}
			fmt.Println(panel)
		}
	},
}
View Source
var AwsxTopWarningMessagesPanelCmd = &cobra.Command{
	Use:   "top_warning_messages_panel",
	Short: "Get top warning messages events",
	Long:  `Command to retrieve top warning events`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running  panel command")

		var authFlag bool
		var clientAuth *model.Auth
		var err error
		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 {
			responseType, _ := cmd.PersistentFlags().GetString("responseType")
			jsonResp, resp, err := GetLambdaTopWarningMessagesEvents(cmd, clientAuth, nil)
			if err != nil {
				log.Println("Error getting top lambda zones data : ", err)
				return
			}
			if responseType == "json" {
				fmt.Println(jsonResp)
			} else {
				fmt.Println(resp)

			}

		}
	},
}
View Source
var AwsxWarningBreakdownCmd = &cobra.Command{
	Use:   "warning_breakdown_panel",
	Short: "Get warning breakdown data",
	Long:  `Command to get warning breakdown for AWS Lambda functions.`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Running from child command")

		authFlag, clientAuth, err := authenticate.AuthenticateCommand(cmd)
		if err != nil {
			log.Printf("Error during authentication: %v\n", err)
			_ = cmd.Help()
			return
		}

		if authFlag {
			results, err := GetLambdaWarningBreakdown(cmd, clientAuth, nil)
			if err != nil {
				log.Printf("Error getting Lambda warning breakdown: %v\n", err)
				return
			}
			fmt.Printf("Results: %v\n", results)
		}
	},
}
View Source
var LambdaExecutionTimeCmd = &cobra.Command{
	Use:   "execution_time_panel",
	Short: "Get Lambda function execution time metrics",
	Long:  `Command to get Lambda function execution time metrics`,

	Run: func(cmd *cobra.Command, args []string) {
		log.Println("Running Lambda execution time metrics command")

		responseType, _ := cmd.PersistentFlags().GetString("responseType")

		authFlag, clientAuth, err := authenticate.AuthenticateCommand(cmd)
		if err != nil {
			log.Fatalf("Error getting client auth: %v", err)
		}
		if !authFlag {
			log.Println("Authentication failed")
			return
		}

		jsonResp, cloudwatchMetricResp, err := GetLambdaExecutionTimePanel(cmd, clientAuth, nil)
		if err != nil {
			log.Fatalf("Error getting Lambda execution time metric data: %v", err)
		}

		if responseType == "frame" {
			fmt.Println(cloudwatchMetricResp)
		} else {
			fmt.Println(jsonResp)
		}
	},
}
View Source
var LambdaMemoryMetricsCmd = &cobra.Command{
	Use:   "used_and_unused_memory_data_panel",
	Short: "Get Lambda used and unused memory data",
	Long:  `Command to get Lambda Used and Unused memory data`,

	Run: func(cmd *cobra.Command, args []string) {
		log.Println("Running Lambda memory metrics command")

		responseType, _ := cmd.PersistentFlags().GetString("responseType")

		authFlag, clientAuth, err := authenticate.AuthenticateCommand(cmd)
		if err != nil {
			log.Fatalf("Error getting client auth: %v", err)
		}
		if !authFlag {
			log.Println("Authentication failed")
			return
		}

		jsonResp, cloudwatchMetricResp, err := GetLambdaUnusedMemoryPanel(cmd, clientAuth, nil)
		if err != nil {
			log.Fatalf("Error getting Lambda memory metric data: %v", err)
		}

		if responseType == "frame" {
			fmt.Println(cloudwatchMetricResp)
		} else {
			fmt.Println(jsonResp)
		}
	},
}

Functions

func FilterTopErrorsTasks added in v1.10.10

func FilterTopErrorsTasks(clientAuth *model.Auth, startTime, endTime *time.Time, logGroupName string, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetErrorBreakdownData added in v1.11.4

func GetErrorBreakdownData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]interface{}, error)

func GetErrorMessageCountData added in v1.8.1

func GetErrorMessageCountData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetFunctionByAvailabilityZone added in v1.12.6

func GetFunctionByAvailabilityZone(clientAuth *model.Auth) (string, map[string]interface{}, error)

func GetFunctionCallerDetails added in v1.12.6

func GetFunctionCallerDetails(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetFunctionPanel added in v1.2.4

func GetFunctionPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs)

func GetFunctionThrottlesCount added in v1.2.4

func GetFunctionThrottlesCount(cloudWatchClient *cloudwatch.CloudWatch, functionName *string) (int, error)

func GetIdleLambdaFunctionCount added in v1.2.4

func GetIdleLambdaFunctionCount(clientAuth *model.Auth, lambdaClient *lambda.Lambda) (int, error)

func GetInvocationTrendData added in v1.8.1

func GetInvocationTrendData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetLambdaBreakdownData added in v1.11.4

func GetLambdaBreakdownData(input *cloudwatch.GetMetricStatisticsInput, clientAuth *model.Auth, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (float64, error)

func GetLambdaColdStartData added in v1.7.9

func GetLambdaColdStartData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaConcurrencyData added in v1.7.3

func GetLambdaConcurrencyData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaConcurrencyGraphData added in v1.10.9

func GetLambdaConcurrencyGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaCpuData added in v1.2.4

func GetLambdaCpuData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaDeadLetterErrorsTrendsEvents added in v1.11.1

func GetLambdaDeadLetterErrorsTrendsEvents(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetLambdaDurationData added in v1.11.3

func GetLambdaDurationData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaErrorAndWarningData added in v1.9.1

func GetLambdaErrorAndWarningData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetLambdaErrorData

func GetLambdaErrorData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]interface{}, error)

func GetLambdaErrorGraphData added in v1.10.9

func GetLambdaErrorGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaErrorTrendEvents added in v1.10.10

func GetLambdaErrorTrendEvents(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetLambdaExecutionTimeMetricData added in v1.8.0

func GetLambdaExecutionTimeMetricData(clientAuth *model.Auth, startTime, endTime time.Time, cloudWatchClient *cloudwatch.CloudWatch, functionName string) (*cloudwatch.GetMetricDataOutput, error)

func GetLambdaExecutionTimePanel added in v1.8.0

func GetLambdaExecutionTimePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, *map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaFailureCount added in v1.2.4

func GetLambdaFailureCount(clientAuth *model.Auth, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (float64, error)

func GetLambdaFailureData added in v1.2.4

func GetLambdaFailureData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]float64, error)

func GetLambdaFullConcurrencyData added in v1.11.3

func GetLambdaFullConcurrencyData(cmd *cobra.Command, clientAuth *model.Auth, lambdaClient *lambda.Lambda) (string, map[string]int, error)

func GetLambdaFunctionsByRegion added in v1.8.4

func GetLambdaFunctionsByRegion(clientAuth *model.Auth) (string, map[string]interface{}, error)

func GetLambdaIdleFunctionData added in v1.2.4

func GetLambdaIdleFunctionData(clientAuth *model.Auth, lambdaClient *lambda.Lambda) (int, error)

func GetLambdaInvocationData added in v1.11.3

func GetLambdaInvocationData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaInvocationsGraphData added in v1.10.9

func GetLambdaInvocationsGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaLatencyData added in v1.2.4

func GetLambdaLatencyData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaLatencyGraphData added in v1.10.9

func GetLambdaLatencyGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaLocationOfCaller added in v1.12.6

func GetLambdaLocationOfCaller(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetLambdaMaxMemoryData added in v1.7.7

func GetLambdaMaxMemoryData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaMaxMemoryGraphData added in v1.7.7

func GetLambdaMaxMemoryGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaMemoryData added in v1.2.4

func GetLambdaMemoryData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaMemoryMetricData added in v1.7.7

func GetLambdaMemoryMetricData(clientAuth *model.Auth, startTime, endTime time.Time, cloudWatchClient *cloudwatch.CloudWatch, functionName string) (*cloudwatch.GetMetricDataOutput, error)

func GetLambdaMemoryUsageData added in v1.11.3

func GetLambdaMemoryUsageData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaNetReceivedData added in v1.2.4

func GetLambdaNetReceivedData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaNumberOfCallsMetricData added in v1.7.10

func GetLambdaNumberOfCallsMetricData(clientAuth *model.Auth, instanceId, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetLambdaNumberOfCallsPanel added in v1.7.10

func GetLambdaNumberOfCallsPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaRequestData added in v1.2.4

func GetLambdaRequestData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]float64, error)

func GetLambdaRequestMetricValue added in v1.2.4

func GetLambdaRequestMetricValue(clientAuth *model.Auth, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (float64, error)

func GetLambdaResponseTimeGraphData added in v1.10.10

func GetLambdaResponseTimeGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaResponseTimeMetricValue added in v1.10.10

func GetLambdaResponseTimeMetricValue(clientAuth *model.Auth, instanceId string, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetLambdaSuccessFailedCountData added in v1.11.1

func GetLambdaSuccessFailedCountData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaSuccessFailedCountMetricValue added in v1.11.1

func GetLambdaSuccessFailedCountMetricValue(clientAuth *model.Auth, instanceId string, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetLambdaThrottleData

func GetLambdaThrottleData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaThrottleMetricData

func GetLambdaThrottleMetricData(clientAuth *model.Auth, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetLambdaThrottlesCountMetricValue added in v1.10.9

func GetLambdaThrottlesCountMetricValue(clientAuth *model.Auth, instanceId string, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetLambdaThrottlesFunctionData added in v1.2.4

func GetLambdaThrottlesFunctionData(clientAuth *model.Auth) (int, error)

func GetLambdaThrottlesGraphData added in v1.10.9

func GetLambdaThrottlesGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaTopErrorsEvents added in v1.10.10

func GetLambdaTopErrorsEvents(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetLambdaTopFailurePanel added in v1.10.10

func GetLambdaTopFailurePanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetLambdaTotalFunctionData added in v1.2.4

func GetLambdaTotalFunctionData(clientAuth *model.Auth, lambdaClient *lambda.Lambda) (string, map[string]float64, error)

func GetLambdaTrendsCountMetricValue added in v1.10.10

func GetLambdaTrendsCountMetricValue(clientAuth *model.Auth, instanceId string, elementType string, startTime, endTime *time.Time, statistic string, cloudWatchClient *cloudwatch.CloudWatch) (*cloudwatch.GetMetricDataOutput, error)

func GetLambdaTrendsData added in v1.2.4

func GetLambdaTrendsData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]interface{}, error)

func GetLambdaTrendsGraphData added in v1.10.10

func GetLambdaTrendsGraphData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, map[string]*cloudwatch.GetMetricDataOutput, error)

func GetLambdaUnreservedConcurrencyCommmand added in v1.11.3

func GetLambdaUnreservedConcurrencyCommmand(cmd *cobra.Command, clientAuth *model.Auth, lambdaClient *lambda.Lambda) (string, map[string]int, error)

func GetLambdaUnusedMemoryPanel added in v1.7.7

func GetLambdaUnusedMemoryPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchClient *cloudwatch.CloudWatch) (string, *map[string]*cloudwatch.GetMetricDataOutput, error)

func GetThrottlingTrendsData added in v1.8.1

func GetThrottlingTrendsData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetTopFailureFunctionsLogData added in v1.11.1

func GetTopFailureFunctionsLogData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetTopLambdaInMultipleRegionsData added in v1.12.6

func GetTopLambdaInMultipleRegionsData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetTopLambdaZonesData added in v1.11.7

func GetTopLambdaZonesData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetTopUsedFunctionsLogData added in v1.11.1

func GetTopUsedFunctionsLogData(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]*cloudwatchlogs.GetQueryResultsOutput, error)

func GetTotalFailureFunctionsPanel added in v1.2.7

func GetTotalFailureFunctionsPanel(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs)

func GetTotalLambdaErrorInvocations added in v1.2.4

func GetTotalLambdaErrorInvocations(clientAuth *model.Auth, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (float64, error)

func GetTotalLambdaErrors added in v1.2.4

func GetTotalLambdaErrors(clientAuth *model.Auth, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (float64, error)

func GetTotalLambdaFunctions added in v1.2.4

func GetTotalLambdaFunctions(clientAuth *model.Auth, lambdaClient *lambda.Lambda) (int, error)

func GetTotalLambdaInvocations added in v1.2.4

func GetTotalLambdaInvocations(clientAuth *model.Auth, startTime, endTime *time.Time, cloudWatchClient *cloudwatch.CloudWatch) (float64, error)

func ProcessQueryResult added in v1.10.10

func ProcessQueryResults added in v1.8.1

func ProcessQueryResultsa added in v1.12.6

func ProcessQueryResultss added in v1.10.10

func ProcessQueryResultsss added in v1.10.10

func ProcessQueryResultsss(results []*cloudwatchlogs.GetQueryResultsOutput) []*cloudwatchlogs.GetQueryResultsOutput

func ProcessQuerysResult added in v1.11.1

func ProcessQuerysResults added in v1.11.1

func ProcessQuerysResultss added in v1.11.1

func ProcessQuerysResultss(results []*cloudwatchlogs.GetQueryResultsOutput) []*cloudwatchlogs.GetQueryResultsOutput

func ProcesssQueryResults added in v1.11.7

Types

type BreakdownResult added in v1.11.4

type BreakdownResult struct {
	ErrorPercentage  float64 `json:"ErrorPercentage"`
	Value            float64 `json:"Value"`
	PercentageChange float64 `json:"PercentageChange"`
	ChangeType       string  `json:"ChangeType"`
}

type ErrorResult

type ErrorResult struct {
	Value            float64 `json:"Value"`
	PercentageChange float64 `json:"PercentageChange"`
	ChangeType       string  `json:"ChangeType"`
}

type ExecutionTimeData added in v1.8.0

type ExecutionTimeData struct {
	FunctionName string
	ResponseTime float64
	Duration     float64
}

type FailureResult added in v1.2.4

type FailureResult struct {
	Value float64 `json:"Value"`
}

type FunctionDetails added in v1.2.7

type FunctionDetails struct {
	FunctionName string
	Timestamp    string
	FailureCount int64
}

FunctionDetails struct to hold details of a function

type NumberOfCallsResult added in v1.7.10

type NumberOfCallsResult struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"number_of_calls_panel"`
}

type Request added in v1.2.4

type Request struct {
	Value float64 `json:"Value"`
}

type ResData added in v1.11.3

type ResData struct {
	EventTime    string `json:"eventTime"`
	EventVersion string `json:"eventVersion"`
	Frequency    string `json:"frequency"`
	FunctionName string `json:"functionName"`
}

func GetLambdaTopLambdaWarningsData added in v1.11.3

func GetLambdaTopLambdaWarningsData(cmd *cobra.Command, clientAuth *model.Auth, logClient *cloudwatchlogs.CloudWatchLogs) (string, []ResData, error)

type ResponseTimeGraph added in v1.10.10

type ResponseTimeGraph struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"response_time_graph_panel"`
}

func ProcessLambdaResponseTimeRawData added in v1.10.10

func ProcessLambdaResponseTimeRawData(result *cloudwatch.GetMetricDataOutput) ResponseTimeGraph

type ResultData added in v1.11.4

type ResultData struct {
	EventTime    string `json:"eventTime"`
	EventVersion string `json:"eventVersion"`
	Frequency    string `json:"frequency"`
	FunctionName string `json:"functionName"`
}

func GetLambdaTopErrorsMessagesEvents added in v1.10.10

func GetLambdaTopErrorsMessagesEvents(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) (string, []ResultData, error)

type ResultData1 added in v1.12.6

type ResultData1 struct {
	Field string
	Value string
}

func GetLambdaWarningBreakdown added in v1.12.6

func GetLambdaWarningBreakdown(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) ([]ResultData1, error)

func PollQueryResults added in v1.12.6

func PollQueryResults(cloudWatchLogs *cloudwatchlogs.CloudWatchLogs, queryID string) ([]ResultData1, error)

type SuccessFailedCount added in v1.11.1

type SuccessFailedCount struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
		Values    float64
	} `json:"success_and_failed_function_panel"`
}

func ProcessLambdaSuccessFailedCountRawData added in v1.11.1

func ProcessLambdaSuccessFailedCountRawData(result *cloudwatch.GetMetricDataOutput) SuccessFailedCount

type ThrottleData added in v1.7.8

type ThrottleData struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"RawData"`
}

type ThrottlesGraph added in v1.10.9

type ThrottlesGraph struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"throttles_graph_panel"`
}

func ProcessLambdaThrottlesRawData added in v1.10.9

func ProcessLambdaThrottlesRawData(result *cloudwatch.GetMetricDataOutput) ThrottlesGraph

type TotalFunctionResult added in v1.2.4

type TotalFunctionResult struct {
	Value float64 `json:"Value"`
}

type TrendsGraph added in v1.10.10

type TrendsGraph struct {
	RawData []struct {
		Timestamp time.Time
		Value     float64
	} `json:"trends_graph_panel"`
}

func ProcessLambdaTrendsRawData added in v1.10.10

func ProcessLambdaTrendsRawData(result *cloudwatch.GetMetricDataOutput) TrendsGraph

type UnusedMemoryData added in v1.7.7

type UnusedMemoryData struct {
	FunctionName             string
	AvgUnusedAllocatedMemory float64
	MaxMemoryUsedAvg         float64
}

type WarningResultData added in v1.12.6

type WarningResultData struct {
	EventTime    string `json:"eventTime"`
	EventVersion string `json:"eventVersion"`
	Frequency    string `json:"frequency"`
	FunctionName string `json:"functionName"`
}

func GetLambdaTopWarningMessagesEvents added in v1.12.6

func GetLambdaTopWarningMessagesEvents(cmd *cobra.Command, clientAuth *model.Auth, cloudWatchLogs *cloudwatchlogs.CloudWatchLogs) (string, []WarningResultData, error)

Jump to

Keyboard shortcuts

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