# ResourceSpecProperty

Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on.

> When both `SageMakerImageVersionArn` and `SageMakerImageArn` are passed, `SageMakerImageVersionArn` is used. Any updates to `SageMakerImageArn` will not take effect if `SageMakerImageVersionArn` already exists in the `ResourceSpec` because `SageMakerImageVersionArn` always takes precedence. To clear the value set for `SageMakerImageVersionArn` , pass `None` as the value.

- Source: Generated at build time
- Type last changed: v2.258.0 · 4 Jun 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const resourceSpecProperty: sagemaker.CfnDomain.ResourceSpecProperty = {
  instanceType: 'instanceType',
  lifecycleConfigArn: 'lifecycleConfigArn',
  sageMakerImageArn: 'sageMakerImageArn',
  sageMakerImageVersionArn: 'sageMakerImageVersionArn',
  trainingPlanArn: 'trainingPlanArn',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

resource_spec_property = sagemaker.CfnDomain.ResourceSpecProperty(
    instance_type="instanceType",
    lifecycle_config_arn="lifecycleConfigArn",
    sage_maker_image_arn="sageMakerImageArn",
    sage_maker_image_version_arn="sageMakerImageVersionArn",
    training_plan_arn="trainingPlanArn"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

ResourceSpecProperty resourceSpecProperty = ResourceSpecProperty.builder()
        .instanceType("instanceType")
        .lifecycleConfigArn("lifecycleConfigArn")
        .sageMakerImageArn("sageMakerImageArn")
        .sageMakerImageVersionArn("sageMakerImageVersionArn")
        .trainingPlanArn("trainingPlanArn")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var resourceSpecProperty = new ResourceSpecProperty {
    InstanceType = "instanceType",
    LifecycleConfigArn = "lifecycleConfigArn",
    SageMakerImageArn = "sageMakerImageArn",
    SageMakerImageVersionArn = "sageMakerImageVersionArn",
    TrainingPlanArn = "trainingPlanArn"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

resourceSpecProperty := &ResourceSpecProperty{
	InstanceType: jsii.String("instanceType"),
	LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
	SageMakerImageArn: jsii.String("sageMakerImageArn"),
	SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
	TrainingPlanArn: jsii.String("trainingPlanArn"),
}
```

## Properties

- `instanceType`: string — The instance type that the image version runs on.

  > *JupyterServer apps* only support the `system` value.
  >
  > For *KernelGateway apps* , the `system` value is translated to `ml.t3.medium` . KernelGateway apps also support all other values for available instance types.

- `lifecycleConfigArn`: string — The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.

- `sageMakerImageArn`: string — The ARN of the SageMaker AI image that the image version belongs to.

- `sageMakerImageVersionArn`: string — The ARN of the image version created on the instance.

  To clear the value set for `SageMakerImageVersionArn` , pass `None` as the value.

- `trainingPlanArn`: string — The Amazon Resource Name (ARN) of the training plan to use for the ResourceSpec.
