batch

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 7 Imported by: 40

Documentation

Overview

Package batch provides the client and types for making API requests to AWS Batch.

AWS Batch enables you to run batch computing workloads on the AWS Cloud. Batch computing is a common way for developers, scientists, and engineers to access large amounts of compute resources, and AWS Batch removes the undifferentiated heavy lifting of configuring and managing the required infrastructure. AWS Batch will be familiar to users of traditional batch computing software. This service can efficiently provision resources in response to jobs submitted in order to eliminate capacity constraints, reduce compute costs, and deliver results quickly.

As a fully managed service, AWS Batch enables developers, scientists, and engineers to run batch computing workloads of any scale. AWS Batch automatically provisions compute resources and optimizes the workload distribution based on the quantity and scale of the workloads. With AWS Batch, there is no need to install or manage batch computing software, which allows you to focus on analyzing results and solving problems. AWS Batch reduces operational complexities, saves time, and reduces costs, which makes it easy for developers, scientists, and engineers to run their batch jobs in the AWS Cloud.

See https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10 for more information on this service.

See batch package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/batch/

Using the Client

To use AWS Batch with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the AWS Batch client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/batch/#New

Index

Examples

Constants

View Source
const (
	ServiceName = "AWS Batch" // Service's name
	ServiceID   = "Batch"     // Service's identifier
	EndpointsID = "batch"     // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeException for service response error code
	// "Exception".
	//
	// These errors are usually caused by a client action, such as using an action
	// or resource on behalf of a user that doesn't have permissions to use the
	// action or resource, or specifying an identifier that is not valid.
	ErrCodeException = "Exception"

	// ErrCodeServerException for service response error code
	// "ServerException".
	//
	// These errors are usually caused by a server issue.
	ErrCodeServerException = "ServerException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayJobDependency added in v0.2.0

type ArrayJobDependency string
const (
	ArrayJobDependencyNToN       ArrayJobDependency = "N_TO_N"
	ArrayJobDependencySequential ArrayJobDependency = "SEQUENTIAL"
)

Enum values for ArrayJobDependency

func (ArrayJobDependency) MarshalValue added in v0.3.0

func (enum ArrayJobDependency) MarshalValue() (string, error)

func (ArrayJobDependency) MarshalValueBuf added in v0.3.0

func (enum ArrayJobDependency) MarshalValueBuf(b []byte) ([]byte, error)

type ArrayProperties added in v0.2.0

type ArrayProperties struct {

	// The size of the array job.
	Size *int64 `locationName:"size" type:"integer"`
	// contains filtered or unexported fields
}

An object representing an AWS Batch array job.

func (ArrayProperties) MarshalFields added in v0.3.0

func (s ArrayProperties) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ArrayProperties) String added in v0.2.0

func (s ArrayProperties) String() string

String returns the string representation

type ArrayPropertiesDetail added in v0.2.0

type ArrayPropertiesDetail struct {

	// The job index within the array that is associated with this job. This parameter
	// is returned for array job children.
	Index *int64 `locationName:"index" type:"integer"`

	// The size of the array job. This parameter is returned for parent array jobs.
	Size *int64 `locationName:"size" type:"integer"`

	// A summary of the number of array job children in each available job status.
	// This parameter is returned for parent array jobs.
	StatusSummary map[string]int64 `locationName:"statusSummary" type:"map"`
	// contains filtered or unexported fields
}

An object representing the array properties of a job.

func (ArrayPropertiesDetail) MarshalFields added in v0.3.0

func (s ArrayPropertiesDetail) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ArrayPropertiesDetail) String added in v0.2.0

func (s ArrayPropertiesDetail) String() string

String returns the string representation

type ArrayPropertiesSummary added in v0.2.0

type ArrayPropertiesSummary struct {

	// The job index within the array that is associated with this job. This parameter
	// is returned for children of array jobs.
	Index *int64 `locationName:"index" type:"integer"`

	// The size of the array job. This parameter is returned for parent array jobs.
	Size *int64 `locationName:"size" type:"integer"`
	// contains filtered or unexported fields
}

An object representing the array properties of a job.

func (ArrayPropertiesSummary) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ArrayPropertiesSummary) String added in v0.2.0

func (s ArrayPropertiesSummary) String() string

String returns the string representation

type AttemptContainerDetail

type AttemptContainerDetail struct {

	// The Amazon Resource Name (ARN) of the Amazon ECS container instance that
	// hosts the job attempt.
	ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"`

	// The exit code for the job attempt. A non-zero exit code is considered a failure.
	ExitCode *int64 `locationName:"exitCode" type:"integer"`

	// The name of the CloudWatch Logs log stream associated with the container.
	// The log group for AWS Batch jobs is /aws/batch/job. Each container attempt
	// receives a log stream name when they reach the RUNNING status.
	LogStreamName *string `locationName:"logStreamName" type:"string"`

	// The network interfaces associated with the job attempt.
	NetworkInterfaces []NetworkInterface `locationName:"networkInterfaces" type:"list"`

	// A short (255 max characters) human-readable string to provide additional
	// details about a running or stopped container.
	Reason *string `locationName:"reason" type:"string"`

	// The Amazon Resource Name (ARN) of the Amazon ECS task that is associated
	// with the job attempt. Each container attempt receives a task ARN when they
	// reach the STARTING status.
	TaskArn *string `locationName:"taskArn" type:"string"`
	// contains filtered or unexported fields
}

An object representing the details of a container that is part of a job attempt.

func (AttemptContainerDetail) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (AttemptContainerDetail) String

func (s AttemptContainerDetail) String() string

String returns the string representation

type AttemptDetail

type AttemptDetail struct {

	// Details about the container in this job attempt.
	Container *AttemptContainerDetail `locationName:"container" type:"structure"`

	// The Unix timestamp (in seconds and milliseconds) for when the attempt was
	// started (when the attempt transitioned from the STARTING state to the RUNNING
	// state).
	StartedAt *int64 `locationName:"startedAt" type:"long"`

	// A short, human-readable string to provide additional details about the current
	// status of the job attempt.
	StatusReason *string `locationName:"statusReason" type:"string"`

	// The Unix timestamp (in seconds and milliseconds) for when the attempt was
	// stopped (when the attempt transitioned from the RUNNING state to a terminal
	// state, such as SUCCEEDED or FAILED).
	StoppedAt *int64 `locationName:"stoppedAt" type:"long"`
	// contains filtered or unexported fields
}

An object representing a job attempt.

func (AttemptDetail) MarshalFields added in v0.3.0

func (s AttemptDetail) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (AttemptDetail) String

func (s AttemptDetail) String() string

String returns the string representation

type CEState

type CEState string
const (
	CEStateEnabled  CEState = "ENABLED"
	CEStateDisabled CEState = "DISABLED"
)

Enum values for CEState

func (CEState) MarshalValue added in v0.3.0

func (enum CEState) MarshalValue() (string, error)

func (CEState) MarshalValueBuf added in v0.3.0

func (enum CEState) MarshalValueBuf(b []byte) ([]byte, error)

type CEStatus

type CEStatus string
const (
	CEStatusCreating CEStatus = "CREATING"
	CEStatusUpdating CEStatus = "UPDATING"
	CEStatusDeleting CEStatus = "DELETING"
	CEStatusDeleted  CEStatus = "DELETED"
	CEStatusValid    CEStatus = "VALID"
	CEStatusInvalid  CEStatus = "INVALID"
)

Enum values for CEStatus

func (CEStatus) MarshalValue added in v0.3.0

func (enum CEStatus) MarshalValue() (string, error)

func (CEStatus) MarshalValueBuf added in v0.3.0

func (enum CEStatus) MarshalValueBuf(b []byte) ([]byte, error)

type CEType

type CEType string
const (
	CETypeManaged   CEType = "MANAGED"
	CETypeUnmanaged CEType = "UNMANAGED"
)

Enum values for CEType

func (CEType) MarshalValue added in v0.3.0

func (enum CEType) MarshalValue() (string, error)

func (CEType) MarshalValueBuf added in v0.3.0

func (enum CEType) MarshalValueBuf(b []byte) ([]byte, error)

type CRType

type CRType string
const (
	CRTypeEc2  CRType = "EC2"
	CRTypeSpot CRType = "SPOT"
)

Enum values for CRType

func (CRType) MarshalValue added in v0.3.0

func (enum CRType) MarshalValue() (string, error)

func (CRType) MarshalValueBuf added in v0.3.0

func (enum CRType) MarshalValueBuf(b []byte) ([]byte, error)

type CancelJobInput

type CancelJobInput struct {

	// The AWS Batch job ID of the job to cancel.
	//
	// JobId is a required field
	JobId *string `locationName:"jobId" type:"string" required:"true"`

	// A message to attach to the job that explains the reason for canceling it.
	// This message is returned by future DescribeJobs operations on the job. This
	// message is also recorded in the AWS Batch activity logs.
	//
	// Reason is a required field
	Reason *string `locationName:"reason" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CancelJobInput) MarshalFields added in v0.3.0

func (s CancelJobInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CancelJobInput) String

func (s CancelJobInput) String() string

String returns the string representation

func (*CancelJobInput) Validate

func (s *CancelJobInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CancelJobOutput

type CancelJobOutput struct {
	// contains filtered or unexported fields
}

func (CancelJobOutput) MarshalFields added in v0.3.0

func (s CancelJobOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CancelJobOutput) String

func (s CancelJobOutput) String() string

String returns the string representation

type CancelJobRequest

type CancelJobRequest struct {
	*aws.Request
	Input *CancelJobInput
	Copy  func(*CancelJobInput) CancelJobRequest
}

CancelJobRequest is the request type for the CancelJob API operation.

func (CancelJobRequest) Send

Send marshals and sends the CancelJob API request.

type CancelJobResponse added in v0.9.0

type CancelJobResponse struct {
	*CancelJobOutput
	// contains filtered or unexported fields
}

CancelJobResponse is the response type for the CancelJob API operation.

func (*CancelJobResponse) SDKResponseMetdata added in v0.9.0

func (r *CancelJobResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CancelJob request.

type Client added in v0.9.0

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to AWS Batch. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := batch.New(myConfig)

func (*Client) CancelJobRequest added in v0.9.0

func (c *Client) CancelJobRequest(input *CancelJobInput) CancelJobRequest

CancelJobRequest returns a request value for making API operation for AWS Batch.

Cancels a job in an AWS Batch job queue. Jobs that are in the SUBMITTED, PENDING, or RUNNABLE state are cancelled. Jobs that have progressed to STARTING or RUNNING are not cancelled (but the API operation still succeeds, even if no job is cancelled); these jobs must be terminated with the TerminateJob operation.

// Example sending a request using CancelJobRequest.
req := client.CancelJobRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJob

Example (Shared00)

To cancel a job

This example cancels a job with the specified job ID.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.CancelJobInput{
		JobId:  aws.String("1d828f65-7a4d-42e8-996d-3b900ed59dc4"),
		Reason: aws.String("Cancelling job."),
	}

	req := svc.CancelJobRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreateComputeEnvironmentRequest added in v0.9.0

func (c *Client) CreateComputeEnvironmentRequest(input *CreateComputeEnvironmentInput) CreateComputeEnvironmentRequest

CreateComputeEnvironmentRequest returns a request value for making API operation for AWS Batch.

Creates an AWS Batch compute environment. You can create MANAGED or UNMANAGED compute environments.

In a managed compute environment, AWS Batch manages the capacity and instance types of the compute resources within the environment. This is based on the compute resource specification that you define or the launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) that you specify when you create the compute environment. You can choose to use Amazon EC2 On-Demand Instances or Spot Instances in your managed compute environment. You can optionally set a maximum price so that Spot Instances only launch when the Spot Instance price is below a specified percentage of the On-Demand price.

Multi-node parallel jobs are not supported on Spot Instances.

In an unmanaged compute environment, you can manage your own compute resources. This provides more compute resource configuration options, such as using a custom AMI, but you must ensure that your AMI meets the Amazon ECS container instance AMI specification. For more information, see Container Instance AMIs (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container_instance_AMIs.html) in the Amazon Elastic Container Service Developer Guide. After you have created your unmanaged compute environment, you can use the DescribeComputeEnvironments operation to find the Amazon ECS cluster that is associated with it. Then, manually launch your container instances into that Amazon ECS cluster. For more information, see Launching an Amazon ECS Container Instance (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html) in the Amazon Elastic Container Service Developer Guide.

AWS Batch does not upgrade the AMIs in a compute environment after it is created (for example, when a newer version of the Amazon ECS-optimized AMI is available). You are responsible for the management of the guest operating system (including updates and security patches) and any additional application software or utilities that you install on the compute resources. To use a new AMI for your AWS Batch jobs:

Create a new compute environment with the new AMI.

Add the compute environment to an existing job queue.

Remove the old compute environment from your job queue.

Delete the old compute environment.

// Example sending a request using CreateComputeEnvironmentRequest.
req := client.CreateComputeEnvironmentRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironment

Example (Shared00)

To create a managed EC2 compute environment

This example creates a managed compute environment with specific C4 instance types that are launched on demand. The compute environment is called C4OnDemand.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.CreateComputeEnvironmentInput{
		ComputeEnvironmentName: aws.String("C4OnDemand"),
		ComputeResources: &batch.ComputeResource{
			DesiredvCpus: aws.Int64(48),
			Ec2KeyPair:   aws.String("id_rsa"),
			InstanceRole: aws.String("ecsInstanceRole"),
			InstanceTypes: []string{
				"c4.large",
				"c4.xlarge",
				"c4.2xlarge",
				"c4.4xlarge",
				"c4.8xlarge",
			},
			MaxvCpus: aws.Int64(128),
			MinvCpus: aws.Int64(0),
			SecurityGroupIds: []string{
				"sg-cf5093b2",
			},
			Subnets: []string{
				"subnet-220c0e0a",
				"subnet-1a95556d",
				"subnet-978f6dce",
			},
			Tags: map[string]string{
				"Name": "Batch Instance - C4OnDemand",
			},
			Type: batch.CRTypeEc2,
		},
		ServiceRole: aws.String("arn:aws:iam::012345678910:role/AWSBatchServiceRole"),
		State:       batch.CEStateEnabled,
		Type:        batch.CETypeManaged,
	}

	req := svc.CreateComputeEnvironmentRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To create a managed EC2 Spot compute environment

This example creates a managed compute environment with the M4 instance type that is launched when the Spot bid price is at or below 20% of the On-Demand price for the instance type. The compute environment is called M4Spot.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.CreateComputeEnvironmentInput{
		ComputeEnvironmentName: aws.String("M4Spot"),
		ComputeResources: &batch.ComputeResource{
			BidPercentage: aws.Int64(20),
			DesiredvCpus:  aws.Int64(4),
			Ec2KeyPair:    aws.String("id_rsa"),
			InstanceRole:  aws.String("ecsInstanceRole"),
			InstanceTypes: []string{
				"m4",
			},
			MaxvCpus: aws.Int64(128),
			MinvCpus: aws.Int64(0),
			SecurityGroupIds: []string{
				"sg-cf5093b2",
			},
			SpotIamFleetRole: aws.String("arn:aws:iam::012345678910:role/aws-ec2-spot-fleet-role"),
			Subnets: []string{
				"subnet-220c0e0a",
				"subnet-1a95556d",
				"subnet-978f6dce",
			},
			Tags: map[string]string{
				"Name": "Batch Instance - M4Spot",
			},
			Type: batch.CRTypeSpot,
		},
		ServiceRole: aws.String("arn:aws:iam::012345678910:role/AWSBatchServiceRole"),
		State:       batch.CEStateEnabled,
		Type:        batch.CETypeManaged,
	}

	req := svc.CreateComputeEnvironmentRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreateJobQueueRequest added in v0.9.0

func (c *Client) CreateJobQueueRequest(input *CreateJobQueueInput) CreateJobQueueRequest

CreateJobQueueRequest returns a request value for making API operation for AWS Batch.

Creates an AWS Batch job queue. When you create a job queue, you associate one or more compute environments to the queue and assign an order of preference for the compute environments.

You also set a priority to the job queue that determines the order in which the AWS Batch scheduler places jobs onto its associated compute environments. For example, if a compute environment is associated with more than one job queue, the job queue with a higher priority is given preference for scheduling jobs to that compute environment.

// Example sending a request using CreateJobQueueRequest.
req := client.CreateJobQueueRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueue

Example (Shared00)

To create a job queue with a single compute environment

This example creates a job queue called LowPriority that uses the M4Spot compute environment.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.CreateJobQueueInput{
		ComputeEnvironmentOrder: []batch.ComputeEnvironmentOrder{
			{
				ComputeEnvironment: aws.String("M4Spot"),
				Order:              aws.Int64(1),
			},
		},
		JobQueueName: aws.String("LowPriority"),
		Priority:     aws.Int64(1),
		State:        batch.JQStateEnabled,
	}

	req := svc.CreateJobQueueRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To create a job queue with multiple compute environments

This example creates a job queue called HighPriority that uses the C4OnDemand compute environment with an order of 1 and the M4Spot compute environment with an order of 2.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.CreateJobQueueInput{
		ComputeEnvironmentOrder: []batch.ComputeEnvironmentOrder{
			{
				ComputeEnvironment: aws.String("C4OnDemand"),
				Order:              aws.Int64(1),
			},
			{
				ComputeEnvironment: aws.String("M4Spot"),
				Order:              aws.Int64(2),
			},
		},
		JobQueueName: aws.String("HighPriority"),
		Priority:     aws.Int64(10),
		State:        batch.JQStateEnabled,
	}

	req := svc.CreateJobQueueRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeleteComputeEnvironmentRequest added in v0.9.0

func (c *Client) DeleteComputeEnvironmentRequest(input *DeleteComputeEnvironmentInput) DeleteComputeEnvironmentRequest

DeleteComputeEnvironmentRequest returns a request value for making API operation for AWS Batch.

Deletes an AWS Batch compute environment.

Before you can delete a compute environment, you must set its state to DISABLED with the UpdateComputeEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation.

// Example sending a request using DeleteComputeEnvironmentRequest.
req := client.DeleteComputeEnvironmentRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironment

Example (Shared00)

To delete a compute environment

This example deletes the P2OnDemand compute environment.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.DeleteComputeEnvironmentInput{
		ComputeEnvironment: aws.String("P2OnDemand"),
	}

	req := svc.DeleteComputeEnvironmentRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeleteJobQueueRequest added in v0.9.0

func (c *Client) DeleteJobQueueRequest(input *DeleteJobQueueInput) DeleteJobQueueRequest

DeleteJobQueueRequest returns a request value for making API operation for AWS Batch.

Deletes the specified job queue. You must first disable submissions for a queue with the UpdateJobQueue operation. All jobs in the queue are terminated when you delete a job queue.

It is not necessary to disassociate compute environments from a queue before submitting a DeleteJobQueue request.

// Example sending a request using DeleteJobQueueRequest.
req := client.DeleteJobQueueRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueue

Example (Shared00)

To delete a job queue

This example deletes the GPGPU job queue.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.DeleteJobQueueInput{
		JobQueue: aws.String("GPGPU"),
	}

	req := svc.DeleteJobQueueRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeregisterJobDefinitionRequest added in v0.9.0

func (c *Client) DeregisterJobDefinitionRequest(input *DeregisterJobDefinitionInput) DeregisterJobDefinitionRequest

DeregisterJobDefinitionRequest returns a request value for making API operation for AWS Batch.

Deregisters an AWS Batch job definition.

// Example sending a request using DeregisterJobDefinitionRequest.
req := client.DeregisterJobDefinitionRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinition

Example (Shared00)

To deregister a job definition

This example deregisters a job definition called sleep10.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.DeregisterJobDefinitionInput{
		JobDefinition: aws.String("sleep10"),
	}

	req := svc.DeregisterJobDefinitionRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeComputeEnvironmentsRequest added in v0.9.0

func (c *Client) DescribeComputeEnvironmentsRequest(input *DescribeComputeEnvironmentsInput) DescribeComputeEnvironmentsRequest

DescribeComputeEnvironmentsRequest returns a request value for making API operation for AWS Batch.

Describes one or more of your compute environments.

If you are using an unmanaged compute environment, you can use the DescribeComputeEnvironment operation to determine the ecsClusterArn that you should launch your Amazon ECS container instances into.

// Example sending a request using DescribeComputeEnvironmentsRequest.
req := client.DescribeComputeEnvironmentsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironments

Example (Shared00)

To describe a compute environment

This example describes the P2OnDemand compute environment.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.DescribeComputeEnvironmentsInput{
		ComputeEnvironments: []string{
			"P2OnDemand",
		},
	}

	req := svc.DescribeComputeEnvironmentsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeJobDefinitionsRequest added in v0.9.0

func (c *Client) DescribeJobDefinitionsRequest(input *DescribeJobDefinitionsInput) DescribeJobDefinitionsRequest

DescribeJobDefinitionsRequest returns a request value for making API operation for AWS Batch.

Describes a list of job definitions. You can specify a status (such as ACTIVE) to only return job definitions that match that status.

// Example sending a request using DescribeJobDefinitionsRequest.
req := client.DescribeJobDefinitionsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitions

Example (Shared00)

To describe active job definitions

This example describes all of your active job definitions.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.DescribeJobDefinitionsInput{
		Status: aws.String("ACTIVE"),
	}

	req := svc.DescribeJobDefinitionsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeJobQueuesRequest added in v0.9.0

func (c *Client) DescribeJobQueuesRequest(input *DescribeJobQueuesInput) DescribeJobQueuesRequest

DescribeJobQueuesRequest returns a request value for making API operation for AWS Batch.

Describes one or more of your job queues.

// Example sending a request using DescribeJobQueuesRequest.
req := client.DescribeJobQueuesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueues

Example (Shared00)

To describe a job queue

This example describes the HighPriority job queue.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.DescribeJobQueuesInput{
		JobQueues: []string{
			"HighPriority",
		},
	}

	req := svc.DescribeJobQueuesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeJobsRequest added in v0.9.0

func (c *Client) DescribeJobsRequest(input *DescribeJobsInput) DescribeJobsRequest

DescribeJobsRequest returns a request value for making API operation for AWS Batch.

Describes a list of AWS Batch jobs.

// Example sending a request using DescribeJobsRequest.
req := client.DescribeJobsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobs

Example (Shared00)

To describe a specific job

This example describes a job with the specified job ID.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.DescribeJobsInput{
		Jobs: []string{
			"24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9",
		},
	}

	req := svc.DescribeJobsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ListJobsRequest added in v0.9.0

func (c *Client) ListJobsRequest(input *ListJobsInput) ListJobsRequest

ListJobsRequest returns a request value for making API operation for AWS Batch.

Returns a list of AWS Batch jobs.

You must specify only one of the following:

  • a job queue ID to return a list of jobs in that job queue

  • a multi-node parallel job ID to return a list of that job's nodes

  • an array job ID to return a list of that job's children

You can filter the results by job status with the jobStatus parameter. If you do not specify a status, only RUNNING jobs are returned.

// Example sending a request using ListJobsRequest.
req := client.ListJobsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobs

Example (Shared00)

To list running jobs

This example lists the running jobs in the HighPriority job queue.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.ListJobsInput{
		JobQueue: aws.String("HighPriority"),
	}

	req := svc.ListJobsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To list submitted jobs

This example lists jobs in the HighPriority job queue that are in the SUBMITTED job status.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.ListJobsInput{
		JobQueue:  aws.String("HighPriority"),
		JobStatus: batch.JobStatusSubmitted,
	}

	req := svc.ListJobsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) RegisterJobDefinitionRequest added in v0.9.0

func (c *Client) RegisterJobDefinitionRequest(input *RegisterJobDefinitionInput) RegisterJobDefinitionRequest

RegisterJobDefinitionRequest returns a request value for making API operation for AWS Batch.

Registers an AWS Batch job definition.

// Example sending a request using RegisterJobDefinitionRequest.
req := client.RegisterJobDefinitionRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinition

Example (Shared00)

To register a job definition

This example registers a job definition for a simple container job.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.RegisterJobDefinitionInput{
		ContainerProperties: &batch.ContainerProperties{
			Command: []string{
				"sleep",
				"10",
			},
			Image:  aws.String("busybox"),
			Memory: aws.Int64(128),
			Vcpus:  aws.Int64(1),
		},
		JobDefinitionName: aws.String("sleep10"),
		Type:              batch.JobDefinitionTypeContainer,
	}

	req := svc.RegisterJobDefinitionRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) SubmitJobRequest added in v0.9.0

func (c *Client) SubmitJobRequest(input *SubmitJobInput) SubmitJobRequest

SubmitJobRequest returns a request value for making API operation for AWS Batch.

Submits an AWS Batch job from a job definition. Parameters specified during SubmitJob override parameters defined in the job definition.

// Example sending a request using SubmitJobRequest.
req := client.SubmitJobRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJob

Example (Shared00)

To submit a job to a queue

This example submits a simple container job called example to the HighPriority job queue.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.SubmitJobInput{
		JobDefinition: aws.String("sleep60"),
		JobName:       aws.String("example"),
		JobQueue:      aws.String("HighPriority"),
	}

	req := svc.SubmitJobRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) TerminateJobRequest added in v0.9.0

func (c *Client) TerminateJobRequest(input *TerminateJobInput) TerminateJobRequest

TerminateJobRequest returns a request value for making API operation for AWS Batch.

Terminates a job in a job queue. Jobs that are in the STARTING or RUNNING state are terminated, which causes them to transition to FAILED. Jobs that have not progressed to the STARTING state are cancelled.

// Example sending a request using TerminateJobRequest.
req := client.TerminateJobRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJob

Example (Shared00)

To terminate a job

This example terminates a job with the specified job ID.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.TerminateJobInput{
		JobId:  aws.String("61e743ed-35e4-48da-b2de-5c8333821c84"),
		Reason: aws.String("Terminating job."),
	}

	req := svc.TerminateJobRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) UpdateComputeEnvironmentRequest added in v0.9.0

func (c *Client) UpdateComputeEnvironmentRequest(input *UpdateComputeEnvironmentInput) UpdateComputeEnvironmentRequest

UpdateComputeEnvironmentRequest returns a request value for making API operation for AWS Batch.

Updates an AWS Batch compute environment.

// Example sending a request using UpdateComputeEnvironmentRequest.
req := client.UpdateComputeEnvironmentRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironment

Example (Shared00)

To update a compute environment

This example disables the P2OnDemand compute environment so it can be deleted.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.UpdateComputeEnvironmentInput{
		ComputeEnvironment: aws.String("P2OnDemand"),
		State:              batch.CEStateDisabled,
	}

	req := svc.UpdateComputeEnvironmentRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) UpdateJobQueueRequest added in v0.9.0

func (c *Client) UpdateJobQueueRequest(input *UpdateJobQueueInput) UpdateJobQueueRequest

UpdateJobQueueRequest returns a request value for making API operation for AWS Batch.

Updates a job queue.

// Example sending a request using UpdateJobQueueRequest.
req := client.UpdateJobQueueRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueue

Example (Shared00)

To update a job queue

This example disables a job queue so that it can be deleted.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/batch"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := batch.New(cfg)
	input := &batch.UpdateJobQueueInput{
		JobQueue: aws.String("GPGPU"),
		State:    batch.JQStateDisabled,
	}

	req := svc.UpdateJobQueueRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case batch.ErrCodeException:
				fmt.Println(batch.ErrCodeException, aerr.Error())
			case batch.ErrCodeServerException:
				fmt.Println(batch.ErrCodeServerException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

type ComputeEnvironmentDetail

type ComputeEnvironmentDetail struct {

	// The Amazon Resource Name (ARN) of the compute environment.
	//
	// ComputeEnvironmentArn is a required field
	ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string" required:"true"`

	// The name of the compute environment.
	//
	// ComputeEnvironmentName is a required field
	ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string" required:"true"`

	// The compute resources defined for the compute environment.
	ComputeResources *ComputeResource `locationName:"computeResources" type:"structure"`

	// The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used
	// by the compute environment.
	//
	// EcsClusterArn is a required field
	EcsClusterArn *string `locationName:"ecsClusterArn" type:"string" required:"true"`

	// The service role associated with the compute environment that allows AWS
	// Batch to make calls to AWS API operations on your behalf.
	ServiceRole *string `locationName:"serviceRole" type:"string"`

	// The state of the compute environment. The valid values are ENABLED or DISABLED.
	//
	// If the state is ENABLED, then the AWS Batch scheduler can attempt to place
	// jobs from an associated job queue on the compute resources within the environment.
	// If the compute environment is managed, then it can scale its instances out
	// or in automatically, based on the job queue demand.
	//
	// If the state is DISABLED, then the AWS Batch scheduler does not attempt to
	// place jobs within the environment. Jobs in a STARTING or RUNNING state continue
	// to progress normally. Managed compute environments in the DISABLED state
	// do not scale out. However, they scale in to minvCpus value after instances
	// become idle.
	State CEState `locationName:"state" type:"string" enum:"true"`

	// The current status of the compute environment (for example, CREATING or VALID).
	Status CEStatus `locationName:"status" type:"string" enum:"true"`

	// A short, human-readable string to provide additional details about the current
	// status of the compute environment.
	StatusReason *string `locationName:"statusReason" type:"string"`

	// The type of the compute environment.
	Type CEType `locationName:"type" type:"string" enum:"true"`
	// contains filtered or unexported fields
}

An object representing an AWS Batch compute environment.

func (ComputeEnvironmentDetail) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ComputeEnvironmentDetail) String

func (s ComputeEnvironmentDetail) String() string

String returns the string representation

type ComputeEnvironmentOrder

type ComputeEnvironmentOrder struct {

	// The Amazon Resource Name (ARN) of the compute environment.
	//
	// ComputeEnvironment is a required field
	ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"`

	// The order of the compute environment.
	//
	// Order is a required field
	Order *int64 `locationName:"order" type:"integer" required:"true"`
	// contains filtered or unexported fields
}

The order in which compute environments are tried for job placement within a queue. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first.

func (ComputeEnvironmentOrder) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ComputeEnvironmentOrder) String

func (s ComputeEnvironmentOrder) String() string

String returns the string representation

func (*ComputeEnvironmentOrder) Validate

func (s *ComputeEnvironmentOrder) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ComputeResource

type ComputeResource struct {

	// The maximum percentage that a Spot Instance price can be when compared with
	// the On-Demand price for that instance type before instances are launched.
	// For example, if your maximum percentage is 20%, then the Spot price must
	// be below 20% of the current On-Demand price for that EC2 instance. You always
	// pay the lowest (market) price and never more than your maximum percentage.
	// If you leave this field empty, the default value is 100% of the On-Demand
	// price.
	BidPercentage *int64 `locationName:"bidPercentage" type:"integer"`

	// The desired number of EC2 vCPUS in the compute environment.
	DesiredvCpus *int64 `locationName:"desiredvCpus" type:"integer"`

	// The EC2 key pair that is used for instances launched in the compute environment.
	Ec2KeyPair *string `locationName:"ec2KeyPair" type:"string"`

	// The Amazon Machine Image (AMI) ID used for instances launched in the compute
	// environment.
	ImageId *string `locationName:"imageId" type:"string"`

	// The Amazon ECS instance profile applied to Amazon EC2 instances in a compute
	// environment. You can specify the short name or full Amazon Resource Name
	// (ARN) of an instance profile. For example, ecsInstanceRole or arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole
	// . For more information, see Amazon ECS Instance Role (https://docs.aws.amazon.com/batch/latest/userguide/instance_IAM_role.html)
	// in the AWS Batch User Guide.
	//
	// InstanceRole is a required field
	InstanceRole *string `locationName:"instanceRole" type:"string" required:"true"`

	// The instances types that may be launched. You can specify instance families
	// to launch any instance type within those families (for example, c4 or p3),
	// or you can specify specific sizes within a family (such as c4.8xlarge). You
	// can also choose optimal to pick instance types (from the C, M, and R instance
	// families) on the fly that match the demand of your job queues.
	//
	// InstanceTypes is a required field
	InstanceTypes []string `locationName:"instanceTypes" type:"list" required:"true"`

	// The launch template to use for your compute resources. Any other compute
	// resource parameters that you specify in a CreateComputeEnvironment API operation
	// override the same parameters in the launch template. You must specify either
	// the launch template ID or launch template name in the request, but not both.
	// For more information, see Launch Template Support (https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html)
	// in the AWS Batch User Guide.
	LaunchTemplate *LaunchTemplateSpecification `locationName:"launchTemplate" type:"structure"`

	// The maximum number of EC2 vCPUs that an environment can reach.
	//
	// MaxvCpus is a required field
	MaxvCpus *int64 `locationName:"maxvCpus" type:"integer" required:"true"`

	// The minimum number of EC2 vCPUs that an environment should maintain (even
	// if the compute environment is DISABLED).
	//
	// MinvCpus is a required field
	MinvCpus *int64 `locationName:"minvCpus" type:"integer" required:"true"`

	// The Amazon EC2 placement group to associate with your compute resources.
	// If you intend to submit multi-node parallel jobs to your compute environment,
	// you should consider creating a cluster placement group and associate it with
	// your compute resources. This keeps your multi-node parallel job on a logical
	// grouping of instances within a single Availability Zone with high network
	// flow potential. For more information, see Placement Groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
	// in the Amazon EC2 User Guide for Linux Instances.
	PlacementGroup *string `locationName:"placementGroup" type:"string"`

	// The EC2 security group that is associated with instances launched in the
	// compute environment.
	SecurityGroupIds []string `locationName:"securityGroupIds" type:"list"`

	// The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied
	// to a SPOT compute environment. For more information, see Amazon EC2 Spot
	// Fleet Role (https://docs.aws.amazon.com/batch/latest/userguide/spot_fleet_IAM_role.html)
	// in the AWS Batch User Guide.
	SpotIamFleetRole *string `locationName:"spotIamFleetRole" type:"string"`

	// The VPC subnets into which the compute resources are launched. For more information,
	// see VPCs and Subnets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html)
	// in the Amazon VPC User Guide.
	//
	// Subnets is a required field
	Subnets []string `locationName:"subnets" type:"list" required:"true"`

	// Key-value pair tags to be applied to resources that are launched in the compute
	// environment. For AWS Batch, these take the form of "String1": "String2",
	// where String1 is the tag key and String2 is the tag value—for example,
	// { "Name": "AWS Batch Instance - C4OnDemand" }.
	Tags map[string]string `locationName:"tags" type:"map"`

	// The type of compute environment: EC2 or SPOT.
	//
	// Type is a required field
	Type CRType `locationName:"type" type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

An object representing an AWS Batch compute resource.

func (ComputeResource) MarshalFields added in v0.3.0

func (s ComputeResource) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ComputeResource) String

func (s ComputeResource) String() string

String returns the string representation

func (*ComputeResource) Validate

func (s *ComputeResource) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ComputeResourceUpdate

type ComputeResourceUpdate struct {

	// The desired number of EC2 vCPUS in the compute environment.
	DesiredvCpus *int64 `locationName:"desiredvCpus" type:"integer"`

	// The maximum number of EC2 vCPUs that an environment can reach.
	MaxvCpus *int64 `locationName:"maxvCpus" type:"integer"`

	// The minimum number of EC2 vCPUs that an environment should maintain.
	MinvCpus *int64 `locationName:"minvCpus" type:"integer"`
	// contains filtered or unexported fields
}

An object representing the attributes of a compute environment that can be updated.

func (ComputeResourceUpdate) MarshalFields added in v0.3.0

func (s ComputeResourceUpdate) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ComputeResourceUpdate) String

func (s ComputeResourceUpdate) String() string

String returns the string representation

type ContainerDetail

type ContainerDetail struct {

	// The command that is passed to the container.
	Command []string `locationName:"command" type:"list"`

	// The Amazon Resource Name (ARN) of the container instance on which the container
	// is running.
	ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"`

	// The environment variables to pass to a container.
	//
	// Environment variables must not start with AWS_BATCH; this naming convention
	// is reserved for variables that are set by the AWS Batch service.
	Environment []KeyValuePair `locationName:"environment" type:"list"`

	// The exit code to return upon completion.
	ExitCode *int64 `locationName:"exitCode" type:"integer"`

	// The image used to start the container.
	Image *string `locationName:"image" type:"string"`

	// The instance type of the underlying host infrastructure of a multi-node parallel
	// job.
	InstanceType *string `locationName:"instanceType" type:"string"`

	// The Amazon Resource Name (ARN) associated with the job upon execution.
	JobRoleArn *string `locationName:"jobRoleArn" type:"string"`

	// Linux-specific modifications that are applied to the container, such as details
	// for device mappings.
	LinuxParameters *LinuxParameters `locationName:"linuxParameters" type:"structure"`

	// The name of the CloudWatch Logs log stream associated with the container.
	// The log group for AWS Batch jobs is /aws/batch/job. Each container attempt
	// receives a log stream name when they reach the RUNNING status.
	LogStreamName *string `locationName:"logStreamName" type:"string"`

	// The number of MiB of memory reserved for the job.
	Memory *int64 `locationName:"memory" type:"integer"`

	// The mount points for data volumes in your container.
	MountPoints []MountPoint `locationName:"mountPoints" type:"list"`

	// The network interfaces associated with the job.
	NetworkInterfaces []NetworkInterface `locationName:"networkInterfaces" type:"list"`

	// When this parameter is true, the container is given elevated privileges on
	// the host container instance (similar to the root user).
	Privileged *bool `locationName:"privileged" type:"boolean"`

	// When this parameter is true, the container is given read-only access to its
	// root file system.
	ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"`

	// A short (255 max characters) human-readable string to provide additional
	// details about a running or stopped container.
	Reason *string `locationName:"reason" type:"string"`

	// The type and amount of a resource to assign to a container. Currently, the
	// only supported resource is GPU.
	ResourceRequirements []ResourceRequirement `locationName:"resourceRequirements" type:"list"`

	// The Amazon Resource Name (ARN) of the Amazon ECS task that is associated
	// with the container job. Each container attempt receives a task ARN when they
	// reach the STARTING status.
	TaskArn *string `locationName:"taskArn" type:"string"`

	// A list of ulimit values to set in the container.
	Ulimits []Ulimit `locationName:"ulimits" type:"list"`

	// The user name to use inside the container.
	User *string `locationName:"user" type:"string"`

	// The number of VCPUs allocated for the job.
	Vcpus *int64 `locationName:"vcpus" type:"integer"`

	// A list of volumes associated with the job.
	Volumes []Volume `locationName:"volumes" type:"list"`
	// contains filtered or unexported fields
}

An object representing the details of a container that is part of a job.

func (ContainerDetail) MarshalFields added in v0.3.0

func (s ContainerDetail) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ContainerDetail) String

func (s ContainerDetail) String() string

String returns the string representation

type ContainerOverrides

type ContainerOverrides struct {

	// The command to send to the container that overrides the default command from
	// the Docker image or the job definition.
	Command []string `locationName:"command" type:"list"`

	// The environment variables to send to the container. You can add new environment
	// variables, which are added to the container at launch, or you can override
	// the existing environment variables from the Docker image or the job definition.
	//
	// Environment variables must not start with AWS_BATCH; this naming convention
	// is reserved for variables that are set by the AWS Batch service.
	Environment []KeyValuePair `locationName:"environment" type:"list"`

	// The instance type to use for a multi-node parallel job. This parameter is
	// not valid for single-node container jobs.
	InstanceType *string `locationName:"instanceType" type:"string"`

	// The number of MiB of memory reserved for the job. This value overrides the
	// value set in the job definition.
	Memory *int64 `locationName:"memory" type:"integer"`

	// The type and amount of a resource to assign to a container. This value overrides
	// the value set in the job definition. Currently, the only supported resource
	// is GPU.
	ResourceRequirements []ResourceRequirement `locationName:"resourceRequirements" type:"list"`

	// The number of vCPUs to reserve for the container. This value overrides the
	// value set in the job definition.
	Vcpus *int64 `locationName:"vcpus" type:"integer"`
	// contains filtered or unexported fields
}

The overrides that should be sent to a container.

func (ContainerOverrides) MarshalFields added in v0.3.0

func (s ContainerOverrides) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ContainerOverrides) String

func (s ContainerOverrides) String() string

String returns the string representation

func (*ContainerOverrides) Validate added in v0.8.0

func (s *ContainerOverrides) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ContainerProperties

type ContainerProperties struct {

	// The command that is passed to the container. This parameter maps to Cmd in
	// the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/).
	// For more information, see https://docs.docker.com/engine/reference/builder/#cmd
	// (https://docs.docker.com/engine/reference/builder/#cmd).
	Command []string `locationName:"command" type:"list"`

	// The environment variables to pass to a container. This parameter maps to
	// Env in the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the --env option to docker run (https://docs.docker.com/engine/reference/run/).
	//
	// We do not recommend using plaintext environment variables for sensitive information,
	// such as credential data.
	//
	// Environment variables must not start with AWS_BATCH; this naming convention
	// is reserved for variables that are set by the AWS Batch service.
	Environment []KeyValuePair `locationName:"environment" type:"list"`

	// The image used to start a container. This string is passed directly to the
	// Docker daemon. Images in the Docker Hub registry are available by default.
	// Other repositories are specified with repository-url/image:tag . Up to 255
	// letters (uppercase and lowercase), numbers, hyphens, underscores, colons,
	// periods, forward slashes, and number signs are allowed. This parameter maps
	// to Image in the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/).
	//
	//    * Images in Amazon ECR repositories use the full registry and repository
	//    URI (for example, 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>).
	//
	//    * Images in official repositories on Docker Hub use a single name (for
	//    example, ubuntu or mongo).
	//
	//    * Images in other repositories on Docker Hub are qualified with an organization
	//    name (for example, amazon/amazon-ecs-agent).
	//
	//    * Images in other online repositories are qualified further by a domain
	//    name (for example, quay.io/assemblyline/ubuntu).
	Image *string `locationName:"image" type:"string"`

	// The instance type to use for a multi-node parallel job. Currently all node
	// groups in a multi-node parallel job must use the same instance type. This
	// parameter is not valid for single-node container jobs.
	InstanceType *string `locationName:"instanceType" type:"string"`

	// The Amazon Resource Name (ARN) of the IAM role that the container can assume
	// for AWS permissions.
	JobRoleArn *string `locationName:"jobRoleArn" type:"string"`

	// Linux-specific modifications that are applied to the container, such as details
	// for device mappings.
	LinuxParameters *LinuxParameters `locationName:"linuxParameters" type:"structure"`

	// The hard limit (in MiB) of memory to present to the container. If your container
	// attempts to exceed the memory specified here, the container is killed. This
	// parameter maps to Memory in the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the --memory option to docker run (https://docs.docker.com/engine/reference/run/).
	// You must specify at least 4 MiB of memory for a job.
	//
	// If you are trying to maximize your resource utilization by providing your
	// jobs as much memory as possible for a particular instance type, see Memory
	// Management (https://docs.aws.amazon.com/batch/latest/userguide/memory-management.html)
	// in the AWS Batch User Guide.
	Memory *int64 `locationName:"memory" type:"integer"`

	// The mount points for data volumes in your container. This parameter maps
	// to Volumes in the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the --volume option to docker run (https://docs.docker.com/engine/reference/run/).
	MountPoints []MountPoint `locationName:"mountPoints" type:"list"`

	// When this parameter is true, the container is given elevated privileges on
	// the host container instance (similar to the root user). This parameter maps
	// to Privileged in the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/).
	Privileged *bool `locationName:"privileged" type:"boolean"`

	// When this parameter is true, the container is given read-only access to its
	// root file system. This parameter maps to ReadonlyRootfs in the Create a container
	// (https://docs.docker.com/engine/api/v1.23/#create-a-container) section of
	// the Docker Remote API (https://docs.docker.com/engine/api/v1.23/) and the
	// --read-only option to docker run.
	ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"`

	// The type and amount of a resource to assign to a container. Currently, the
	// only supported resource is GPU.
	ResourceRequirements []ResourceRequirement `locationName:"resourceRequirements" type:"list"`

	// A list of ulimits to set in the container. This parameter maps to Ulimits
	// in the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/).
	Ulimits []Ulimit `locationName:"ulimits" type:"list"`

	// The user name to use inside the container. This parameter maps to User in
	// the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the --user option to docker run (https://docs.docker.com/engine/reference/run/).
	User *string `locationName:"user" type:"string"`

	// The number of vCPUs reserved for the container. This parameter maps to CpuShares
	// in the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/).
	// Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one
	// vCPU.
	Vcpus *int64 `locationName:"vcpus" type:"integer"`

	// A list of data volumes used in a job.
	Volumes []Volume `locationName:"volumes" type:"list"`
	// contains filtered or unexported fields
}

Container properties are used in job definitions to describe the container that is launched as part of a job.

func (ContainerProperties) MarshalFields added in v0.3.0

func (s ContainerProperties) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ContainerProperties) String

func (s ContainerProperties) String() string

String returns the string representation

func (*ContainerProperties) Validate

func (s *ContainerProperties) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ContainerSummary added in v0.2.0

type ContainerSummary struct {

	// The exit code to return upon completion.
	ExitCode *int64 `locationName:"exitCode" type:"integer"`

	// A short (255 max characters) human-readable string to provide additional
	// details about a running or stopped container.
	Reason *string `locationName:"reason" type:"string"`
	// contains filtered or unexported fields
}

An object representing summary details of a container within a job.

func (ContainerSummary) MarshalFields added in v0.3.0

func (s ContainerSummary) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ContainerSummary) String added in v0.2.0

func (s ContainerSummary) String() string

String returns the string representation

type CreateComputeEnvironmentInput

type CreateComputeEnvironmentInput struct {

	// The name for your compute environment. Up to 128 letters (uppercase and lowercase),
	// numbers, hyphens, and underscores are allowed.
	//
	// ComputeEnvironmentName is a required field
	ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string" required:"true"`

	// Details of the compute resources managed by the compute environment. This
	// parameter is required for managed compute environments. For more information,
	// see Compute Environments (https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html)
	// in the AWS Batch User Guide.
	ComputeResources *ComputeResource `locationName:"computeResources" type:"structure"`

	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch
	// to make calls to other AWS services on your behalf.
	//
	// If your specified role has a path other than /, then you must either specify
	// the full role ARN (this is recommended) or prefix the role name with the
	// path.
	//
	// Depending on how you created your AWS Batch service role, its ARN may contain
	// the service-role path prefix. When you only specify the name of the service
	// role, AWS Batch assumes that your ARN does not use the service-role path
	// prefix. Because of this, we recommend that you specify the full ARN of your
	// service role when you create compute environments.
	//
	// ServiceRole is a required field
	ServiceRole *string `locationName:"serviceRole" type:"string" required:"true"`

	// The state of the compute environment. If the state is ENABLED, then the compute
	// environment accepts jobs from a queue and can scale out automatically based
	// on queues.
	State CEState `locationName:"state" type:"string" enum:"true"`

	// The type of the compute environment. For more information, see Compute Environments
	// (https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html)
	// in the AWS Batch User Guide.
	//
	// Type is a required field
	Type CEType `locationName:"type" type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (CreateComputeEnvironmentInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CreateComputeEnvironmentInput) String

String returns the string representation

func (*CreateComputeEnvironmentInput) Validate

func (s *CreateComputeEnvironmentInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateComputeEnvironmentOutput

type CreateComputeEnvironmentOutput struct {

	// The Amazon Resource Name (ARN) of the compute environment.
	ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string"`

	// The name of the compute environment.
	ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string"`
	// contains filtered or unexported fields
}

func (CreateComputeEnvironmentOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CreateComputeEnvironmentOutput) String

String returns the string representation

type CreateComputeEnvironmentRequest

type CreateComputeEnvironmentRequest struct {
	*aws.Request
	Input *CreateComputeEnvironmentInput
	Copy  func(*CreateComputeEnvironmentInput) CreateComputeEnvironmentRequest
}

CreateComputeEnvironmentRequest is the request type for the CreateComputeEnvironment API operation.

func (CreateComputeEnvironmentRequest) Send

Send marshals and sends the CreateComputeEnvironment API request.

type CreateComputeEnvironmentResponse added in v0.9.0

type CreateComputeEnvironmentResponse struct {
	*CreateComputeEnvironmentOutput
	// contains filtered or unexported fields
}

CreateComputeEnvironmentResponse is the response type for the CreateComputeEnvironment API operation.

func (*CreateComputeEnvironmentResponse) SDKResponseMetdata added in v0.9.0

func (r *CreateComputeEnvironmentResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateComputeEnvironment request.

type CreateJobQueueInput

type CreateJobQueueInput struct {

	// The set of compute environments mapped to a job queue and their order relative
	// to each other. The job scheduler uses this parameter to determine which compute
	// environment should execute a given job. Compute environments must be in the
	// VALID state before you can associate them with a job queue. You can associate
	// up to three compute environments with a job queue.
	//
	// ComputeEnvironmentOrder is a required field
	ComputeEnvironmentOrder []ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list" required:"true"`

	// The name of the job queue.
	//
	// JobQueueName is a required field
	JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"`

	// The priority of the job queue. Job queues with a higher priority (or a higher
	// integer value for the priority parameter) are evaluated first when associated
	// with the same compute environment. Priority is determined in descending order,
	// for example, a job queue with a priority value of 10 is given scheduling
	// preference over a job queue with a priority value of 1.
	//
	// Priority is a required field
	Priority *int64 `locationName:"priority" type:"integer" required:"true"`

	// The state of the job queue. If the job queue state is ENABLED, it is able
	// to accept jobs.
	State JQState `locationName:"state" type:"string" enum:"true"`
	// contains filtered or unexported fields
}

func (CreateJobQueueInput) MarshalFields added in v0.3.0

func (s CreateJobQueueInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CreateJobQueueInput) String

func (s CreateJobQueueInput) String() string

String returns the string representation

func (*CreateJobQueueInput) Validate

func (s *CreateJobQueueInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateJobQueueOutput

type CreateJobQueueOutput struct {

	// The Amazon Resource Name (ARN) of the job queue.
	//
	// JobQueueArn is a required field
	JobQueueArn *string `locationName:"jobQueueArn" type:"string" required:"true"`

	// The name of the job queue.
	//
	// JobQueueName is a required field
	JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CreateJobQueueOutput) MarshalFields added in v0.3.0

func (s CreateJobQueueOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CreateJobQueueOutput) String

func (s CreateJobQueueOutput) String() string

String returns the string representation

type CreateJobQueueRequest

type CreateJobQueueRequest struct {
	*aws.Request
	Input *CreateJobQueueInput
	Copy  func(*CreateJobQueueInput) CreateJobQueueRequest
}

CreateJobQueueRequest is the request type for the CreateJobQueue API operation.

func (CreateJobQueueRequest) Send

Send marshals and sends the CreateJobQueue API request.

type CreateJobQueueResponse added in v0.9.0

type CreateJobQueueResponse struct {
	*CreateJobQueueOutput
	// contains filtered or unexported fields
}

CreateJobQueueResponse is the response type for the CreateJobQueue API operation.

func (*CreateJobQueueResponse) SDKResponseMetdata added in v0.9.0

func (r *CreateJobQueueResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateJobQueue request.

type DeleteComputeEnvironmentInput

type DeleteComputeEnvironmentInput struct {

	// The name or Amazon Resource Name (ARN) of the compute environment to delete.
	//
	// ComputeEnvironment is a required field
	ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteComputeEnvironmentInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeleteComputeEnvironmentInput) String

String returns the string representation

func (*DeleteComputeEnvironmentInput) Validate

func (s *DeleteComputeEnvironmentInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteComputeEnvironmentOutput

type DeleteComputeEnvironmentOutput struct {
	// contains filtered or unexported fields
}

func (DeleteComputeEnvironmentOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeleteComputeEnvironmentOutput) String

String returns the string representation

type DeleteComputeEnvironmentRequest

type DeleteComputeEnvironmentRequest struct {
	*aws.Request
	Input *DeleteComputeEnvironmentInput
	Copy  func(*DeleteComputeEnvironmentInput) DeleteComputeEnvironmentRequest
}

DeleteComputeEnvironmentRequest is the request type for the DeleteComputeEnvironment API operation.

func (DeleteComputeEnvironmentRequest) Send

Send marshals and sends the DeleteComputeEnvironment API request.

type DeleteComputeEnvironmentResponse added in v0.9.0

type DeleteComputeEnvironmentResponse struct {
	*DeleteComputeEnvironmentOutput
	// contains filtered or unexported fields
}

DeleteComputeEnvironmentResponse is the response type for the DeleteComputeEnvironment API operation.

func (*DeleteComputeEnvironmentResponse) SDKResponseMetdata added in v0.9.0

func (r *DeleteComputeEnvironmentResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteComputeEnvironment request.

type DeleteJobQueueInput

type DeleteJobQueueInput struct {

	// The short name or full Amazon Resource Name (ARN) of the queue to delete.
	//
	// JobQueue is a required field
	JobQueue *string `locationName:"jobQueue" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteJobQueueInput) MarshalFields added in v0.3.0

func (s DeleteJobQueueInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeleteJobQueueInput) String

func (s DeleteJobQueueInput) String() string

String returns the string representation

func (*DeleteJobQueueInput) Validate

func (s *DeleteJobQueueInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteJobQueueOutput

type DeleteJobQueueOutput struct {
	// contains filtered or unexported fields
}

func (DeleteJobQueueOutput) MarshalFields added in v0.3.0

func (s DeleteJobQueueOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeleteJobQueueOutput) String

func (s DeleteJobQueueOutput) String() string

String returns the string representation

type DeleteJobQueueRequest

type DeleteJobQueueRequest struct {
	*aws.Request
	Input *DeleteJobQueueInput
	Copy  func(*DeleteJobQueueInput) DeleteJobQueueRequest
}

DeleteJobQueueRequest is the request type for the DeleteJobQueue API operation.

func (DeleteJobQueueRequest) Send

Send marshals and sends the DeleteJobQueue API request.

type DeleteJobQueueResponse added in v0.9.0

type DeleteJobQueueResponse struct {
	*DeleteJobQueueOutput
	// contains filtered or unexported fields
}

DeleteJobQueueResponse is the response type for the DeleteJobQueue API operation.

func (*DeleteJobQueueResponse) SDKResponseMetdata added in v0.9.0

func (r *DeleteJobQueueResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteJobQueue request.

type DeregisterJobDefinitionInput

type DeregisterJobDefinitionInput struct {

	// The name and revision (name:revision) or full Amazon Resource Name (ARN)
	// of the job definition to deregister.
	//
	// JobDefinition is a required field
	JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeregisterJobDefinitionInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeregisterJobDefinitionInput) String

String returns the string representation

func (*DeregisterJobDefinitionInput) Validate

func (s *DeregisterJobDefinitionInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeregisterJobDefinitionOutput

type DeregisterJobDefinitionOutput struct {
	// contains filtered or unexported fields
}

func (DeregisterJobDefinitionOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeregisterJobDefinitionOutput) String

String returns the string representation

type DeregisterJobDefinitionRequest

type DeregisterJobDefinitionRequest struct {
	*aws.Request
	Input *DeregisterJobDefinitionInput
	Copy  func(*DeregisterJobDefinitionInput) DeregisterJobDefinitionRequest
}

DeregisterJobDefinitionRequest is the request type for the DeregisterJobDefinition API operation.

func (DeregisterJobDefinitionRequest) Send

Send marshals and sends the DeregisterJobDefinition API request.

type DeregisterJobDefinitionResponse added in v0.9.0

type DeregisterJobDefinitionResponse struct {
	*DeregisterJobDefinitionOutput
	// contains filtered or unexported fields
}

DeregisterJobDefinitionResponse is the response type for the DeregisterJobDefinition API operation.

func (*DeregisterJobDefinitionResponse) SDKResponseMetdata added in v0.9.0

func (r *DeregisterJobDefinitionResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeregisterJobDefinition request.

type DescribeComputeEnvironmentsInput

type DescribeComputeEnvironmentsInput struct {

	// A list of up to 100 compute environment names or full Amazon Resource Name
	// (ARN) entries.
	ComputeEnvironments []string `locationName:"computeEnvironments" type:"list"`

	// The maximum number of cluster results returned by DescribeComputeEnvironments
	// in paginated output. When this parameter is used, DescribeComputeEnvironments
	// only returns maxResults results in a single page along with a nextToken response
	// element. The remaining results of the initial request can be seen by sending
	// another DescribeComputeEnvironments request with the returned nextToken value.
	// This value can be between 1 and 100. If this parameter is not used, then
	// DescribeComputeEnvironments returns up to 100 results and a nextToken value
	// if applicable.
	MaxResults *int64 `locationName:"maxResults" type:"integer"`

	// The nextToken value returned from a previous paginated DescribeComputeEnvironments
	// request where maxResults was used and the results exceeded the value of that
	// parameter. Pagination continues from the end of the previous results that
	// returned the nextToken value. This value is null when there are no more results
	// to return.
	//
	// This token should be treated as an opaque identifier that is only used to
	// retrieve the next items in a list and not for other programmatic purposes.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (DescribeComputeEnvironmentsInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeComputeEnvironmentsInput) String

String returns the string representation

type DescribeComputeEnvironmentsOutput

type DescribeComputeEnvironmentsOutput struct {

	// The list of compute environments.
	ComputeEnvironments []ComputeEnvironmentDetail `locationName:"computeEnvironments" type:"list"`

	// The nextToken value to include in a future DescribeComputeEnvironments request.
	// When the results of a DescribeJobDefinitions request exceed maxResults, this
	// value can be used to retrieve the next page of results. This value is null
	// when there are no more results to return.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (DescribeComputeEnvironmentsOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeComputeEnvironmentsOutput) String

String returns the string representation

type DescribeComputeEnvironmentsPaginator added in v0.11.0

type DescribeComputeEnvironmentsPaginator struct {
	aws.Pager
}

DescribeComputeEnvironmentsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeComputeEnvironmentsPaginator added in v0.11.0

func NewDescribeComputeEnvironmentsPaginator(req DescribeComputeEnvironmentsRequest) DescribeComputeEnvironmentsPaginator

NewDescribeComputeEnvironmentsRequestPaginator returns a paginator for DescribeComputeEnvironments. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.DescribeComputeEnvironmentsRequest(input)
p := batch.NewDescribeComputeEnvironmentsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeComputeEnvironmentsPaginator) CurrentPage added in v0.11.0

type DescribeComputeEnvironmentsRequest

type DescribeComputeEnvironmentsRequest struct {
	*aws.Request
	Input *DescribeComputeEnvironmentsInput
	Copy  func(*DescribeComputeEnvironmentsInput) DescribeComputeEnvironmentsRequest
}

DescribeComputeEnvironmentsRequest is the request type for the DescribeComputeEnvironments API operation.

func (DescribeComputeEnvironmentsRequest) Send

Send marshals and sends the DescribeComputeEnvironments API request.

type DescribeComputeEnvironmentsResponse added in v0.9.0

type DescribeComputeEnvironmentsResponse struct {
	*DescribeComputeEnvironmentsOutput
	// contains filtered or unexported fields
}

DescribeComputeEnvironmentsResponse is the response type for the DescribeComputeEnvironments API operation.

func (*DescribeComputeEnvironmentsResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeComputeEnvironmentsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeComputeEnvironments request.

type DescribeJobDefinitionsInput

type DescribeJobDefinitionsInput struct {

	// The name of the job definition to describe.
	JobDefinitionName *string `locationName:"jobDefinitionName" type:"string"`

	// A list of up to 100 job definition names or full Amazon Resource Name (ARN)
	// entries.
	JobDefinitions []string `locationName:"jobDefinitions" type:"list"`

	// The maximum number of results returned by DescribeJobDefinitions in paginated
	// output. When this parameter is used, DescribeJobDefinitions only returns
	// maxResults results in a single page along with a nextToken response element.
	// The remaining results of the initial request can be seen by sending another
	// DescribeJobDefinitions request with the returned nextToken value. This value
	// can be between 1 and 100. If this parameter is not used, then DescribeJobDefinitions
	// returns up to 100 results and a nextToken value if applicable.
	MaxResults *int64 `locationName:"maxResults" type:"integer"`

	// The nextToken value returned from a previous paginated DescribeJobDefinitions
	// request where maxResults was used and the results exceeded the value of that
	// parameter. Pagination continues from the end of the previous results that
	// returned the nextToken value. This value is null when there are no more results
	// to return.
	//
	// This token should be treated as an opaque identifier that is only used to
	// retrieve the next items in a list and not for other programmatic purposes.
	NextToken *string `locationName:"nextToken" type:"string"`

	// The status with which to filter job definitions.
	Status *string `locationName:"status" type:"string"`
	// contains filtered or unexported fields
}

func (DescribeJobDefinitionsInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeJobDefinitionsInput) String

String returns the string representation

type DescribeJobDefinitionsOutput

type DescribeJobDefinitionsOutput struct {

	// The list of job definitions.
	JobDefinitions []JobDefinition `locationName:"jobDefinitions" type:"list"`

	// The nextToken value to include in a future DescribeJobDefinitions request.
	// When the results of a DescribeJobDefinitions request exceed maxResults, this
	// value can be used to retrieve the next page of results. This value is null
	// when there are no more results to return.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (DescribeJobDefinitionsOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeJobDefinitionsOutput) String

String returns the string representation

type DescribeJobDefinitionsPaginator added in v0.11.0

type DescribeJobDefinitionsPaginator struct {
	aws.Pager
}

DescribeJobDefinitionsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeJobDefinitionsPaginator added in v0.11.0

func NewDescribeJobDefinitionsPaginator(req DescribeJobDefinitionsRequest) DescribeJobDefinitionsPaginator

NewDescribeJobDefinitionsRequestPaginator returns a paginator for DescribeJobDefinitions. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.DescribeJobDefinitionsRequest(input)
p := batch.NewDescribeJobDefinitionsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeJobDefinitionsPaginator) CurrentPage added in v0.11.0

type DescribeJobDefinitionsRequest

type DescribeJobDefinitionsRequest struct {
	*aws.Request
	Input *DescribeJobDefinitionsInput
	Copy  func(*DescribeJobDefinitionsInput) DescribeJobDefinitionsRequest
}

DescribeJobDefinitionsRequest is the request type for the DescribeJobDefinitions API operation.

func (DescribeJobDefinitionsRequest) Send

Send marshals and sends the DescribeJobDefinitions API request.

type DescribeJobDefinitionsResponse added in v0.9.0

type DescribeJobDefinitionsResponse struct {
	*DescribeJobDefinitionsOutput
	// contains filtered or unexported fields
}

DescribeJobDefinitionsResponse is the response type for the DescribeJobDefinitions API operation.

func (*DescribeJobDefinitionsResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeJobDefinitionsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeJobDefinitions request.

type DescribeJobQueuesInput

type DescribeJobQueuesInput struct {

	// A list of up to 100 queue names or full queue Amazon Resource Name (ARN)
	// entries.
	JobQueues []string `locationName:"jobQueues" type:"list"`

	// The maximum number of results returned by DescribeJobQueues in paginated
	// output. When this parameter is used, DescribeJobQueues only returns maxResults
	// results in a single page along with a nextToken response element. The remaining
	// results of the initial request can be seen by sending another DescribeJobQueues
	// request with the returned nextToken value. This value can be between 1 and
	// 100. If this parameter is not used, then DescribeJobQueues returns up to
	// 100 results and a nextToken value if applicable.
	MaxResults *int64 `locationName:"maxResults" type:"integer"`

	// The nextToken value returned from a previous paginated DescribeJobQueues
	// request where maxResults was used and the results exceeded the value of that
	// parameter. Pagination continues from the end of the previous results that
	// returned the nextToken value. This value is null when there are no more results
	// to return.
	//
	// This token should be treated as an opaque identifier that is only used to
	// retrieve the next items in a list and not for other programmatic purposes.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (DescribeJobQueuesInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeJobQueuesInput) String

func (s DescribeJobQueuesInput) String() string

String returns the string representation

type DescribeJobQueuesOutput

type DescribeJobQueuesOutput struct {

	// The list of job queues.
	JobQueues []JobQueueDetail `locationName:"jobQueues" type:"list"`

	// The nextToken value to include in a future DescribeJobQueues request. When
	// the results of a DescribeJobQueues request exceed maxResults, this value
	// can be used to retrieve the next page of results. This value is null when
	// there are no more results to return.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (DescribeJobQueuesOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeJobQueuesOutput) String

func (s DescribeJobQueuesOutput) String() string

String returns the string representation

type DescribeJobQueuesPaginator added in v0.11.0

type DescribeJobQueuesPaginator struct {
	aws.Pager
}

DescribeJobQueuesPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeJobQueuesPaginator added in v0.11.0

func NewDescribeJobQueuesPaginator(req DescribeJobQueuesRequest) DescribeJobQueuesPaginator

NewDescribeJobQueuesRequestPaginator returns a paginator for DescribeJobQueues. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.DescribeJobQueuesRequest(input)
p := batch.NewDescribeJobQueuesRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeJobQueuesPaginator) CurrentPage added in v0.11.0

type DescribeJobQueuesRequest

type DescribeJobQueuesRequest struct {
	*aws.Request
	Input *DescribeJobQueuesInput
	Copy  func(*DescribeJobQueuesInput) DescribeJobQueuesRequest
}

DescribeJobQueuesRequest is the request type for the DescribeJobQueues API operation.

func (DescribeJobQueuesRequest) Send

Send marshals and sends the DescribeJobQueues API request.

type DescribeJobQueuesResponse added in v0.9.0

type DescribeJobQueuesResponse struct {
	*DescribeJobQueuesOutput
	// contains filtered or unexported fields
}

DescribeJobQueuesResponse is the response type for the DescribeJobQueues API operation.

func (*DescribeJobQueuesResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeJobQueuesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeJobQueues request.

type DescribeJobsInput

type DescribeJobsInput struct {

	// A list of up to 100 job IDs.
	//
	// Jobs is a required field
	Jobs []string `locationName:"jobs" type:"list" required:"true"`
	// contains filtered or unexported fields
}

func (DescribeJobsInput) MarshalFields added in v0.3.0

func (s DescribeJobsInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeJobsInput) String

func (s DescribeJobsInput) String() string

String returns the string representation

func (*DescribeJobsInput) Validate

func (s *DescribeJobsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeJobsOutput

type DescribeJobsOutput struct {

	// The list of jobs.
	Jobs []JobDetail `locationName:"jobs" type:"list"`
	// contains filtered or unexported fields
}

func (DescribeJobsOutput) MarshalFields added in v0.3.0

func (s DescribeJobsOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DescribeJobsOutput) String

func (s DescribeJobsOutput) String() string

String returns the string representation

type DescribeJobsRequest

type DescribeJobsRequest struct {
	*aws.Request
	Input *DescribeJobsInput
	Copy  func(*DescribeJobsInput) DescribeJobsRequest
}

DescribeJobsRequest is the request type for the DescribeJobs API operation.

func (DescribeJobsRequest) Send

Send marshals and sends the DescribeJobs API request.

type DescribeJobsResponse added in v0.9.0

type DescribeJobsResponse struct {
	*DescribeJobsOutput
	// contains filtered or unexported fields
}

DescribeJobsResponse is the response type for the DescribeJobs API operation.

func (*DescribeJobsResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeJobsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeJobs request.

type Device added in v0.11.0

type Device struct {

	// The path inside the container at which to expose the host device. By default
	// the hostPath value is used.
	ContainerPath *string `locationName:"containerPath" type:"string"`

	// The path for the device on the host container instance.
	//
	// HostPath is a required field
	HostPath *string `locationName:"hostPath" type:"string" required:"true"`

	// The explicit permissions to provide to the container for the device. By default,
	// the container has permissions for read, write, and mknod for the device.
	Permissions []DeviceCgroupPermission `locationName:"permissions" type:"list"`
	// contains filtered or unexported fields
}

An object representing a container instance host device.

func (Device) MarshalFields added in v0.11.0

func (s Device) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Device) String added in v0.11.0

func (s Device) String() string

String returns the string representation

func (*Device) Validate added in v0.11.0

func (s *Device) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeviceCgroupPermission added in v0.11.0

type DeviceCgroupPermission string
const (
	DeviceCgroupPermissionRead  DeviceCgroupPermission = "READ"
	DeviceCgroupPermissionWrite DeviceCgroupPermission = "WRITE"
	DeviceCgroupPermissionMknod DeviceCgroupPermission = "MKNOD"
)

Enum values for DeviceCgroupPermission

func (DeviceCgroupPermission) MarshalValue added in v0.11.0

func (enum DeviceCgroupPermission) MarshalValue() (string, error)

func (DeviceCgroupPermission) MarshalValueBuf added in v0.11.0

func (enum DeviceCgroupPermission) MarshalValueBuf(b []byte) ([]byte, error)

type Host

type Host struct {

	// The path on the host container instance that is presented to the container.
	// If this parameter is empty, then the Docker daemon has assigned a host path
	// for you. If this parameter contains a file location, then the data volume
	// persists at the specified location on the host container instance until you
	// delete it manually. If the source path location does not exist on the host
	// container instance, the Docker daemon creates it. If the location does exist,
	// the contents of the source path folder are exported.
	SourcePath *string `locationName:"sourcePath" type:"string"`
	// contains filtered or unexported fields
}

Determine whether your data volume persists on the host container instance and where it is stored. If this parameter is empty, then the Docker daemon assigns a host path for your data volume, but the data is not guaranteed to persist after the containers associated with it stop running.

func (Host) MarshalFields added in v0.3.0

func (s Host) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Host) String

func (s Host) String() string

String returns the string representation

type JQState

type JQState string
const (
	JQStateEnabled  JQState = "ENABLED"
	JQStateDisabled JQState = "DISABLED"
)

Enum values for JQState

func (JQState) MarshalValue added in v0.3.0

func (enum JQState) MarshalValue() (string, error)

func (JQState) MarshalValueBuf added in v0.3.0

func (enum JQState) MarshalValueBuf(b []byte) ([]byte, error)

type JQStatus

type JQStatus string
const (
	JQStatusCreating JQStatus = "CREATING"
	JQStatusUpdating JQStatus = "UPDATING"
	JQStatusDeleting JQStatus = "DELETING"
	JQStatusDeleted  JQStatus = "DELETED"
	JQStatusValid    JQStatus = "VALID"
	JQStatusInvalid  JQStatus = "INVALID"
)

Enum values for JQStatus

func (JQStatus) MarshalValue added in v0.3.0

func (enum JQStatus) MarshalValue() (string, error)

func (JQStatus) MarshalValueBuf added in v0.3.0

func (enum JQStatus) MarshalValueBuf(b []byte) ([]byte, error)

type JobDefinition

type JobDefinition struct {

	// An object with various properties specific to container-based jobs.
	ContainerProperties *ContainerProperties `locationName:"containerProperties" type:"structure"`

	// The Amazon Resource Name (ARN) for the job definition.
	//
	// JobDefinitionArn is a required field
	JobDefinitionArn *string `locationName:"jobDefinitionArn" type:"string" required:"true"`

	// The name of the job definition.
	//
	// JobDefinitionName is a required field
	JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"`

	// An object with various properties specific to multi-node parallel jobs.
	NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"`

	// Default parameters or parameter substitution placeholders that are set in
	// the job definition. Parameters are specified as a key-value pair mapping.
	// Parameters in a SubmitJob request override any corresponding parameter defaults
	// from the job definition. For more information about specifying parameters,
	// see Job Definition Parameters (https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html)
	// in the AWS Batch User Guide.
	Parameters map[string]string `locationName:"parameters" type:"map"`

	// The retry strategy to use for failed jobs that are submitted with this job
	// definition.
	RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"`

	// The revision of the job definition.
	//
	// Revision is a required field
	Revision *int64 `locationName:"revision" type:"integer" required:"true"`

	// The status of the job definition.
	Status *string `locationName:"status" type:"string"`

	// The timeout configuration for jobs that are submitted with this job definition.
	// You can specify a timeout duration after which AWS Batch terminates your
	// jobs if they have not finished.
	Timeout *JobTimeout `locationName:"timeout" type:"structure"`

	// The type of job definition.
	//
	// Type is a required field
	Type *string `locationName:"type" type:"string" required:"true"`
	// contains filtered or unexported fields
}

An object representing an AWS Batch job definition.

func (JobDefinition) MarshalFields added in v0.3.0

func (s JobDefinition) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (JobDefinition) String

func (s JobDefinition) String() string

String returns the string representation

type JobDefinitionType

type JobDefinitionType string
const (
	JobDefinitionTypeContainer JobDefinitionType = "container"
	JobDefinitionTypeMultinode JobDefinitionType = "multinode"
)

Enum values for JobDefinitionType

func (JobDefinitionType) MarshalValue added in v0.3.0

func (enum JobDefinitionType) MarshalValue() (string, error)

func (JobDefinitionType) MarshalValueBuf added in v0.3.0

func (enum JobDefinitionType) MarshalValueBuf(b []byte) ([]byte, error)

type JobDependency

type JobDependency struct {

	// The job ID of the AWS Batch job associated with this dependency.
	JobId *string `locationName:"jobId" type:"string"`

	// The type of the job dependency.
	Type ArrayJobDependency `locationName:"type" type:"string" enum:"true"`
	// contains filtered or unexported fields
}

An object representing an AWS Batch job dependency.

func (JobDependency) MarshalFields added in v0.3.0

func (s JobDependency) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (JobDependency) String

func (s JobDependency) String() string

String returns the string representation

type JobDetail

type JobDetail struct {

	// The array properties of the job, if it is an array job.
	ArrayProperties *ArrayPropertiesDetail `locationName:"arrayProperties" type:"structure"`

	// A list of job attempts associated with this job.
	Attempts []AttemptDetail `locationName:"attempts" type:"list"`

	// An object representing the details of the container that is associated with
	// the job.
	Container *ContainerDetail `locationName:"container" type:"structure"`

	// The Unix timestamp (in seconds and milliseconds) for when the job was created.
	// For non-array jobs and parent array jobs, this is when the job entered the
	// SUBMITTED state (at the time SubmitJob was called). For array child jobs,
	// this is when the child job was spawned by its parent and entered the PENDING
	// state.
	CreatedAt *int64 `locationName:"createdAt" type:"long"`

	// A list of job names or IDs on which this job depends.
	DependsOn []JobDependency `locationName:"dependsOn" type:"list"`

	// The job definition that is used by this job.
	//
	// JobDefinition is a required field
	JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"`

	// The ID for the job.
	//
	// JobId is a required field
	JobId *string `locationName:"jobId" type:"string" required:"true"`

	// The name of the job.
	//
	// JobName is a required field
	JobName *string `locationName:"jobName" type:"string" required:"true"`

	// The Amazon Resource Name (ARN) of the job queue with which the job is associated.
	//
	// JobQueue is a required field
	JobQueue *string `locationName:"jobQueue" type:"string" required:"true"`

	// An object representing the details of a node that is associated with a multi-node
	// parallel job.
	NodeDetails *NodeDetails `locationName:"nodeDetails" type:"structure"`

	// An object representing the node properties of a multi-node parallel job.
	NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"`

	// Additional parameters passed to the job that replace parameter substitution
	// placeholders or override any corresponding parameter defaults from the job
	// definition.
	Parameters map[string]string `locationName:"parameters" type:"map"`

	// The retry strategy to use for this job if an attempt fails.
	RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"`

	// The Unix timestamp (in seconds and milliseconds) for when the job was started
	// (when the job transitioned from the STARTING state to the RUNNING state).
	//
	// StartedAt is a required field
	StartedAt *int64 `locationName:"startedAt" type:"long" required:"true"`

	// The current status for the job.
	//
	// If your jobs do not progress to STARTING, see Jobs Stuck in RUNNABLE Status
	// (https://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#job_stuck_in_runnable)
	// in the troubleshooting section of the AWS Batch User Guide.
	//
	// Status is a required field
	Status JobStatus `locationName:"status" type:"string" required:"true" enum:"true"`

	// A short, human-readable string to provide additional details about the current
	// status of the job.
	StatusReason *string `locationName:"statusReason" type:"string"`

	// The Unix timestamp (in seconds and milliseconds) for when the job was stopped
	// (when the job transitioned from the RUNNING state to a terminal state, such
	// as SUCCEEDED or FAILED).
	StoppedAt *int64 `locationName:"stoppedAt" type:"long"`

	// The timeout configuration for the job.
	Timeout *JobTimeout `locationName:"timeout" type:"structure"`
	// contains filtered or unexported fields
}

An object representing an AWS Batch job.

func (JobDetail) MarshalFields added in v0.3.0

func (s JobDetail) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (JobDetail) String

func (s JobDetail) String() string

String returns the string representation

type JobQueueDetail

type JobQueueDetail struct {

	// The compute environments that are attached to the job queue and the order
	// in which job placement is preferred. Compute environments are selected for
	// job placement in ascending order.
	//
	// ComputeEnvironmentOrder is a required field
	ComputeEnvironmentOrder []ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list" required:"true"`

	// The Amazon Resource Name (ARN) of the job queue.
	//
	// JobQueueArn is a required field
	JobQueueArn *string `locationName:"jobQueueArn" type:"string" required:"true"`

	// The name of the job queue.
	//
	// JobQueueName is a required field
	JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"`

	// The priority of the job queue.
	//
	// Priority is a required field
	Priority *int64 `locationName:"priority" type:"integer" required:"true"`

	// Describes the ability of the queue to accept new jobs.
	//
	// State is a required field
	State JQState `locationName:"state" type:"string" required:"true" enum:"true"`

	// The status of the job queue (for example, CREATING or VALID).
	Status JQStatus `locationName:"status" type:"string" enum:"true"`

	// A short, human-readable string to provide additional details about the current
	// status of the job queue.
	StatusReason *string `locationName:"statusReason" type:"string"`
	// contains filtered or unexported fields
}

An object representing the details of an AWS Batch job queue.

func (JobQueueDetail) MarshalFields added in v0.3.0

func (s JobQueueDetail) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (JobQueueDetail) String

func (s JobQueueDetail) String() string

String returns the string representation

type JobStatus

type JobStatus string
const (
	JobStatusSubmitted JobStatus = "SUBMITTED"
	JobStatusPending   JobStatus = "PENDING"
	JobStatusRunnable  JobStatus = "RUNNABLE"
	JobStatusStarting  JobStatus = "STARTING"
	JobStatusRunning   JobStatus = "RUNNING"
	JobStatusSucceeded JobStatus = "SUCCEEDED"
	JobStatusFailed    JobStatus = "FAILED"
)

Enum values for JobStatus

func (JobStatus) MarshalValue added in v0.3.0

func (enum JobStatus) MarshalValue() (string, error)

func (JobStatus) MarshalValueBuf added in v0.3.0

func (enum JobStatus) MarshalValueBuf(b []byte) ([]byte, error)

type JobSummary

type JobSummary struct {

	// The array properties of the job, if it is an array job.
	ArrayProperties *ArrayPropertiesSummary `locationName:"arrayProperties" type:"structure"`

	// An object representing the details of the container that is associated with
	// the job.
	Container *ContainerSummary `locationName:"container" type:"structure"`

	// The Unix timestamp for when the job was created. For non-array jobs and parent
	// array jobs, this is when the job entered the SUBMITTED state (at the time
	// SubmitJob was called). For array child jobs, this is when the child job was
	// spawned by its parent and entered the PENDING state.
	CreatedAt *int64 `locationName:"createdAt" type:"long"`

	// The ID of the job.
	//
	// JobId is a required field
	JobId *string `locationName:"jobId" type:"string" required:"true"`

	// The name of the job.
	//
	// JobName is a required field
	JobName *string `locationName:"jobName" type:"string" required:"true"`

	// The node properties for a single node in a job summary list.
	NodeProperties *NodePropertiesSummary `locationName:"nodeProperties" type:"structure"`

	// The Unix timestamp for when the job was started (when the job transitioned
	// from the STARTING state to the RUNNING state).
	StartedAt *int64 `locationName:"startedAt" type:"long"`

	// The current status for the job.
	Status JobStatus `locationName:"status" type:"string" enum:"true"`

	// A short, human-readable string to provide additional details about the current
	// status of the job.
	StatusReason *string `locationName:"statusReason" type:"string"`

	// The Unix timestamp for when the job was stopped (when the job transitioned
	// from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED).
	StoppedAt *int64 `locationName:"stoppedAt" type:"long"`
	// contains filtered or unexported fields
}

An object representing summary details of a job.

func (JobSummary) MarshalFields added in v0.3.0

func (s JobSummary) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (JobSummary) String

func (s JobSummary) String() string

String returns the string representation

type JobTimeout added in v0.4.0

type JobTimeout struct {

	// The time duration in seconds (measured from the job attempt's startedAt timestamp)
	// after which AWS Batch terminates your jobs if they have not finished.
	AttemptDurationSeconds *int64 `locationName:"attemptDurationSeconds" type:"integer"`
	// contains filtered or unexported fields
}

An object representing a job timeout configuration.

func (JobTimeout) MarshalFields added in v0.4.0

func (s JobTimeout) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (JobTimeout) String added in v0.4.0

func (s JobTimeout) String() string

String returns the string representation

type KeyValuePair

type KeyValuePair struct {

	// The name of the key-value pair. For environment variables, this is the name
	// of the environment variable.
	Name *string `locationName:"name" type:"string"`

	// The value of the key-value pair. For environment variables, this is the value
	// of the environment variable.
	Value *string `locationName:"value" type:"string"`
	// contains filtered or unexported fields
}

A key-value pair object.

func (KeyValuePair) MarshalFields added in v0.3.0

func (s KeyValuePair) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (KeyValuePair) String

func (s KeyValuePair) String() string

String returns the string representation

type LaunchTemplateSpecification added in v0.6.0

type LaunchTemplateSpecification struct {

	// The ID of the launch template.
	LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"`

	// The name of the launch template.
	LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"`

	// The version number of the launch template.
	//
	// Default: The default version of the launch template.
	Version *string `locationName:"version" type:"string"`
	// contains filtered or unexported fields
}

An object representing a launch template associated with a compute resource. You must specify either the launch template ID or launch template name in the request, but not both.

func (LaunchTemplateSpecification) MarshalFields added in v0.6.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (LaunchTemplateSpecification) String added in v0.6.0

String returns the string representation

type LinuxParameters added in v0.11.0

type LinuxParameters struct {

	// Any host devices to expose to the container. This parameter maps to Devices
	// in the Create a container (https://docs.docker.com/engine/api/v1.23/#create-a-container)
	// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.23/)
	// and the --device option to docker run (https://docs.docker.com/engine/reference/run/).
	Devices []Device `locationName:"devices" type:"list"`
	// contains filtered or unexported fields
}

Linux-specific modifications that are applied to the container, such as details for device mappings.

func (LinuxParameters) MarshalFields added in v0.11.0

func (s LinuxParameters) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (LinuxParameters) String added in v0.11.0

func (s LinuxParameters) String() string

String returns the string representation

func (*LinuxParameters) Validate added in v0.11.0

func (s *LinuxParameters) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListJobsInput

type ListJobsInput struct {

	// The job ID for an array job. Specifying an array job ID with this parameter
	// lists all child jobs from within the specified array.
	ArrayJobId *string `locationName:"arrayJobId" type:"string"`

	// The name or full Amazon Resource Name (ARN) of the job queue with which to
	// list jobs.
	JobQueue *string `locationName:"jobQueue" type:"string"`

	// The job status with which to filter jobs in the specified queue. If you do
	// not specify a status, only RUNNING jobs are returned.
	JobStatus JobStatus `locationName:"jobStatus" type:"string" enum:"true"`

	// The maximum number of results returned by ListJobs in paginated output. When
	// this parameter is used, ListJobs only returns maxResults results in a single
	// page along with a nextToken response element. The remaining results of the
	// initial request can be seen by sending another ListJobs request with the
	// returned nextToken value. This value can be between 1 and 100. If this parameter
	// is not used, then ListJobs returns up to 100 results and a nextToken value
	// if applicable.
	MaxResults *int64 `locationName:"maxResults" type:"integer"`

	// The job ID for a multi-node parallel job. Specifying a multi-node parallel
	// job ID with this parameter lists all nodes that are associated with the specified
	// job.
	MultiNodeJobId *string `locationName:"multiNodeJobId" type:"string"`

	// The nextToken value returned from a previous paginated ListJobs request where
	// maxResults was used and the results exceeded the value of that parameter.
	// Pagination continues from the end of the previous results that returned the
	// nextToken value. This value is null when there are no more results to return.
	//
	// This token should be treated as an opaque identifier that is only used to
	// retrieve the next items in a list and not for other programmatic purposes.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (ListJobsInput) MarshalFields added in v0.3.0

func (s ListJobsInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListJobsInput) String

func (s ListJobsInput) String() string

String returns the string representation

type ListJobsOutput

type ListJobsOutput struct {

	// A list of job summaries that match the request.
	//
	// JobSummaryList is a required field
	JobSummaryList []JobSummary `locationName:"jobSummaryList" type:"list" required:"true"`

	// The nextToken value to include in a future ListJobs request. When the results
	// of a ListJobs request exceed maxResults, this value can be used to retrieve
	// the next page of results. This value is null when there are no more results
	// to return.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (ListJobsOutput) MarshalFields added in v0.3.0

func (s ListJobsOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListJobsOutput) String

func (s ListJobsOutput) String() string

String returns the string representation

type ListJobsPaginator added in v0.11.0

type ListJobsPaginator struct {
	aws.Pager
}

ListJobsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListJobsPaginator added in v0.11.0

func NewListJobsPaginator(req ListJobsRequest) ListJobsPaginator

NewListJobsRequestPaginator returns a paginator for ListJobs. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListJobsRequest(input)
p := batch.NewListJobsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListJobsPaginator) CurrentPage added in v0.11.0

func (p *ListJobsPaginator) CurrentPage() *ListJobsOutput

type ListJobsRequest

type ListJobsRequest struct {
	*aws.Request
	Input *ListJobsInput
	Copy  func(*ListJobsInput) ListJobsRequest
}

ListJobsRequest is the request type for the ListJobs API operation.

func (ListJobsRequest) Send

Send marshals and sends the ListJobs API request.

type ListJobsResponse added in v0.9.0

type ListJobsResponse struct {
	*ListJobsOutput
	// contains filtered or unexported fields
}

ListJobsResponse is the response type for the ListJobs API operation.

func (*ListJobsResponse) SDKResponseMetdata added in v0.9.0

func (r *ListJobsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListJobs request.

type MountPoint

type MountPoint struct {

	// The path on the container at which to mount the host volume.
	ContainerPath *string `locationName:"containerPath" type:"string"`

	// If this value is true, the container has read-only access to the volume;
	// otherwise, the container can write to the volume. The default value is false.
	ReadOnly *bool `locationName:"readOnly" type:"boolean"`

	// The name of the volume to mount.
	SourceVolume *string `locationName:"sourceVolume" type:"string"`
	// contains filtered or unexported fields
}

Details on a Docker volume mount point that is used in a job's container properties. This parameter maps to Volumes in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/#create-a-container) section of the Docker Remote API and the --volume option to docker run.

func (MountPoint) MarshalFields added in v0.3.0

func (s MountPoint) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (MountPoint) String

func (s MountPoint) String() string

String returns the string representation

type NetworkInterface added in v0.6.0

type NetworkInterface struct {

	// The attachment ID for the network interface.
	AttachmentId *string `locationName:"attachmentId" type:"string"`

	// The private IPv6 address for the network interface.
	Ipv6Address *string `locationName:"ipv6Address" type:"string"`

	// The private IPv4 address for the network interface.
	PrivateIpv4Address *string `locationName:"privateIpv4Address" type:"string"`
	// contains filtered or unexported fields
}

An object representing the elastic network interface for a multi-node parallel job node.

func (NetworkInterface) MarshalFields added in v0.6.0

func (s NetworkInterface) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (NetworkInterface) String added in v0.6.0

func (s NetworkInterface) String() string

String returns the string representation

type NodeDetails added in v0.6.0

type NodeDetails struct {

	// Specifies whether the current node is the main node for a multi-node parallel
	// job.
	IsMainNode *bool `locationName:"isMainNode" type:"boolean"`

	// The node index for the node. Node index numbering begins at zero. This index
	// is also available on the node with the AWS_BATCH_JOB_NODE_INDEX environment
	// variable.
	NodeIndex *int64 `locationName:"nodeIndex" type:"integer"`
	// contains filtered or unexported fields
}

An object representing the details of a multi-node parallel job node.

func (NodeDetails) MarshalFields added in v0.6.0

func (s NodeDetails) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (NodeDetails) String added in v0.6.0

func (s NodeDetails) String() string

String returns the string representation

type NodeOverrides added in v0.6.0

type NodeOverrides struct {

	// The node property overrides for the job.
	NodePropertyOverrides []NodePropertyOverride `locationName:"nodePropertyOverrides" type:"list"`

	// The number of nodes to use with a multi-node parallel job. This value overrides
	// the number of nodes that are specified in the job definition. To use this
	// override:
	//
	//    * There must be at least one node range in your job definition that has
	//    an open upper boundary (such as : or n:).
	//
	//    * The lower boundary of the node range specified in the job definition
	//    must be fewer than the number of nodes specified in the override.
	//
	//    * The main node index specified in the job definition must be fewer than
	//    the number of nodes specified in the override.
	NumNodes *int64 `locationName:"numNodes" type:"integer"`
	// contains filtered or unexported fields
}

Object representing any node overrides to a job definition that is used in a SubmitJob API operation.

func (NodeOverrides) MarshalFields added in v0.6.0

func (s NodeOverrides) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (NodeOverrides) String added in v0.6.0

func (s NodeOverrides) String() string

String returns the string representation

func (*NodeOverrides) Validate added in v0.6.0

func (s *NodeOverrides) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type NodeProperties added in v0.6.0

type NodeProperties struct {

	// Specifies the node index for the main node of a multi-node parallel job.
	// This node index value must be fewer than the number of nodes.
	//
	// MainNode is a required field
	MainNode *int64 `locationName:"mainNode" type:"integer" required:"true"`

	// A list of node ranges and their properties associated with a multi-node parallel
	// job.
	//
	// NodeRangeProperties is a required field
	NodeRangeProperties []NodeRangeProperty `locationName:"nodeRangeProperties" type:"list" required:"true"`

	// The number of nodes associated with a multi-node parallel job.
	//
	// NumNodes is a required field
	NumNodes *int64 `locationName:"numNodes" type:"integer" required:"true"`
	// contains filtered or unexported fields
}

An object representing the node properties of a multi-node parallel job.

func (NodeProperties) MarshalFields added in v0.6.0

func (s NodeProperties) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (NodeProperties) String added in v0.6.0

func (s NodeProperties) String() string

String returns the string representation

func (*NodeProperties) Validate added in v0.6.0

func (s *NodeProperties) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type NodePropertiesSummary added in v0.6.0

type NodePropertiesSummary struct {

	// Specifies whether the current node is the main node for a multi-node parallel
	// job.
	IsMainNode *bool `locationName:"isMainNode" type:"boolean"`

	// The node index for the node. Node index numbering begins at zero. This index
	// is also available on the node with the AWS_BATCH_JOB_NODE_INDEX environment
	// variable.
	NodeIndex *int64 `locationName:"nodeIndex" type:"integer"`

	// The number of nodes associated with a multi-node parallel job.
	NumNodes *int64 `locationName:"numNodes" type:"integer"`
	// contains filtered or unexported fields
}

An object representing the properties of a node that is associated with a multi-node parallel job.

func (NodePropertiesSummary) MarshalFields added in v0.6.0

func (s NodePropertiesSummary) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (NodePropertiesSummary) String added in v0.6.0

func (s NodePropertiesSummary) String() string

String returns the string representation

type NodePropertyOverride added in v0.6.0

type NodePropertyOverride struct {

	// The overrides that should be sent to a node range.
	ContainerOverrides *ContainerOverrides `locationName:"containerOverrides" type:"structure"`

	// The range of nodes, using node index values, with which to override. A range
	// of 0:3 indicates nodes with index values of 0 through 3. If the starting
	// range value is omitted (:n), then 0 is used to start the range. If the ending
	// range value is omitted (n:), then the highest possible node index is used
	// to end the range.
	//
	// TargetNodes is a required field
	TargetNodes *string `locationName:"targetNodes" type:"string" required:"true"`
	// contains filtered or unexported fields
}

Object representing any node overrides to a job definition that is used in a SubmitJob API operation.

func (NodePropertyOverride) MarshalFields added in v0.6.0

func (s NodePropertyOverride) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (NodePropertyOverride) String added in v0.6.0

func (s NodePropertyOverride) String() string

String returns the string representation

func (*NodePropertyOverride) Validate added in v0.6.0

func (s *NodePropertyOverride) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type NodeRangeProperty added in v0.6.0

type NodeRangeProperty struct {

	// The container details for the node range.
	Container *ContainerProperties `locationName:"container" type:"structure"`

	// The range of nodes, using node index values. A range of 0:3 indicates nodes
	// with index values of 0 through 3. If the starting range value is omitted
	// (:n), then 0 is used to start the range. If the ending range value is omitted
	// (n:), then the highest possible node index is used to end the range. Your
	// accumulative node ranges must account for all nodes (0:n). You may nest node
	// ranges, for example 0:10 and 4:5, in which case the 4:5 range properties
	// override the 0:10 properties.
	//
	// TargetNodes is a required field
	TargetNodes *string `locationName:"targetNodes" type:"string" required:"true"`
	// contains filtered or unexported fields
}

An object representing the properties of the node range for a multi-node parallel job.

func (NodeRangeProperty) MarshalFields added in v0.6.0

func (s NodeRangeProperty) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (NodeRangeProperty) String added in v0.6.0

func (s NodeRangeProperty) String() string

String returns the string representation

func (*NodeRangeProperty) Validate added in v0.6.0

func (s *NodeRangeProperty) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type RegisterJobDefinitionInput

type RegisterJobDefinitionInput struct {

	// An object with various properties specific to single-node container-based
	// jobs. If the job definition's type parameter is container, then you must
	// specify either containerProperties or nodeProperties.
	ContainerProperties *ContainerProperties `locationName:"containerProperties" type:"structure"`

	// The name of the job definition to register. Up to 128 letters (uppercase
	// and lowercase), numbers, hyphens, and underscores are allowed.
	//
	// JobDefinitionName is a required field
	JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"`

	// An object with various properties specific to multi-node parallel jobs. If
	// you specify node properties for a job, it becomes a multi-node parallel job.
	// For more information, see Multi-node Parallel Jobs (https://docs.aws.amazon.com/batch/latest/userguide/multi-node-parallel-jobs.html)
	// in the AWS Batch User Guide. If the job definition's type parameter is container,
	// then you must specify either containerProperties or nodeProperties.
	NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"`

	// Default parameter substitution placeholders to set in the job definition.
	// Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob
	// request override any corresponding parameter defaults from the job definition.
	Parameters map[string]string `locationName:"parameters" type:"map"`

	// The retry strategy to use for failed jobs that are submitted with this job
	// definition. Any retry strategy that is specified during a SubmitJob operation
	// overrides the retry strategy defined here. If a job is terminated due to
	// a timeout, it is not retried.
	RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"`

	// The timeout configuration for jobs that are submitted with this job definition,
	// after which AWS Batch terminates your jobs if they have not finished. If
	// a job is terminated due to a timeout, it is not retried. The minimum value
	// for the timeout is 60 seconds. Any timeout configuration that is specified
	// during a SubmitJob operation overrides the timeout configuration defined
	// here. For more information, see Job Timeouts (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html)
	// in the Amazon Elastic Container Service Developer Guide.
	Timeout *JobTimeout `locationName:"timeout" type:"structure"`

	// The type of job definition.
	//
	// Type is a required field
	Type JobDefinitionType `locationName:"type" type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (RegisterJobDefinitionInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (RegisterJobDefinitionInput) String

String returns the string representation

func (*RegisterJobDefinitionInput) Validate

func (s *RegisterJobDefinitionInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type RegisterJobDefinitionOutput

type RegisterJobDefinitionOutput struct {

	// The Amazon Resource Name (ARN) of the job definition.
	//
	// JobDefinitionArn is a required field
	JobDefinitionArn *string `locationName:"jobDefinitionArn" type:"string" required:"true"`

	// The name of the job definition.
	//
	// JobDefinitionName is a required field
	JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"`

	// The revision of the job definition.
	//
	// Revision is a required field
	Revision *int64 `locationName:"revision" type:"integer" required:"true"`
	// contains filtered or unexported fields
}

func (RegisterJobDefinitionOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (RegisterJobDefinitionOutput) String

String returns the string representation

type RegisterJobDefinitionRequest

type RegisterJobDefinitionRequest struct {
	*aws.Request
	Input *RegisterJobDefinitionInput
	Copy  func(*RegisterJobDefinitionInput) RegisterJobDefinitionRequest
}

RegisterJobDefinitionRequest is the request type for the RegisterJobDefinition API operation.

func (RegisterJobDefinitionRequest) Send

Send marshals and sends the RegisterJobDefinition API request.

type RegisterJobDefinitionResponse added in v0.9.0

type RegisterJobDefinitionResponse struct {
	*RegisterJobDefinitionOutput
	// contains filtered or unexported fields
}

RegisterJobDefinitionResponse is the response type for the RegisterJobDefinition API operation.

func (*RegisterJobDefinitionResponse) SDKResponseMetdata added in v0.9.0

func (r *RegisterJobDefinitionResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the RegisterJobDefinition request.

type ResourceRequirement added in v0.8.0

type ResourceRequirement struct {

	// The type of resource to assign to a container. Currently, the only supported
	// resource type is GPU.
	//
	// Type is a required field
	Type ResourceType `locationName:"type" type:"string" required:"true" enum:"true"`

	// The number of physical GPUs to reserve for the container. The number of GPUs
	// reserved for all containers in a job should not exceed the number of available
	// GPUs on the compute resource that the job is launched on.
	//
	// Value is a required field
	Value *string `locationName:"value" type:"string" required:"true"`
	// contains filtered or unexported fields
}

The type and amount of a resource to assign to a container. Currently, the only supported resource type is GPU.

func (ResourceRequirement) MarshalFields added in v0.8.0

func (s ResourceRequirement) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ResourceRequirement) String added in v0.8.0

func (s ResourceRequirement) String() string

String returns the string representation

func (*ResourceRequirement) Validate added in v0.8.0

func (s *ResourceRequirement) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ResourceType added in v0.8.0

type ResourceType string
const (
	ResourceTypeGpu ResourceType = "GPU"
)

Enum values for ResourceType

func (ResourceType) MarshalValue added in v0.8.0

func (enum ResourceType) MarshalValue() (string, error)

func (ResourceType) MarshalValueBuf added in v0.8.0

func (enum ResourceType) MarshalValueBuf(b []byte) ([]byte, error)

type RetryStrategy

type RetryStrategy struct {

	// The number of times to move a job to the RUNNABLE status. You may specify
	// between 1 and 10 attempts. If the value of attempts is greater than one,
	// the job is retried on failure the same number of attempts as the value.
	Attempts *int64 `locationName:"attempts" type:"integer"`
	// contains filtered or unexported fields
}

The retry strategy associated with a job.

func (RetryStrategy) MarshalFields added in v0.3.0

func (s RetryStrategy) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (RetryStrategy) String

func (s RetryStrategy) String() string

String returns the string representation

type SubmitJobInput

type SubmitJobInput struct {

	// The array properties for the submitted job, such as the size of the array.
	// The array size can be between 2 and 10,000. If you specify array properties
	// for a job, it becomes an array job. For more information, see Array Jobs
	// (https://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html) in the
	// AWS Batch User Guide.
	ArrayProperties *ArrayProperties `locationName:"arrayProperties" type:"structure"`

	// A list of container overrides in JSON format that specify the name of a container
	// in the specified job definition and the overrides it should receive. You
	// can override the default command for a container (that is specified in the
	// job definition or the Docker image) with a command override. You can also
	// override existing environment variables (that are specified in the job definition
	// or Docker image) on a container or add new environment variables to it with
	// an environment override.
	ContainerOverrides *ContainerOverrides `locationName:"containerOverrides" type:"structure"`

	// A list of dependencies for the job. A job can depend upon a maximum of 20
	// jobs. You can specify a SEQUENTIAL type dependency without specifying a job
	// ID for array jobs so that each child array job completes sequentially, starting
	// at index 0. You can also specify an N_TO_N type dependency with a job ID
	// for array jobs. In that case, each index child of this job must wait for
	// the corresponding index child of each dependency to complete before it can
	// begin.
	DependsOn []JobDependency `locationName:"dependsOn" type:"list"`

	// The job definition used by this job. This value can be either a name:revision
	// or the Amazon Resource Name (ARN) for the job definition.
	//
	// JobDefinition is a required field
	JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"`

	// The name of the job. The first character must be alphanumeric, and up to
	// 128 letters (uppercase and lowercase), numbers, hyphens, and underscores
	// are allowed.
	//
	// JobName is a required field
	JobName *string `locationName:"jobName" type:"string" required:"true"`

	// The job queue into which the job is submitted. You can specify either the
	// name or the Amazon Resource Name (ARN) of the queue.
	//
	// JobQueue is a required field
	JobQueue *string `locationName:"jobQueue" type:"string" required:"true"`

	// A list of node overrides in JSON format that specify the node range to target
	// and the container overrides for that node range.
	NodeOverrides *NodeOverrides `locationName:"nodeOverrides" type:"structure"`

	// Additional parameters passed to the job that replace parameter substitution
	// placeholders that are set in the job definition. Parameters are specified
	// as a key and value pair mapping. Parameters in a SubmitJob request override
	// any corresponding parameter defaults from the job definition.
	Parameters map[string]string `locationName:"parameters" type:"map"`

	// The retry strategy to use for failed jobs from this SubmitJob operation.
	// When a retry strategy is specified here, it overrides the retry strategy
	// defined in the job definition.
	RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"`

	// The timeout configuration for this SubmitJob operation. You can specify a
	// timeout duration after which AWS Batch terminates your jobs if they have
	// not finished. If a job is terminated due to a timeout, it is not retried.
	// The minimum value for the timeout is 60 seconds. This configuration overrides
	// any timeout configuration specified in the job definition. For array jobs,
	// child jobs have the same timeout configuration as the parent job. For more
	// information, see Job Timeouts (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html)
	// in the Amazon Elastic Container Service Developer Guide.
	Timeout *JobTimeout `locationName:"timeout" type:"structure"`
	// contains filtered or unexported fields
}

func (SubmitJobInput) MarshalFields added in v0.3.0

func (s SubmitJobInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (SubmitJobInput) String

func (s SubmitJobInput) String() string

String returns the string representation

func (*SubmitJobInput) Validate

func (s *SubmitJobInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type SubmitJobOutput

type SubmitJobOutput struct {

	// The unique identifier for the job.
	//
	// JobId is a required field
	JobId *string `locationName:"jobId" type:"string" required:"true"`

	// The name of the job.
	//
	// JobName is a required field
	JobName *string `locationName:"jobName" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (SubmitJobOutput) MarshalFields added in v0.3.0

func (s SubmitJobOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (SubmitJobOutput) String

func (s SubmitJobOutput) String() string

String returns the string representation

type SubmitJobRequest

type SubmitJobRequest struct {
	*aws.Request
	Input *SubmitJobInput
	Copy  func(*SubmitJobInput) SubmitJobRequest
}

SubmitJobRequest is the request type for the SubmitJob API operation.

func (SubmitJobRequest) Send

Send marshals and sends the SubmitJob API request.

type SubmitJobResponse added in v0.9.0

type SubmitJobResponse struct {
	*SubmitJobOutput
	// contains filtered or unexported fields
}

SubmitJobResponse is the response type for the SubmitJob API operation.

func (*SubmitJobResponse) SDKResponseMetdata added in v0.9.0

func (r *SubmitJobResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the SubmitJob request.

type TerminateJobInput

type TerminateJobInput struct {

	// The AWS Batch job ID of the job to terminate.
	//
	// JobId is a required field
	JobId *string `locationName:"jobId" type:"string" required:"true"`

	// A message to attach to the job that explains the reason for canceling it.
	// This message is returned by future DescribeJobs operations on the job. This
	// message is also recorded in the AWS Batch activity logs.
	//
	// Reason is a required field
	Reason *string `locationName:"reason" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (TerminateJobInput) MarshalFields added in v0.3.0

func (s TerminateJobInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (TerminateJobInput) String

func (s TerminateJobInput) String() string

String returns the string representation

func (*TerminateJobInput) Validate

func (s *TerminateJobInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type TerminateJobOutput

type TerminateJobOutput struct {
	// contains filtered or unexported fields
}

func (TerminateJobOutput) MarshalFields added in v0.3.0

func (s TerminateJobOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (TerminateJobOutput) String

func (s TerminateJobOutput) String() string

String returns the string representation

type TerminateJobRequest

type TerminateJobRequest struct {
	*aws.Request
	Input *TerminateJobInput
	Copy  func(*TerminateJobInput) TerminateJobRequest
}

TerminateJobRequest is the request type for the TerminateJob API operation.

func (TerminateJobRequest) Send

Send marshals and sends the TerminateJob API request.

type TerminateJobResponse added in v0.9.0

type TerminateJobResponse struct {
	*TerminateJobOutput
	// contains filtered or unexported fields
}

TerminateJobResponse is the response type for the TerminateJob API operation.

func (*TerminateJobResponse) SDKResponseMetdata added in v0.9.0

func (r *TerminateJobResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the TerminateJob request.

type Ulimit

type Ulimit struct {

	// The hard limit for the ulimit type.
	//
	// HardLimit is a required field
	HardLimit *int64 `locationName:"hardLimit" type:"integer" required:"true"`

	// The type of the ulimit.
	//
	// Name is a required field
	Name *string `locationName:"name" type:"string" required:"true"`

	// The soft limit for the ulimit type.
	//
	// SoftLimit is a required field
	SoftLimit *int64 `locationName:"softLimit" type:"integer" required:"true"`
	// contains filtered or unexported fields
}

The ulimit settings to pass to the container.

func (Ulimit) MarshalFields added in v0.3.0

func (s Ulimit) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Ulimit) String

func (s Ulimit) String() string

String returns the string representation

func (*Ulimit) Validate

func (s *Ulimit) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type UpdateComputeEnvironmentInput

type UpdateComputeEnvironmentInput struct {

	// The name or full Amazon Resource Name (ARN) of the compute environment to
	// update.
	//
	// ComputeEnvironment is a required field
	ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"`

	// Details of the compute resources managed by the compute environment. Required
	// for a managed compute environment.
	ComputeResources *ComputeResourceUpdate `locationName:"computeResources" type:"structure"`

	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch
	// to make calls to other AWS services on your behalf.
	//
	// If your specified role has a path other than /, then you must either specify
	// the full role ARN (this is recommended) or prefix the role name with the
	// path.
	//
	// Depending on how you created your AWS Batch service role, its ARN may contain
	// the service-role path prefix. When you only specify the name of the service
	// role, AWS Batch assumes that your ARN does not use the service-role path
	// prefix. Because of this, we recommend that you specify the full ARN of your
	// service role when you create compute environments.
	ServiceRole *string `locationName:"serviceRole" type:"string"`

	// The state of the compute environment. Compute environments in the ENABLED
	// state can accept jobs from a queue and scale in or out automatically based
	// on the workload demand of its associated queues.
	State CEState `locationName:"state" type:"string" enum:"true"`
	// contains filtered or unexported fields
}

func (UpdateComputeEnvironmentInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (UpdateComputeEnvironmentInput) String

String returns the string representation

func (*UpdateComputeEnvironmentInput) Validate

func (s *UpdateComputeEnvironmentInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type UpdateComputeEnvironmentOutput

type UpdateComputeEnvironmentOutput struct {

	// The Amazon Resource Name (ARN) of the compute environment.
	ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string"`

	// The name of the compute environment.
	ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string"`
	// contains filtered or unexported fields
}

func (UpdateComputeEnvironmentOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (UpdateComputeEnvironmentOutput) String

String returns the string representation

type UpdateComputeEnvironmentRequest

type UpdateComputeEnvironmentRequest struct {
	*aws.Request
	Input *UpdateComputeEnvironmentInput
	Copy  func(*UpdateComputeEnvironmentInput) UpdateComputeEnvironmentRequest
}

UpdateComputeEnvironmentRequest is the request type for the UpdateComputeEnvironment API operation.

func (UpdateComputeEnvironmentRequest) Send

Send marshals and sends the UpdateComputeEnvironment API request.

type UpdateComputeEnvironmentResponse added in v0.9.0

type UpdateComputeEnvironmentResponse struct {
	*UpdateComputeEnvironmentOutput
	// contains filtered or unexported fields
}

UpdateComputeEnvironmentResponse is the response type for the UpdateComputeEnvironment API operation.

func (*UpdateComputeEnvironmentResponse) SDKResponseMetdata added in v0.9.0

func (r *UpdateComputeEnvironmentResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the UpdateComputeEnvironment request.

type UpdateJobQueueInput

type UpdateJobQueueInput struct {

	// Details the set of compute environments mapped to a job queue and their order
	// relative to each other. This is one of the parameters used by the job scheduler
	// to determine which compute environment should execute a given job.
	ComputeEnvironmentOrder []ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list"`

	// The name or the Amazon Resource Name (ARN) of the job queue.
	//
	// JobQueue is a required field
	JobQueue *string `locationName:"jobQueue" type:"string" required:"true"`

	// The priority of the job queue. Job queues with a higher priority (or a higher
	// integer value for the priority parameter) are evaluated first when associated
	// with the same compute environment. Priority is determined in descending order,
	// for example, a job queue with a priority value of 10 is given scheduling
	// preference over a job queue with a priority value of 1.
	Priority *int64 `locationName:"priority" type:"integer"`

	// Describes the queue's ability to accept new jobs.
	State JQState `locationName:"state" type:"string" enum:"true"`
	// contains filtered or unexported fields
}

func (UpdateJobQueueInput) MarshalFields added in v0.3.0

func (s UpdateJobQueueInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (UpdateJobQueueInput) String

func (s UpdateJobQueueInput) String() string

String returns the string representation

func (*UpdateJobQueueInput) Validate

func (s *UpdateJobQueueInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type UpdateJobQueueOutput

type UpdateJobQueueOutput struct {

	// The Amazon Resource Name (ARN) of the job queue.
	JobQueueArn *string `locationName:"jobQueueArn" type:"string"`

	// The name of the job queue.
	JobQueueName *string `locationName:"jobQueueName" type:"string"`
	// contains filtered or unexported fields
}

func (UpdateJobQueueOutput) MarshalFields added in v0.3.0

func (s UpdateJobQueueOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (UpdateJobQueueOutput) String

func (s UpdateJobQueueOutput) String() string

String returns the string representation

type UpdateJobQueueRequest

type UpdateJobQueueRequest struct {
	*aws.Request
	Input *UpdateJobQueueInput
	Copy  func(*UpdateJobQueueInput) UpdateJobQueueRequest
}

UpdateJobQueueRequest is the request type for the UpdateJobQueue API operation.

func (UpdateJobQueueRequest) Send

Send marshals and sends the UpdateJobQueue API request.

type UpdateJobQueueResponse added in v0.9.0

type UpdateJobQueueResponse struct {
	*UpdateJobQueueOutput
	// contains filtered or unexported fields
}

UpdateJobQueueResponse is the response type for the UpdateJobQueue API operation.

func (*UpdateJobQueueResponse) SDKResponseMetdata added in v0.9.0

func (r *UpdateJobQueueResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the UpdateJobQueue request.

type Volume

type Volume struct {

	// The contents of the host parameter determine whether your data volume persists
	// on the host container instance and where it is stored. If the host parameter
	// is empty, then the Docker daemon assigns a host path for your data volume.
	// However, the data is not guaranteed to persist after the containers associated
	// with it stop running.
	Host *Host `locationName:"host" type:"structure"`

	// The name of the volume. Up to 255 letters (uppercase and lowercase), numbers,
	// hyphens, and underscores are allowed. This name is referenced in the sourceVolume
	// parameter of container definition mountPoints.
	Name *string `locationName:"name" type:"string"`
	// contains filtered or unexported fields
}

A data volume used in a job's container properties.

func (Volume) MarshalFields added in v0.3.0

func (s Volume) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Volume) String

func (s Volume) String() string

String returns the string representation

Directories

Path Synopsis
Package batchiface provides an interface to enable mocking the AWS Batch service client for testing your code.
Package batchiface provides an interface to enable mocking the AWS Batch service client for testing your code.

Jump to

Keyboard shortcuts

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