Class ComputeEnvironmentProps.Builder

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

@Stability(Stable) public static final class ComputeEnvironmentProps.Builder extends Object implements software.amazon.jsii.Builder<ComputeEnvironmentProps>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • computeEnvironmentName

      @Stability(Stable) public ComputeEnvironmentProps.Builder computeEnvironmentName(String computeEnvironmentName)
      Parameters:
      computeEnvironmentName - The name of the ComputeEnvironment.
      Returns:
      this
    • enabled

      @Stability(Stable) public ComputeEnvironmentProps.Builder enabled(Boolean enabled)
      Parameters:
      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.

      Returns:
      this
    • serviceRole

      @Stability(Stable) public ComputeEnvironmentProps.Builder serviceRole(IRole serviceRole)
      Parameters:
      serviceRole - The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
      Returns:
      this
    • build

      @Stability(Stable) public ComputeEnvironmentProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<ComputeEnvironmentProps>
      Returns:
      a new instance of ComputeEnvironmentProps
      Throws:
      NullPointerException - if any required attribute was not provided