Class UnmanagedComputeEnvironment

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.batch.UnmanagedComputeEnvironment
All Implemented Interfaces:
IResource, IComputeEnvironment, IUnmanagedComputeEnvironment, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:39.472Z") @Stability(Stable) public class UnmanagedComputeEnvironment extends Resource implements IUnmanagedComputeEnvironment, IComputeEnvironment
Unmanaged ComputeEnvironments do not provision or manage EC2 instances on your behalf.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.batch.*;
 import software.amazon.awscdk.services.iam.*;
 Role role;
 UnmanagedComputeEnvironment unmanagedComputeEnvironment = UnmanagedComputeEnvironment.Builder.create(this, "MyUnmanagedComputeEnvironment")
         .computeEnvironmentName("computeEnvironmentName")
         .enabled(false)
         .serviceRole(role)
         .unmanagedvCpus(123)
         .build();
 
  • Constructor Details

    • UnmanagedComputeEnvironment

      protected UnmanagedComputeEnvironment(software.amazon.jsii.JsiiObjectRef objRef)
    • UnmanagedComputeEnvironment

      protected UnmanagedComputeEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • UnmanagedComputeEnvironment

      @Stability(Stable) public UnmanagedComputeEnvironment(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable UnmanagedComputeEnvironmentProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • UnmanagedComputeEnvironment

      @Stability(Stable) public UnmanagedComputeEnvironment(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromUnmanagedComputeEnvironmentArn

      @Stability(Stable) @NotNull public static IUnmanagedComputeEnvironment fromUnmanagedComputeEnvironmentArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String unmanagedComputeEnvironmentArn)
      Import an UnmanagedComputeEnvironment by its arn.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      unmanagedComputeEnvironmentArn - This parameter is required.
    • getComputeEnvironmentArn

      @Stability(Stable) @NotNull public String getComputeEnvironmentArn()
      The ARN of this compute environment.
      Specified by:
      getComputeEnvironmentArn in interface IComputeEnvironment
    • getComputeEnvironmentName

      @Stability(Stable) @NotNull public String getComputeEnvironmentName()
      The name of the ComputeEnvironment.
      Specified by:
      getComputeEnvironmentName in interface IComputeEnvironment
    • getEnabled

      @Stability(Stable) @NotNull public Boolean getEnabled()
      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.

      Specified by:
      getEnabled in interface IComputeEnvironment
    • getServiceRole

      @Stability(Stable) @Nullable public IRole getServiceRole()
      The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
      Specified by:
      getServiceRole in interface IComputeEnvironment
    • getUnmanagedvCPUs

      @Stability(Stable) @Nullable public Number getUnmanagedvCPUs()
      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.

      Specified by:
      getUnmanagedvCPUs in interface IUnmanagedComputeEnvironment