func()

in cloudwatch/cloudwatch.go [163:180]


func (config OutputPluginConfig) Validate() error {
	errorStr := "%s is a required parameter"
	if config.Region == "" {
		return fmt.Errorf(errorStr, "region")
	}
	if config.LogGroupName == "" {
		return fmt.Errorf(errorStr, "log_group_name")
	}
	if config.LogStreamName == "" && config.LogStreamPrefix == "" {
		return fmt.Errorf("log_stream_name or log_stream_prefix is required")
	}

	if config.LogStreamName != "" && config.LogStreamPrefix != "" {
		return fmt.Errorf("either log_stream_name or log_stream_prefix can be configured. They cannot be provided together")
	}

	return nil
}