Switch to using the dep tool and update all the dependencies

This commit is contained in:
Nick Craig-Wood 2017-05-11 15:39:54 +01:00
parent 5135ff73cb
commit 98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions

4684
vendor/github.com/aws/aws-sdk-go/service/batch/api.go generated vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,128 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package batchiface provides an interface to enable mocking the AWS Batch service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package batchiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/batch"
)
// BatchAPI provides an interface to enable mocking the
// batch.Batch service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS Batch.
// func myFunc(svc batchiface.BatchAPI) bool {
// // Make svc.CancelJob request
// }
//
// func main() {
// sess := session.New()
// svc := batch.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockBatchClient struct {
// batchiface.BatchAPI
// }
// func (m *mockBatchClient) CancelJob(input *batch.CancelJobInput) (*batch.CancelJobOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockBatchClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type BatchAPI interface {
CancelJob(*batch.CancelJobInput) (*batch.CancelJobOutput, error)
CancelJobWithContext(aws.Context, *batch.CancelJobInput, ...request.Option) (*batch.CancelJobOutput, error)
CancelJobRequest(*batch.CancelJobInput) (*request.Request, *batch.CancelJobOutput)
CreateComputeEnvironment(*batch.CreateComputeEnvironmentInput) (*batch.CreateComputeEnvironmentOutput, error)
CreateComputeEnvironmentWithContext(aws.Context, *batch.CreateComputeEnvironmentInput, ...request.Option) (*batch.CreateComputeEnvironmentOutput, error)
CreateComputeEnvironmentRequest(*batch.CreateComputeEnvironmentInput) (*request.Request, *batch.CreateComputeEnvironmentOutput)
CreateJobQueue(*batch.CreateJobQueueInput) (*batch.CreateJobQueueOutput, error)
CreateJobQueueWithContext(aws.Context, *batch.CreateJobQueueInput, ...request.Option) (*batch.CreateJobQueueOutput, error)
CreateJobQueueRequest(*batch.CreateJobQueueInput) (*request.Request, *batch.CreateJobQueueOutput)
DeleteComputeEnvironment(*batch.DeleteComputeEnvironmentInput) (*batch.DeleteComputeEnvironmentOutput, error)
DeleteComputeEnvironmentWithContext(aws.Context, *batch.DeleteComputeEnvironmentInput, ...request.Option) (*batch.DeleteComputeEnvironmentOutput, error)
DeleteComputeEnvironmentRequest(*batch.DeleteComputeEnvironmentInput) (*request.Request, *batch.DeleteComputeEnvironmentOutput)
DeleteJobQueue(*batch.DeleteJobQueueInput) (*batch.DeleteJobQueueOutput, error)
DeleteJobQueueWithContext(aws.Context, *batch.DeleteJobQueueInput, ...request.Option) (*batch.DeleteJobQueueOutput, error)
DeleteJobQueueRequest(*batch.DeleteJobQueueInput) (*request.Request, *batch.DeleteJobQueueOutput)
DeregisterJobDefinition(*batch.DeregisterJobDefinitionInput) (*batch.DeregisterJobDefinitionOutput, error)
DeregisterJobDefinitionWithContext(aws.Context, *batch.DeregisterJobDefinitionInput, ...request.Option) (*batch.DeregisterJobDefinitionOutput, error)
DeregisterJobDefinitionRequest(*batch.DeregisterJobDefinitionInput) (*request.Request, *batch.DeregisterJobDefinitionOutput)
DescribeComputeEnvironments(*batch.DescribeComputeEnvironmentsInput) (*batch.DescribeComputeEnvironmentsOutput, error)
DescribeComputeEnvironmentsWithContext(aws.Context, *batch.DescribeComputeEnvironmentsInput, ...request.Option) (*batch.DescribeComputeEnvironmentsOutput, error)
DescribeComputeEnvironmentsRequest(*batch.DescribeComputeEnvironmentsInput) (*request.Request, *batch.DescribeComputeEnvironmentsOutput)
DescribeJobDefinitions(*batch.DescribeJobDefinitionsInput) (*batch.DescribeJobDefinitionsOutput, error)
DescribeJobDefinitionsWithContext(aws.Context, *batch.DescribeJobDefinitionsInput, ...request.Option) (*batch.DescribeJobDefinitionsOutput, error)
DescribeJobDefinitionsRequest(*batch.DescribeJobDefinitionsInput) (*request.Request, *batch.DescribeJobDefinitionsOutput)
DescribeJobQueues(*batch.DescribeJobQueuesInput) (*batch.DescribeJobQueuesOutput, error)
DescribeJobQueuesWithContext(aws.Context, *batch.DescribeJobQueuesInput, ...request.Option) (*batch.DescribeJobQueuesOutput, error)
DescribeJobQueuesRequest(*batch.DescribeJobQueuesInput) (*request.Request, *batch.DescribeJobQueuesOutput)
DescribeJobs(*batch.DescribeJobsInput) (*batch.DescribeJobsOutput, error)
DescribeJobsWithContext(aws.Context, *batch.DescribeJobsInput, ...request.Option) (*batch.DescribeJobsOutput, error)
DescribeJobsRequest(*batch.DescribeJobsInput) (*request.Request, *batch.DescribeJobsOutput)
ListJobs(*batch.ListJobsInput) (*batch.ListJobsOutput, error)
ListJobsWithContext(aws.Context, *batch.ListJobsInput, ...request.Option) (*batch.ListJobsOutput, error)
ListJobsRequest(*batch.ListJobsInput) (*request.Request, *batch.ListJobsOutput)
RegisterJobDefinition(*batch.RegisterJobDefinitionInput) (*batch.RegisterJobDefinitionOutput, error)
RegisterJobDefinitionWithContext(aws.Context, *batch.RegisterJobDefinitionInput, ...request.Option) (*batch.RegisterJobDefinitionOutput, error)
RegisterJobDefinitionRequest(*batch.RegisterJobDefinitionInput) (*request.Request, *batch.RegisterJobDefinitionOutput)
SubmitJob(*batch.SubmitJobInput) (*batch.SubmitJobOutput, error)
SubmitJobWithContext(aws.Context, *batch.SubmitJobInput, ...request.Option) (*batch.SubmitJobOutput, error)
SubmitJobRequest(*batch.SubmitJobInput) (*request.Request, *batch.SubmitJobOutput)
TerminateJob(*batch.TerminateJobInput) (*batch.TerminateJobOutput, error)
TerminateJobWithContext(aws.Context, *batch.TerminateJobInput, ...request.Option) (*batch.TerminateJobOutput, error)
TerminateJobRequest(*batch.TerminateJobInput) (*request.Request, *batch.TerminateJobOutput)
UpdateComputeEnvironment(*batch.UpdateComputeEnvironmentInput) (*batch.UpdateComputeEnvironmentOutput, error)
UpdateComputeEnvironmentWithContext(aws.Context, *batch.UpdateComputeEnvironmentInput, ...request.Option) (*batch.UpdateComputeEnvironmentOutput, error)
UpdateComputeEnvironmentRequest(*batch.UpdateComputeEnvironmentInput) (*request.Request, *batch.UpdateComputeEnvironmentOutput)
UpdateJobQueue(*batch.UpdateJobQueueInput) (*batch.UpdateJobQueueOutput, error)
UpdateJobQueueWithContext(aws.Context, *batch.UpdateJobQueueInput, ...request.Option) (*batch.UpdateJobQueueOutput, error)
UpdateJobQueueRequest(*batch.UpdateJobQueueInput) (*request.Request, *batch.UpdateJobQueueOutput)
}
var _ BatchAPI = (*batch.Batch)(nil)

96
vendor/github.com/aws/aws-sdk-go/service/batch/doc.go generated vendored Normal file
View file

@ -0,0 +1,96 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// 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 the client for AWS Batch you will first need
// to create a new instance of it.
//
// When creating a client for an AWS service you'll first need to have a Session
// already created. The Session provides configuration that can be shared
// between multiple service clients. Additional configuration can be applied to
// the Session and service's client when they are constructed. The aws package's
// Config type contains several fields such as Region for the AWS Region the
// client should make API requests too. The optional Config value can be provided
// as the variadic argument for Sessions and client creation.
//
// Once the service's client is created you can use it to make API requests the
// AWS service. These clients are safe to use concurrently.
//
// // Create a session to share configuration, and load external configuration.
// sess := session.Must(session.NewSession())
//
// // Create the service's client with the session.
// svc := batch.New(sess)
//
// See the SDK's documentation for more information on how to use service clients.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws package's Config type for more information on configuration options.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS Batch client Batch for more
// information on creating the service's client.
// https://docs.aws.amazon.com/sdk-for-go/api/service/batch/#New
//
// Once the client is created you can make an API request to the service.
// Each API method takes a input parameter, and returns the service response
// and an error.
//
// The API method will document which error codes the service can be returned
// by the operation if the service models the API operation's errors. These
// errors will also be available as const strings prefixed with "ErrCode".
//
// result, err := svc.CancelJob(params)
// if err != nil {
// // Cast err to awserr.Error to handle specific error codes.
// aerr, ok := err.(awserr.Error)
// if ok && aerr.Code() == <error code to check for> {
// // Specific error code handling
// }
// return err
// }
//
// fmt.Println("CancelJob result:")
// fmt.Println(result)
//
// Using the Client with Context
//
// The service's client also provides methods to make API requests with a Context
// value. This allows you to control the timeout, and cancellation of pending
// requests. These methods also take request Option as variadic parameter to apply
// additional configuration to the API request.
//
// ctx := context.Background()
//
// result, err := svc.CancelJobWithContext(ctx, params)
//
// See the request package documentation for more information on using Context pattern
// with the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package batch

View file

@ -0,0 +1,20 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package batch
const (
// ErrCodeClientException for service response error code
// "ClientException".
//
// 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 permission to use the action
// or resource, or specifying an identifier that is not valid.
ErrCodeClientException = "ClientException"
// ErrCodeServerException for service response error code
// "ServerException".
//
// These errors are usually caused by a server issue.
ErrCodeServerException = "ServerException"
)

View file

@ -0,0 +1,515 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package batch_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/batch"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleBatch_CancelJob() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.CancelJobInput{
JobId: aws.String("String"), // Required
Reason: aws.String("String"), // Required
}
resp, err := svc.CancelJob(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_CreateComputeEnvironment() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.CreateComputeEnvironmentInput{
ComputeEnvironmentName: aws.String("String"), // Required
ServiceRole: aws.String("String"), // Required
Type: aws.String("CEType"), // Required
ComputeResources: &batch.ComputeResource{
InstanceRole: aws.String("String"), // Required
InstanceTypes: []*string{ // Required
aws.String("String"), // Required
// More values...
},
MaxvCpus: aws.Int64(1), // Required
MinvCpus: aws.Int64(1), // Required
SecurityGroupIds: []*string{ // Required
aws.String("String"), // Required
// More values...
},
Subnets: []*string{ // Required
aws.String("String"), // Required
// More values...
},
Type: aws.String("CRType"), // Required
BidPercentage: aws.Int64(1),
DesiredvCpus: aws.Int64(1),
Ec2KeyPair: aws.String("String"),
ImageId: aws.String("String"),
SpotIamFleetRole: aws.String("String"),
Tags: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
},
State: aws.String("CEState"),
}
resp, err := svc.CreateComputeEnvironment(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_CreateJobQueue() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.CreateJobQueueInput{
ComputeEnvironmentOrder: []*batch.ComputeEnvironmentOrder{ // Required
{ // Required
ComputeEnvironment: aws.String("String"), // Required
Order: aws.Int64(1), // Required
},
// More values...
},
JobQueueName: aws.String("String"), // Required
Priority: aws.Int64(1), // Required
State: aws.String("JQState"),
}
resp, err := svc.CreateJobQueue(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DeleteComputeEnvironment() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DeleteComputeEnvironmentInput{
ComputeEnvironment: aws.String("String"), // Required
}
resp, err := svc.DeleteComputeEnvironment(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DeleteJobQueue() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DeleteJobQueueInput{
JobQueue: aws.String("String"), // Required
}
resp, err := svc.DeleteJobQueue(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DeregisterJobDefinition() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DeregisterJobDefinitionInput{
JobDefinition: aws.String("String"), // Required
}
resp, err := svc.DeregisterJobDefinition(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DescribeComputeEnvironments() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DescribeComputeEnvironmentsInput{
ComputeEnvironments: []*string{
aws.String("String"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
}
resp, err := svc.DescribeComputeEnvironments(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DescribeJobDefinitions() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DescribeJobDefinitionsInput{
JobDefinitionName: aws.String("String"),
JobDefinitions: []*string{
aws.String("String"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
Status: aws.String("String"),
}
resp, err := svc.DescribeJobDefinitions(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DescribeJobQueues() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DescribeJobQueuesInput{
JobQueues: []*string{
aws.String("String"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
}
resp, err := svc.DescribeJobQueues(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DescribeJobs() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DescribeJobsInput{
Jobs: []*string{ // Required
aws.String("String"), // Required
// More values...
},
}
resp, err := svc.DescribeJobs(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_ListJobs() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.ListJobsInput{
JobQueue: aws.String("String"), // Required
JobStatus: aws.String("JobStatus"),
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
}
resp, err := svc.ListJobs(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_RegisterJobDefinition() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.RegisterJobDefinitionInput{
JobDefinitionName: aws.String("String"), // Required
Type: aws.String("JobDefinitionType"), // Required
ContainerProperties: &batch.ContainerProperties{
Image: aws.String("String"), // Required
Memory: aws.Int64(1), // Required
Vcpus: aws.Int64(1), // Required
Command: []*string{
aws.String("String"), // Required
// More values...
},
Environment: []*batch.KeyValuePair{
{ // Required
Name: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
JobRoleArn: aws.String("String"),
MountPoints: []*batch.MountPoint{
{ // Required
ContainerPath: aws.String("String"),
ReadOnly: aws.Bool(true),
SourceVolume: aws.String("String"),
},
// More values...
},
Privileged: aws.Bool(true),
ReadonlyRootFilesystem: aws.Bool(true),
Ulimits: []*batch.Ulimit{
{ // Required
HardLimit: aws.Int64(1), // Required
Name: aws.String("String"), // Required
SoftLimit: aws.Int64(1), // Required
},
// More values...
},
User: aws.String("String"),
Volumes: []*batch.Volume{
{ // Required
Host: &batch.Host{
SourcePath: aws.String("String"),
},
Name: aws.String("String"),
},
// More values...
},
},
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
RetryStrategy: &batch.RetryStrategy{
Attempts: aws.Int64(1),
},
}
resp, err := svc.RegisterJobDefinition(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_SubmitJob() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.SubmitJobInput{
JobDefinition: aws.String("String"), // Required
JobName: aws.String("String"), // Required
JobQueue: aws.String("String"), // Required
ContainerOverrides: &batch.ContainerOverrides{
Command: []*string{
aws.String("String"), // Required
// More values...
},
Environment: []*batch.KeyValuePair{
{ // Required
Name: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
Memory: aws.Int64(1),
Vcpus: aws.Int64(1),
},
DependsOn: []*batch.JobDependency{
{ // Required
JobId: aws.String("String"),
},
// More values...
},
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
RetryStrategy: &batch.RetryStrategy{
Attempts: aws.Int64(1),
},
}
resp, err := svc.SubmitJob(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_TerminateJob() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.TerminateJobInput{
JobId: aws.String("String"), // Required
Reason: aws.String("String"), // Required
}
resp, err := svc.TerminateJob(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_UpdateComputeEnvironment() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.UpdateComputeEnvironmentInput{
ComputeEnvironment: aws.String("String"), // Required
ComputeResources: &batch.ComputeResourceUpdate{
DesiredvCpus: aws.Int64(1),
MaxvCpus: aws.Int64(1),
MinvCpus: aws.Int64(1),
},
ServiceRole: aws.String("String"),
State: aws.String("CEState"),
}
resp, err := svc.UpdateComputeEnvironment(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_UpdateJobQueue() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.UpdateJobQueueInput{
JobQueue: aws.String("String"), // Required
ComputeEnvironmentOrder: []*batch.ComputeEnvironmentOrder{
{ // Required
ComputeEnvironment: aws.String("String"), // Required
Order: aws.Int64(1), // Required
},
// More values...
},
Priority: aws.Int64(1),
State: aws.String("JQState"),
}
resp, err := svc.UpdateJobQueue(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}

View file

@ -0,0 +1,94 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package batch
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// Batch provides the API operation methods for making requests to
// AWS Batch. See this package's package overview docs
// for details on the service.
//
// Batch methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type Batch struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "batch" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the Batch client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a Batch client from just a session.
// svc := batch.New(mySession)
//
// // Create a Batch client with additional configuration
// svc := batch.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Batch {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Batch {
svc := &Batch{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2016-08-10",
JSONVersion: "1.1",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a Batch operation and runs any
// custom request initialization.
func (c *Batch) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}