Class ComputeEnvironment

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:47.652Z") @Stability(Experimental) public class ComputeEnvironment extends Resource implements IComputeEnvironment
(experimental) Batch Compute Environment.

Defines a batch compute environment to run batch jobs on.

Example:

 Vpc vpc;
 ComputeEnvironment myComputeEnv = ComputeEnvironment.Builder.create(this, "ComputeEnv")
         .computeResources(ComputeResources.builder()
                 .image(EcsOptimizedAmi.Builder.create()
                         .generation(AmazonLinuxGeneration.AMAZON_LINUX_2)
                         .build())
                 .vpc(vpc)
                 .build())
         .build();
 
  • Constructor Details

    • ComputeEnvironment

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

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

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

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

    • fromComputeEnvironmentArn

      @Stability(Experimental) @NotNull public static IComputeEnvironment fromComputeEnvironmentArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String computeEnvironmentArn)
      (experimental) Fetches an existing batch compute environment by its amazon resource name.

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

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

      @Stability(Experimental) @NotNull public String getComputeEnvironmentName()
      (experimental) The name of this compute environment.
      Specified by:
      getComputeEnvironmentName in interface IComputeEnvironment