batch

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BatchCalls = []types.AWSService{
	{
		Name: "batch:ListJobs",
		Call: func(ctx context.Context, sess *session.Session) (interface{}, error) {
			svc := batch.New(sess)
			output, err := svc.ListJobsWithContext(ctx, &batch.ListJobsInput{})
			if err != nil {
				return nil, err
			} else {
				return output, nil
			}
		},
		Process: func(output interface{}, err error, debug bool) []types.ScanResult {
			var results []types.ScanResult

			if err != nil {
				utils.HandleAWSError(debug, "batch:ListJobs", err)
				return []types.ScanResult{
					{
						ServiceName: "Batch",
						MethodName:  "batch:ListJobs",
						Error:       err,
						Timestamp:   time.Now(),
					},
				}
			}

			if jobs, ok := output.(*batch.ListJobsOutput); ok {
				for _, job := range jobs.JobSummaryList {
					results = append(results, types.ScanResult{
						ServiceName:  "Batch",
						MethodName:   "batch:ListJobs",
						ResourceType: "job",
						ResourceName: *job.JobName,
						Details:      map[string]interface{}{},
						Timestamp:    time.Now(),
					})

					utils.PrintResult(debug, "", "batch:ListJobs", *job.JobName, nil)
				}
			}
			return results
		},
		ModuleName: types.DefaultModuleName,
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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