# InferenceComponentSpecificationForInstanceTypeProperty

A specification for one instance type, for use in Specifications.

InstanceType is required here, and is not accepted on the singular Specification. BaseInferenceComponentName is not accepted here either: adapter inference components are supported only on the singular Specification.

- Source: Generated at build time
- Type last changed: v2.268.0 · 2 Sep 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 inferenceComponentSpecificationForInstanceTypeProperty: sagemaker.CfnInferenceComponent.InferenceComponentSpecificationForInstanceTypeProperty = {
  instanceType: 'instanceType',

  // the properties below are optional
  computeResourceRequirements: {
    maxMemoryRequiredInMb: 123,
    minMemoryRequiredInMb: 123,
    numberOfAcceleratorDevicesRequired: 123,
    numberOfCpuCoresRequired: 123,
  },
  container: {
    artifactUrl: 'artifactUrl',
    containerMetricsConfig: {
      metricsEndpoints: [{
        metricsEndpointPath: 'metricsEndpointPath',

        // the properties below are optional
        metricPublishFrequencyInSeconds: 123,
      }],
    },
    environment: {
      environmentKey: 'environment',
    },
    image: 'image',
  },
  currentDataCacheConfig: {
    enableCaching: false,
  },
  dataCacheConfig: {
    enableCaching: false,
  },
  modelName: 'modelName',
  schedulingConfig: {
    availabilityZoneBalance: {
      enforcementMode: 'enforcementMode',

      // the properties below are optional
      maxImbalance: 123,
    },
    placementStrategy: 'placementStrategy',
  },
  startupParameters: {
    containerStartupHealthCheckTimeoutInSeconds: 123,
    modelDataDownloadTimeoutInSeconds: 123,
  },
};
```

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

inference_component_specification_for_instance_type_property = sagemaker.CfnInferenceComponent.InferenceComponentSpecificationForInstanceTypeProperty(
    instance_type="instanceType",

    # the properties below are optional
    compute_resource_requirements=sagemaker.CfnInferenceComponent.InferenceComponentComputeResourceRequirementsProperty(
        max_memory_required_in_mb=123,
        min_memory_required_in_mb=123,
        number_of_accelerator_devices_required=123,
        number_of_cpu_cores_required=123
    ),
    container=sagemaker.CfnInferenceComponent.InferenceComponentContainerSpecificationForInstanceTypeProperty(
        artifact_url="artifactUrl",
        container_metrics_config=sagemaker.CfnInferenceComponent.ContainerMetricsConfigProperty(
            metrics_endpoints=[sagemaker.CfnInferenceComponent.MetricsEndpointProperty(
                metrics_endpoint_path="metricsEndpointPath",

                # the properties below are optional
                metric_publish_frequency_in_seconds=123
            )]
        ),
        environment={
            "environment_key": "environment"
        },
        image="image"
    ),
    current_data_cache_config=sagemaker.CfnInferenceComponent.InferenceComponentDataCacheConfigProperty(
        enable_caching=False
    ),
    data_cache_config=sagemaker.CfnInferenceComponent.InferenceComponentDataCacheConfigProperty(
        enable_caching=False
    ),
    model_name="modelName",
    scheduling_config=sagemaker.CfnInferenceComponent.InferenceComponentSchedulingConfigProperty(
        availability_zone_balance=sagemaker.CfnInferenceComponent.InferenceComponentAvailabilityZoneBalanceProperty(
            enforcement_mode="enforcementMode",

            # the properties below are optional
            max_imbalance=123
        ),
        placement_strategy="placementStrategy"
    ),
    startup_parameters=sagemaker.CfnInferenceComponent.InferenceComponentStartupParametersProperty(
        container_startup_health_check_timeout_in_seconds=123,
        model_data_download_timeout_in_seconds=123
    )
)
```

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.*;

InferenceComponentSpecificationForInstanceTypeProperty inferenceComponentSpecificationForInstanceTypeProperty = InferenceComponentSpecificationForInstanceTypeProperty.builder()
        .instanceType("instanceType")

        // the properties below are optional
        .computeResourceRequirements(InferenceComponentComputeResourceRequirementsProperty.builder()
                .maxMemoryRequiredInMb(123)
                .minMemoryRequiredInMb(123)
                .numberOfAcceleratorDevicesRequired(123)
                .numberOfCpuCoresRequired(123)
                .build())
        .container(InferenceComponentContainerSpecificationForInstanceTypeProperty.builder()
                .artifactUrl("artifactUrl")
                .containerMetricsConfig(ContainerMetricsConfigProperty.builder()
                        .metricsEndpoints(List.of(MetricsEndpointProperty.builder()
                                .metricsEndpointPath("metricsEndpointPath")

                                // the properties below are optional
                                .metricPublishFrequencyInSeconds(123)
                                .build()))
                        .build())
                .environment(Map.of(
                        "environmentKey", "environment"))
                .image("image")
                .build())
        .currentDataCacheConfig(InferenceComponentDataCacheConfigProperty.builder()
                .enableCaching(false)
                .build())
        .dataCacheConfig(InferenceComponentDataCacheConfigProperty.builder()
                .enableCaching(false)
                .build())
        .modelName("modelName")
        .schedulingConfig(InferenceComponentSchedulingConfigProperty.builder()
                .availabilityZoneBalance(InferenceComponentAvailabilityZoneBalanceProperty.builder()
                        .enforcementMode("enforcementMode")

                        // the properties below are optional
                        .maxImbalance(123)
                        .build())
                .placementStrategy("placementStrategy")
                .build())
        .startupParameters(InferenceComponentStartupParametersProperty.builder()
                .containerStartupHealthCheckTimeoutInSeconds(123)
                .modelDataDownloadTimeoutInSeconds(123)
                .build())
        .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 inferenceComponentSpecificationForInstanceTypeProperty = new InferenceComponentSpecificationForInstanceTypeProperty {
    InstanceType = "instanceType",

    // the properties below are optional
    ComputeResourceRequirements = new InferenceComponentComputeResourceRequirementsProperty {
        MaxMemoryRequiredInMb = 123,
        MinMemoryRequiredInMb = 123,
        NumberOfAcceleratorDevicesRequired = 123,
        NumberOfCpuCoresRequired = 123
    },
    Container = new InferenceComponentContainerSpecificationForInstanceTypeProperty {
        ArtifactUrl = "artifactUrl",
        ContainerMetricsConfig = new ContainerMetricsConfigProperty {
            MetricsEndpoints = new [] { new MetricsEndpointProperty {
                MetricsEndpointPath = "metricsEndpointPath",

                // the properties below are optional
                MetricPublishFrequencyInSeconds = 123
            } }
        },
        Environment = new Dictionary<string, string> {
            { "environmentKey", "environment" }
        },
        Image = "image"
    },
    CurrentDataCacheConfig = new InferenceComponentDataCacheConfigProperty {
        EnableCaching = false
    },
    DataCacheConfig = new InferenceComponentDataCacheConfigProperty {
        EnableCaching = false
    },
    ModelName = "modelName",
    SchedulingConfig = new InferenceComponentSchedulingConfigProperty {
        AvailabilityZoneBalance = new InferenceComponentAvailabilityZoneBalanceProperty {
            EnforcementMode = "enforcementMode",

            // the properties below are optional
            MaxImbalance = 123
        },
        PlacementStrategy = "placementStrategy"
    },
    StartupParameters = new InferenceComponentStartupParametersProperty {
        ContainerStartupHealthCheckTimeoutInSeconds = 123,
        ModelDataDownloadTimeoutInSeconds = 123
    }
};
```

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"

inferenceComponentSpecificationForInstanceTypeProperty := &InferenceComponentSpecificationForInstanceTypeProperty{
	InstanceType: jsii.String("instanceType"),

	// the properties below are optional
	ComputeResourceRequirements: &InferenceComponentComputeResourceRequirementsProperty{
		MaxMemoryRequiredInMb: jsii.Number(123),
		MinMemoryRequiredInMb: jsii.Number(123),
		NumberOfAcceleratorDevicesRequired: jsii.Number(123),
		NumberOfCpuCoresRequired: jsii.Number(123),
	},
	Container: &InferenceComponentContainerSpecificationForInstanceTypeProperty{
		ArtifactUrl: jsii.String("artifactUrl"),
		ContainerMetricsConfig: &ContainerMetricsConfigProperty{
			MetricsEndpoints: []interface{}{
				&MetricsEndpointProperty{
					MetricsEndpointPath: jsii.String("metricsEndpointPath"),

					// the properties below are optional
					MetricPublishFrequencyInSeconds: jsii.Number(123),
				},
			},
		},
		Environment: map[string]*string{
			"environmentKey": jsii.String("environment"),
		},
		Image: jsii.String("image"),
	},
	CurrentDataCacheConfig: &InferenceComponentDataCacheConfigProperty{
		EnableCaching: jsii.Boolean(false),
	},
	DataCacheConfig: &InferenceComponentDataCacheConfigProperty{
		EnableCaching: jsii.Boolean(false),
	},
	ModelName: jsii.String("modelName"),
	SchedulingConfig: &InferenceComponentSchedulingConfigProperty{
		AvailabilityZoneBalance: &InferenceComponentAvailabilityZoneBalanceProperty{
			EnforcementMode: jsii.String("enforcementMode"),

			// the properties below are optional
			MaxImbalance: jsii.Number(123),
		},
		PlacementStrategy: jsii.String("placementStrategy"),
	},
	StartupParameters: &InferenceComponentStartupParametersProperty{
		ContainerStartupHealthCheckTimeoutInSeconds: jsii.Number(123),
		ModelDataDownloadTimeoutInSeconds: jsii.Number(123),
	},
}
```

## Properties

- `computeResourceRequirements`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceComponent.InferenceComponentComputeResourceRequirementsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceComponent.InferenceComponentComputeResourceRequirementsProperty.html)

- `container`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceComponent.InferenceComponentContainerSpecificationForInstanceTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceComponent.InferenceComponentContainerSpecificationForInstanceTypeProperty.html) — Container specification for one Specifications entry.

  Distinct from InferenceComponentContainerSpecification: DescribeInferenceComponent returns no per-entry DeployedImage (VERIFIED in us-west-2), so DeployedImage is intentionally omitted here and this definition can never be aggregated into a plural READ response. The singular InferenceComponentContainerSpecification keeps DeployedImage - the service DOES return it there.

- `currentDataCacheConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceComponent.InferenceComponentDataCacheConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceComponent.InferenceComponentDataCacheConfigProperty.html) — Settings that affect how the inference component caches data.

- `dataCacheConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceComponent.InferenceComponentDataCacheConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceComponent.InferenceComponentDataCacheConfigProperty.html) — Settings that affect how the inference component caches data.

- `instanceType`: string (required) — An ML compute instance type.

- `modelName`: string — The name of the model to use with the inference component.

- `schedulingConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceComponent.InferenceComponentSchedulingConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceComponent.InferenceComponentSchedulingConfigProperty.html) — The scheduling configuration that determines how inference component copies are placed across available instances.

- `startupParameters`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceComponent.InferenceComponentStartupParametersProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceComponent.InferenceComponentStartupParametersProperty.html)
