Class UnmanagedComputeEnvironment
Unmanaged ComputeEnvironments do not provision or manage EC2 instances on your behalf.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class UnmanagedComputeEnvironment : Resource, IUnmanagedComputeEnvironment, IComputeEnvironment, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class UnmanagedComputeEnvironment Inherits Resource Implements IUnmanagedComputeEnvironment, IComputeEnvironment, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
Resource: AWS::Batch::ComputeEnvironment
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Batch;
using Amazon.CDK.AWS.IAM;
Role role;
var unmanagedComputeEnvironment = new UnmanagedComputeEnvironment(this, "MyUnmanagedComputeEnvironment", new UnmanagedComputeEnvironmentProps {
ComputeEnvironmentName = "computeEnvironmentName",
Enabled = false,
ServiceRole = role,
UnmanagedvCpus = 123
});
Synopsis
Constructors
| UnmanagedComputeEnvironment(Construct, string, IUnmanagedComputeEnvironmentProps?) | Unmanaged ComputeEnvironments do not provision or manage EC2 instances on your behalf. |
Properties
| ComputeEnvironmentArn | The ARN of this compute environment. |
| ComputeEnvironmentName | The name of the ComputeEnvironment. |
| Enabled | Whether or not this ComputeEnvironment can accept jobs from a Queue. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
| ServiceRole | The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs. |
| UnmanagedvCPUs | The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs in |
Methods
| FromUnmanagedComputeEnvironmentArn(Construct, string, string) | Import an UnmanagedComputeEnvironment by its arn. |
Constructors
UnmanagedComputeEnvironment(Construct, string, IUnmanagedComputeEnvironmentProps?)
Unmanaged ComputeEnvironments do not provision or manage EC2 instances on your behalf.
public UnmanagedComputeEnvironment(Construct scope, string id, IUnmanagedComputeEnvironmentProps? props = null)
Parameters
- scope Construct
- id string
- props IUnmanagedComputeEnvironmentProps
Remarks
Resource: AWS::Batch::ComputeEnvironment
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Batch;
using Amazon.CDK.AWS.IAM;
Role role;
var unmanagedComputeEnvironment = new UnmanagedComputeEnvironment(this, "MyUnmanagedComputeEnvironment", new UnmanagedComputeEnvironmentProps {
ComputeEnvironmentName = "computeEnvironmentName",
Enabled = false,
ServiceRole = role,
UnmanagedvCpus = 123
});
Properties
ComputeEnvironmentArn
The ARN of this compute environment.
public virtual string ComputeEnvironmentArn { get; }
Property Value
Remarks
Resource: AWS::Batch::ComputeEnvironment
ExampleMetadata: fixture=_generated
ComputeEnvironmentName
The name of the ComputeEnvironment.
public virtual string ComputeEnvironmentName { get; }
Property Value
Remarks
Resource: AWS::Batch::ComputeEnvironment
ExampleMetadata: fixture=_generated
Enabled
Whether or not this ComputeEnvironment can accept jobs from a Queue.
public virtual bool Enabled { get; }
Property Value
Remarks
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.
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Resource: AWS::Batch::ComputeEnvironment
ExampleMetadata: fixture=_generated
ServiceRole
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
public virtual IRole? ServiceRole { get; }
Property Value
Remarks
Resource: AWS::Batch::ComputeEnvironment
ExampleMetadata: fixture=_generated
UnmanagedvCPUs
The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs in Queues that use FairshareSchedulingPolicys.
public virtual double? UnmanagedvCPUs { get; }
Property Value
Remarks
If this parameter is not provided on a fairshare queue, no capacity is reserved;
that is, the FairshareSchedulingPolicy is ignored.
Methods
FromUnmanagedComputeEnvironmentArn(Construct, string, string)
Import an UnmanagedComputeEnvironment by its arn.
public static IUnmanagedComputeEnvironment FromUnmanagedComputeEnvironmentArn(Construct scope, string id, string unmanagedComputeEnvironmentArn)
Parameters
Returns
Remarks
Resource: AWS::Batch::ComputeEnvironment
ExampleMetadata: fixture=_generated