aws-cdk-neuronx-patterns
Version:
> [!WARNING] > This library is experimental module.
1,276 lines (803 loc) • 612 kB
Markdown
# API Reference <a name="API Reference" id="api-reference"></a>
## Constructs <a name="Constructs" id="Constructs"></a>
### ApplicationLoadBalancedNeuronxService <a name="ApplicationLoadBalancedNeuronxService" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService"></a>
#### Initializers <a name="Initializers" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.Initializer"></a>
```typescript
import { ApplicationLoadBalancedNeuronxService } from 'aws-cdk-neuronx-patterns'
new ApplicationLoadBalancedNeuronxService(scope: Construct, id: string, props: ApplicationLoadBalancedNeuronxServiceProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.Initializer.parameter.props">props</a></code> | <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxServiceProps">ApplicationLoadBalancedNeuronxServiceProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.Initializer.parameter.props"></a>
- *Type:* <a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxServiceProps">ApplicationLoadBalancedNeuronxServiceProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.toString">toString</a></code> | Returns a string representation of this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.with">with</a></code> | Applies one or more mixins to this construct. |
---
##### `toString` <a name="toString" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with` <a name="with" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.with"></a>
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`<sup>Required</sup> <a name="mixins" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.with.parameter.mixins"></a>
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.isConstruct"></a>
```typescript
import { ApplicationLoadBalancedNeuronxService } from 'aws-cdk-neuronx-patterns'
ApplicationLoadBalancedNeuronxService.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`<sup>Required</sup> <a name="x" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.cluster">cluster</a></code> | <code>aws-cdk-lib.aws_ecs.ICluster</code> | The cluster that hosts the service. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.listener">listener</a></code> | <code>aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener</code> | The listener for the service. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.loadBalancer">loadBalancer</a></code> | <code>aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer</code> | The Application Load Balancer for the service. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.targetGroup">targetGroup</a></code> | <code>aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup</code> | The target group for the service. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.certificate">certificate</a></code> | <code>aws-cdk-lib.aws_certificatemanager.ICertificate</code> | Certificate Manager certificate to associate with the load balancer. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.internalDesiredCount">internalDesiredCount</a></code> | <code>number</code> | The desired number of instantiations of the task definition to keep running on the service. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.redirectListener">redirectListener</a></code> | <code>aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener</code> | The redirect listener for the service if redirectHTTP is enabled. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.service">service</a></code> | <code>aws-cdk-lib.aws_ecs.Ec2Service</code> | The EC2 service in this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.taskDefinition">taskDefinition</a></code> | <code>aws-cdk-lib.aws_ecs.Ec2TaskDefinition</code> | The EC2 Task Definition in this construct. |
---
##### `node`<sup>Required</sup> <a name="node" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `cluster`<sup>Required</sup> <a name="cluster" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.cluster"></a>
```typescript
public readonly cluster: ICluster;
```
- *Type:* aws-cdk-lib.aws_ecs.ICluster
The cluster that hosts the service.
---
##### `listener`<sup>Required</sup> <a name="listener" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.listener"></a>
```typescript
public readonly listener: ApplicationListener;
```
- *Type:* aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener
The listener for the service.
---
##### `loadBalancer`<sup>Required</sup> <a name="loadBalancer" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.loadBalancer"></a>
```typescript
public readonly loadBalancer: ApplicationLoadBalancer;
```
- *Type:* aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer
The Application Load Balancer for the service.
---
##### `targetGroup`<sup>Required</sup> <a name="targetGroup" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.targetGroup"></a>
```typescript
public readonly targetGroup: ApplicationTargetGroup;
```
- *Type:* aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup
The target group for the service.
---
##### `certificate`<sup>Optional</sup> <a name="certificate" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.certificate"></a>
```typescript
public readonly certificate: ICertificate;
```
- *Type:* aws-cdk-lib.aws_certificatemanager.ICertificate
Certificate Manager certificate to associate with the load balancer.
---
##### `internalDesiredCount`<sup>Optional</sup> <a name="internalDesiredCount" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.internalDesiredCount"></a>
```typescript
public readonly internalDesiredCount: number;
```
- *Type:* number
The desired number of instantiations of the task definition to keep running on the service.
The default is 1 for all new services and uses the existing services desired count
when updating an existing service if one is not provided.
---
##### `redirectListener`<sup>Optional</sup> <a name="redirectListener" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.redirectListener"></a>
```typescript
public readonly redirectListener: ApplicationListener;
```
- *Type:* aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener
The redirect listener for the service if redirectHTTP is enabled.
---
##### `service`<sup>Required</sup> <a name="service" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.service"></a>
```typescript
public readonly service: Ec2Service;
```
- *Type:* aws-cdk-lib.aws_ecs.Ec2Service
The EC2 service in this construct.
---
##### `taskDefinition`<sup>Required</sup> <a name="taskDefinition" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedNeuronxService.property.taskDefinition"></a>
```typescript
public readonly taskDefinition: Ec2TaskDefinition;
```
- *Type:* aws-cdk-lib.aws_ecs.Ec2TaskDefinition
The EC2 Task Definition in this construct.
---
### ApplicationLoadBalancedVllmNxDInferenceService <a name="ApplicationLoadBalancedVllmNxDInferenceService" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService"></a>
ApplicationLoadBalancedVllmNxDInferenceService is a wrapper of ApplicationLoadBalancedNeuronxServiceBase.
It provides a simple way to deploy vLLM on NxD Inference.
*Example*
```typescript
const compiler = new VllmNxdInferenceCompiler(this, "Compiler", {
vpc,
bucket,
model: Model.fromHuggingFace("example/example-7b-chat"),
});
const compiledModel = compiler.compile();
const taskDefinition = new VllmNxdInferenceTaskDefinition(
this,
"TaskDefinition",
{
vpc,
compiledModel,
},
);
new ApplicationLoadBalancedVllmNxDInferenceService(this, "Service", {
taskDefinition,
});
```
#### Initializers <a name="Initializers" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.Initializer"></a>
```typescript
import { ApplicationLoadBalancedVllmNxDInferenceService } from 'aws-cdk-neuronx-patterns'
new ApplicationLoadBalancedVllmNxDInferenceService(scope: Construct, id: string, props: ApplicationLoadBalancedVllmNxDInferenceServiceProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.Initializer.parameter.props">props</a></code> | <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceServiceProps">ApplicationLoadBalancedVllmNxDInferenceServiceProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.Initializer.parameter.props"></a>
- *Type:* <a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceServiceProps">ApplicationLoadBalancedVllmNxDInferenceServiceProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.toString">toString</a></code> | Returns a string representation of this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.with">with</a></code> | Applies one or more mixins to this construct. |
---
##### `toString` <a name="toString" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with` <a name="with" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.with"></a>
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`<sup>Required</sup> <a name="mixins" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.with.parameter.mixins"></a>
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.isConstruct"></a>
```typescript
import { ApplicationLoadBalancedVllmNxDInferenceService } from 'aws-cdk-neuronx-patterns'
ApplicationLoadBalancedVllmNxDInferenceService.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`<sup>Required</sup> <a name="x" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.listener">listener</a></code> | <code>aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.loadBalancer">loadBalancer</a></code> | <code>aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.service">service</a></code> | <code>aws-cdk-lib.aws_ecs.Ec2Service</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.targetGroup">targetGroup</a></code> | <code>aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.taskDefinition">taskDefinition</a></code> | <code>aws-cdk-lib.aws_ecs.Ec2TaskDefinition</code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `listener`<sup>Required</sup> <a name="listener" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.listener"></a>
```typescript
public readonly listener: ApplicationListener;
```
- *Type:* aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener
---
##### `loadBalancer`<sup>Required</sup> <a name="loadBalancer" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.loadBalancer"></a>
```typescript
public readonly loadBalancer: ApplicationLoadBalancer;
```
- *Type:* aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer
---
##### `service`<sup>Required</sup> <a name="service" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.service"></a>
```typescript
public readonly service: Ec2Service;
```
- *Type:* aws-cdk-lib.aws_ecs.Ec2Service
---
##### `targetGroup`<sup>Required</sup> <a name="targetGroup" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.targetGroup"></a>
```typescript
public readonly targetGroup: ApplicationTargetGroup;
```
- *Type:* aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup
---
##### `taskDefinition`<sup>Required</sup> <a name="taskDefinition" id="aws-cdk-neuronx-patterns.ApplicationLoadBalancedVllmNxDInferenceService.property.taskDefinition"></a>
```typescript
public readonly taskDefinition: Ec2TaskDefinition;
```
- *Type:* aws-cdk-lib.aws_ecs.Ec2TaskDefinition
---
### NeuronOptimizedMachineImage <a name="NeuronOptimizedMachineImage" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage"></a>
- *Implements:* aws-cdk-lib.aws_ec2.IMachineImage
#### Initializers <a name="Initializers" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.Initializer"></a>
```typescript
import { NeuronOptimizedMachineImage } from 'aws-cdk-neuronx-patterns'
new NeuronOptimizedMachineImage(scope: Construct, id: string)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.Initializer.parameter.id"></a>
- *Type:* string
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.toString">toString</a></code> | Returns a string representation of this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.with">with</a></code> | Applies one or more mixins to this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.getImage">getImage</a></code> | Return the image to use in the given context. |
---
##### `toString` <a name="toString" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with` <a name="with" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.with"></a>
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`<sup>Required</sup> <a name="mixins" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.with.parameter.mixins"></a>
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `getImage` <a name="getImage" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.getImage"></a>
```typescript
public getImage(_scope: Construct): MachineImageConfig
```
Return the image to use in the given context.
###### `_scope`<sup>Required</sup> <a name="_scope" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.getImage.parameter._scope"></a>
- *Type:* constructs.Construct
---
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.isConstruct"></a>
```typescript
import { NeuronOptimizedMachineImage } from 'aws-cdk-neuronx-patterns'
NeuronOptimizedMachineImage.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`<sup>Required</sup> <a name="x" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.property.imageId">imageId</a></code> | <code>string</code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `imageId`<sup>Required</sup> <a name="imageId" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.property.imageId"></a>
```typescript
public readonly imageId: string;
```
- *Type:* string
---
#### Constants <a name="Constants" id="Constants"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.property.size">size</a></code> | <code>aws-cdk-lib.Size</code> | *No description.* |
---
##### `size`<sup>Required</sup> <a name="size" id="aws-cdk-neuronx-patterns.NeuronOptimizedMachineImage.property.size"></a>
```typescript
public readonly size: Size;
```
- *Type:* aws-cdk-lib.Size
---
### NeuronxBatch <a name="NeuronxBatch" id="aws-cdk-neuronx-patterns.NeuronxBatch"></a>
Neuronx batch construct.
#### Initializers <a name="Initializers" id="aws-cdk-neuronx-patterns.NeuronxBatch.Initializer"></a>
```typescript
import { NeuronxBatch } from 'aws-cdk-neuronx-patterns'
new NeuronxBatch(scope: Construct, id: string, props: NeuronxBatchProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.Initializer.parameter.props">props</a></code> | <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchProps">NeuronxBatchProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="aws-cdk-neuronx-patterns.NeuronxBatch.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="aws-cdk-neuronx-patterns.NeuronxBatch.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="aws-cdk-neuronx-patterns.NeuronxBatch.Initializer.parameter.props"></a>
- *Type:* <a href="#aws-cdk-neuronx-patterns.NeuronxBatchProps">NeuronxBatchProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.toString">toString</a></code> | Returns a string representation of this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.with">with</a></code> | Applies one or more mixins to this construct. |
---
##### `toString` <a name="toString" id="aws-cdk-neuronx-patterns.NeuronxBatch.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with` <a name="with" id="aws-cdk-neuronx-patterns.NeuronxBatch.with"></a>
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`<sup>Required</sup> <a name="mixins" id="aws-cdk-neuronx-patterns.NeuronxBatch.with.parameter.mixins"></a>
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="aws-cdk-neuronx-patterns.NeuronxBatch.isConstruct"></a>
```typescript
import { NeuronxBatch } from 'aws-cdk-neuronx-patterns'
NeuronxBatch.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`<sup>Required</sup> <a name="x" id="aws-cdk-neuronx-patterns.NeuronxBatch.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.property.computeEnvironment">computeEnvironment</a></code> | <code>aws-cdk-lib.aws_batch.ManagedEc2EcsComputeEnvironment</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatch.property.jobDefinition">jobDefinition</a></code> | <code>aws-cdk-lib.aws_batch.EcsJobDefinition</code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="aws-cdk-neuronx-patterns.NeuronxBatch.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `computeEnvironment`<sup>Required</sup> <a name="computeEnvironment" id="aws-cdk-neuronx-patterns.NeuronxBatch.property.computeEnvironment"></a>
```typescript
public readonly computeEnvironment: ManagedEc2EcsComputeEnvironment;
```
- *Type:* aws-cdk-lib.aws_batch.ManagedEc2EcsComputeEnvironment
---
##### `jobDefinition`<sup>Required</sup> <a name="jobDefinition" id="aws-cdk-neuronx-patterns.NeuronxBatch.property.jobDefinition"></a>
```typescript
public readonly jobDefinition: EcsJobDefinition;
```
- *Type:* aws-cdk-lib.aws_batch.EcsJobDefinition
---
### NeuronxBatchComputeEnvironment <a name="NeuronxBatchComputeEnvironment" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment"></a>
- *Implements:* aws-cdk-lib.aws_batch.IComputeEnvironment
Neuronx batch construct.
#### Initializers <a name="Initializers" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.Initializer"></a>
```typescript
import { NeuronxBatchComputeEnvironment } from 'aws-cdk-neuronx-patterns'
new NeuronxBatchComputeEnvironment(scope: Construct, id: string, props: NeuronxBatchComputeEnvironmentProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.Initializer.parameter.props">props</a></code> | <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironmentProps">NeuronxBatchComputeEnvironmentProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.Initializer.parameter.props"></a>
- *Type:* <a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironmentProps">NeuronxBatchComputeEnvironmentProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.toString">toString</a></code> | Returns a string representation of this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.with">with</a></code> | Applies one or more mixins to this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
---
##### `toString` <a name="toString" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with` <a name="with" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.with"></a>
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`<sup>Required</sup> <a name="mixins" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.with.parameter.mixins"></a>
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.applyRemovalPolicy"></a>
```typescript
public applyRemovalPolicy(policy: RemovalPolicy): void
```
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops
being managed by CloudFormation, either because you've removed it from the
CDK application or because you've made a change that requires the resource
to be replaced.
The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
###### `policy`<sup>Required</sup> <a name="policy" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.applyRemovalPolicy.parameter.policy"></a>
- *Type:* aws-cdk-lib.RemovalPolicy
---
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.isConstruct"></a>
```typescript
import { NeuronxBatchComputeEnvironment } from 'aws-cdk-neuronx-patterns'
NeuronxBatchComputeEnvironment.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`<sup>Required</sup> <a name="x" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.computeEnvironmentArn">computeEnvironmentArn</a></code> | <code>string</code> | The ARN of this compute environment. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.computeEnvironmentName">computeEnvironmentName</a></code> | <code>string</code> | The name of the ComputeEnvironment. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.computeEnvironmentRef">computeEnvironmentRef</a></code> | <code>aws-cdk-lib.interfaces.aws_batch.ComputeEnvironmentReference</code> | A reference to a ComputeEnvironment resource. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.enabled">enabled</a></code> | <code>boolean</code> | Whether or not this ComputeEnvironment can accept jobs from a Queue. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.env">env</a></code> | <code>aws-cdk-lib.interfaces.ResourceEnvironment</code> | The environment this resource belongs to. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.instanceRole">instanceRole</a></code> | <code>aws-cdk-lib.aws_iam.IRole</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.serviceRole">serviceRole</a></code> | <code>aws-cdk-lib.aws_iam.IRole</code> | The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs. |
---
##### `node`<sup>Required</sup> <a name="node" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `computeEnvironmentArn`<sup>Required</sup> <a name="computeEnvironmentArn" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.computeEnvironmentArn"></a>
```typescript
public readonly computeEnvironmentArn: string;
```
- *Type:* string
The ARN of this compute environment.
---
##### `computeEnvironmentName`<sup>Required</sup> <a name="computeEnvironmentName" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.computeEnvironmentName"></a>
```typescript
public readonly computeEnvironmentName: string;
```
- *Type:* string
The name of the ComputeEnvironment.
---
##### `computeEnvironmentRef`<sup>Required</sup> <a name="computeEnvironmentRef" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.computeEnvironmentRef"></a>
```typescript
public readonly computeEnvironmentRef: ComputeEnvironmentReference;
```
- *Type:* aws-cdk-lib.interfaces.aws_batch.ComputeEnvironmentReference
A reference to a ComputeEnvironment resource.
---
##### `enabled`<sup>Required</sup> <a name="enabled" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.enabled"></a>
```typescript
public readonly enabled: boolean;
```
- *Type:* boolean
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`.
---
##### `env`<sup>Required</sup> <a name="env" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.env"></a>
```typescript
public readonly env: ResourceEnvironment;
```
- *Type:* aws-cdk-lib.interfaces.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like `new Role()`, `new Bucket()`, etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
`Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
different than the stack they were imported into.
---
##### `instanceRole`<sup>Required</sup> <a name="instanceRole" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.instanceRole"></a>
```typescript
public readonly instanceRole: IRole;
```
- *Type:* aws-cdk-lib.aws_iam.IRole
---
##### `stack`<sup>Required</sup> <a name="stack" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.stack"></a>
```typescript
public readonly stack: Stack;
```
- *Type:* aws-cdk-lib.Stack
The stack in which this resource is defined.
---
##### `serviceRole`<sup>Optional</sup> <a name="serviceRole" id="aws-cdk-neuronx-patterns.NeuronxBatchComputeEnvironment.property.serviceRole"></a>
```typescript
public readonly serviceRole: IRole;
```
- *Type:* aws-cdk-lib.aws_iam.IRole
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
---
### NeuronxBatchEcsJobDefinition <a name="NeuronxBatchEcsJobDefinition" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition"></a>
- *Implements:* aws-cdk-lib.aws_batch.IJobDefinition
Neuronx batch construct.
#### Initializers <a name="Initializers" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.Initializer"></a>
```typescript
import { NeuronxBatchEcsJobDefinition } from 'aws-cdk-neuronx-patterns'
new NeuronxBatchEcsJobDefinition(scope: Construct, id: string, props: NeuronxBatchEcsJobDefinitionProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.Initializer.parameter.props">props</a></code> | <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinitionProps">NeuronxBatchEcsJobDefinitionProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.Initializer.parameter.props"></a>
- *Type:* <a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinitionProps">NeuronxBatchEcsJobDefinitionProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.toString">toString</a></code> | Returns a string representation of this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.with">with</a></code> | Applies one or more mixins to this construct. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.addRetryStrategy">addRetryStrategy</a></code> | Add a RetryStrategy to this JobDefinition. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.grantSubmitJob">grantSubmitJob</a></code> | Grants the `batch:submitJob` permission to the identity on both this job definition and the `queue`. |
---
##### `toString` <a name="toString" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with` <a name="with" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.with"></a>
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`<sup>Required</sup> <a name="mixins" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.with.parameter.mixins"></a>
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `addRetryStrategy` <a name="addRetryStrategy" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.addRetryStrategy"></a>
```typescript
public addRetryStrategy(strategy: RetryStrategy): void
```
Add a RetryStrategy to this JobDefinition.
###### `strategy`<sup>Required</sup> <a name="strategy" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.addRetryStrategy.parameter.strategy"></a>
- *Type:* aws-cdk-lib.aws_batch.RetryStrategy
---
##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.applyRemovalPolicy"></a>
```typescript
public applyRemovalPolicy(policy: RemovalPolicy): void
```
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops
being managed by CloudFormation, either because you've removed it from the
CDK application or because you've made a change that requires the resource
to be replaced.
The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
###### `policy`<sup>Required</sup> <a name="policy" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.applyRemovalPolicy.parameter.policy"></a>
- *Type:* aws-cdk-lib.RemovalPolicy
---
##### `grantSubmitJob` <a name="grantSubmitJob" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.grantSubmitJob"></a>
```typescript
public grantSubmitJob(identity: IGrantable, queue: IJobQueue): void
```
Grants the `batch:submitJob` permission to the identity on both this job definition and the `queue`.
###### `identity`<sup>Required</sup> <a name="identity" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.grantSubmitJob.parameter.identity"></a>
- *Type:* aws-cdk-lib.aws_iam.IGrantable
---
###### `queue`<sup>Required</sup> <a name="queue" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.grantSubmitJob.parameter.queue"></a>
- *Type:* aws-cdk-lib.aws_batch.IJobQueue
---
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.isConstruct"></a>
```typescript
import { NeuronxBatchEcsJobDefinition } from 'aws-cdk-neuronx-patterns'
NeuronxBatchEcsJobDefinition.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`<sup>Required</sup> <a name="x" id="aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.property.env">env</a></code> | <code>aws-cdk-lib.interfaces.ResourceEnvironment</code> | The environment this resource belongs to. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.property.jobDefinitionArn">jobDefinitionArn</a></code> | <code>string</code> | The ARN of this job definition. |
| <code><a href="#aws-cdk-neuronx-patterns.NeuronxBatchEcsJobDefinition.property.jobDefinitionName">