Class UnmanagedComputeEnvironment.Builder

java.lang.Object
software.amazon.awscdk.services.batch.UnmanagedComputeEnvironment.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<UnmanagedComputeEnvironment>
Enclosing class:
UnmanagedComputeEnvironment

@Stability(Stable) public static final class UnmanagedComputeEnvironment.Builder extends Object implements software.amazon.jsii.Builder<UnmanagedComputeEnvironment>
A fluent builder for UnmanagedComputeEnvironment.
  • Method Details

    • create

      @Stability(Stable) public static UnmanagedComputeEnvironment.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of UnmanagedComputeEnvironment.Builder.
    • computeEnvironmentName

      @Stability(Stable) public UnmanagedComputeEnvironment.Builder computeEnvironmentName(String computeEnvironmentName)
      The name of the ComputeEnvironment.

      Default: - generated by CloudFormation

      Parameters:
      computeEnvironmentName - The name of the ComputeEnvironment. This parameter is required.
      Returns:
      this
    • enabled

      @Stability(Stable) public UnmanagedComputeEnvironment.Builder enabled(Boolean enabled)
      Whether or not this ComputeEnvironment can accept jobs from a Queue.

      Enabled ComputeEnvironments can accept jobs from a Queue and can scale instances up or down. Disabled ComputeEnvironments cannot accept jobs from a Queue or scale instances up or down.

      If you change a ComputeEnvironment from enabled to disabled while it is executing jobs, Jobs in the STARTED or RUNNING states will not be interrupted. As jobs complete, the ComputeEnvironment will scale instances down to minvCpus.

      To ensure you aren't billed for unused capacity, set minvCpus to 0.

      Default: true

      Parameters:
      enabled - Whether or not this ComputeEnvironment can accept jobs from a Queue. This parameter is required.
      Returns:
      this
    • serviceRole

      @Stability(Stable) public UnmanagedComputeEnvironment.Builder serviceRole(IRole serviceRole)
      The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.

      Default: - a serviceRole will be created for managed CEs, none for unmanaged CEs

      Parameters:
      serviceRole - The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs. This parameter is required.
      Returns:
      this
    • unmanagedvCpus

      @Stability(Stable) public UnmanagedComputeEnvironment.Builder unmanagedvCpus(Number unmanagedvCpus)
      The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs in Queues that use FairshareSchedulingPolicys.

      If this parameter is not provided on a fairshare queue, no capacity is reserved; that is, the FairshareSchedulingPolicy is ignored.

      Default: 0

      Parameters:
      unmanagedvCpus - The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs in Queues that use FairshareSchedulingPolicys. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public UnmanagedComputeEnvironment build()
      Specified by:
      build in interface software.amazon.jsii.Builder<UnmanagedComputeEnvironment>
      Returns:
      a newly built instance of UnmanagedComputeEnvironment.