[][src]Struct rusoto_batch::BatchClient

pub struct BatchClient { /* fields omitted */ }

A client for the AWS Batch API.

Methods

impl BatchClient[src]

pub fn new(region: Region) -> BatchClient[src]

Creates a client backed by the default tokio event loop.

The client will use the default credentials provider and tls client.

pub fn new_with<P, D>(
    request_dispatcher: D,
    credentials_provider: P,
    region: Region
) -> BatchClient where
    P: ProvideAwsCredentials + Send + Sync + 'static,
    P::Future: Send,
    D: DispatchSignedRequest + Send + Sync + 'static,
    D::Future: Send
[src]

Trait Implementations

impl Batch for BatchClient[src]

fn cancel_job(
    &self,
    input: CancelJobRequest
) -> RusotoFuture<CancelJobResponse, CancelJobError>
[src]

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.

fn create_compute_environment(
    &self,
    input: CreateComputeEnvironmentRequest
) -> RusotoFuture<CreateComputeEnvironmentResponse, CreateComputeEnvironmentError>
[src]

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 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 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 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:

  1. Create a new compute environment with the new AMI.

  2. Add the compute environment to an existing job queue.

  3. Remove the old compute environment from your job queue.

  4. Delete the old compute environment.

fn create_job_queue(
    &self,
    input: CreateJobQueueRequest
) -> RusotoFuture<CreateJobQueueResponse, CreateJobQueueError>
[src]

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.

fn delete_compute_environment(
    &self,
    input: DeleteComputeEnvironmentRequest
) -> RusotoFuture<DeleteComputeEnvironmentResponse, DeleteComputeEnvironmentError>
[src]

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.

fn delete_job_queue(
    &self,
    input: DeleteJobQueueRequest
) -> RusotoFuture<DeleteJobQueueResponse, DeleteJobQueueError>
[src]

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.

fn deregister_job_definition(
    &self,
    input: DeregisterJobDefinitionRequest
) -> RusotoFuture<DeregisterJobDefinitionResponse, DeregisterJobDefinitionError>
[src]

Deregisters an AWS Batch job definition.

fn describe_compute_environments(
    &self,
    input: DescribeComputeEnvironmentsRequest
) -> RusotoFuture<DescribeComputeEnvironmentsResponse, DescribeComputeEnvironmentsError>
[src]

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.

fn describe_job_definitions(
    &self,
    input: DescribeJobDefinitionsRequest
) -> RusotoFuture<DescribeJobDefinitionsResponse, DescribeJobDefinitionsError>
[src]

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

fn describe_job_queues(
    &self,
    input: DescribeJobQueuesRequest
) -> RusotoFuture<DescribeJobQueuesResponse, DescribeJobQueuesError>
[src]

Describes one or more of your job queues.

fn describe_jobs(
    &self,
    input: DescribeJobsRequest
) -> RusotoFuture<DescribeJobsResponse, DescribeJobsError>
[src]

Describes a list of AWS Batch jobs.

fn list_jobs(
    &self,
    input: ListJobsRequest
) -> RusotoFuture<ListJobsResponse, ListJobsError>
[src]

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.

fn register_job_definition(
    &self,
    input: RegisterJobDefinitionRequest
) -> RusotoFuture<RegisterJobDefinitionResponse, RegisterJobDefinitionError>
[src]

Registers an AWS Batch job definition.

fn submit_job(
    &self,
    input: SubmitJobRequest
) -> RusotoFuture<SubmitJobResponse, SubmitJobError>
[src]

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

fn terminate_job(
    &self,
    input: TerminateJobRequest
) -> RusotoFuture<TerminateJobResponse, TerminateJobError>
[src]

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.

fn update_compute_environment(
    &self,
    input: UpdateComputeEnvironmentRequest
) -> RusotoFuture<UpdateComputeEnvironmentResponse, UpdateComputeEnvironmentError>
[src]

Updates an AWS Batch compute environment.

fn update_job_queue(
    &self,
    input: UpdateJobQueueRequest
) -> RusotoFuture<UpdateJobQueueResponse, UpdateJobQueueError>
[src]

Updates a job queue.

impl Clone for BatchClient[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for BatchClient

impl Sync for BatchClient

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self