# CfnAlgorithmProps

Properties for defining a `CfnAlgorithm`.

Extends: CfnAlgorithmProps
Used as props by: CfnAlgorithm

- Source: Generated code
- Type last changed: v2.262.0 · 22 Jul 2026

## Example

```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 cfnAlgorithmProps: sagemaker.CfnAlgorithmProps = {
  algorithmName: 'algorithmName',
  trainingSpecification: {
    supportedTrainingInstanceTypes: ['supportedTrainingInstanceTypes'],
    trainingChannels: [{
      name: 'name',
      supportedContentTypes: ['supportedContentTypes'],
      supportedInputModes: ['supportedInputModes'],

      // the properties below are optional
      description: 'description',
      isRequired: false,
      supportedCompressionTypes: ['supportedCompressionTypes'],
    }],
    trainingImage: 'trainingImage',

    // the properties below are optional
    metricDefinitions: [{
      name: 'name',
      regex: 'regex',
    }],
    supportedHyperParameters: [{
      name: 'name',
      type: 'type',

      // the properties below are optional
      defaultValue: 'defaultValue',
      description: 'description',
      isRequired: false,
      isTunable: false,
      range: {
        categoricalParameterRangeSpecification: {
          values: ['values'],
        },
        continuousParameterRangeSpecification: {
          maxValue: 'maxValue',
          minValue: 'minValue',
        },
        integerParameterRangeSpecification: {
          maxValue: 'maxValue',
          minValue: 'minValue',
        },
      },
    }],
    supportedTuningJobObjectiveMetrics: [{
      metricName: 'metricName',
      type: 'type',
    }],
    supportsDistributedTraining: false,
    trainingImageDigest: 'trainingImageDigest',
  },

  // the properties below are optional
  algorithmDescription: 'algorithmDescription',
  certifyForMarketplace: false,
  inferenceSpecification: {
    containers: [{
      image: 'image',

      // the properties below are optional
      containerHostname: 'containerHostname',
      environment: {
        environmentKey: 'environment',
      },
      framework: 'framework',
      frameworkVersion: 'frameworkVersion',
      imageDigest: 'imageDigest',
      isCheckpoint: false,
      modelInput: {
        dataInputConfig: 'dataInputConfig',
      },
      nearestModelName: 'nearestModelName',
    }],

    // the properties below are optional
    supportedContentTypes: ['supportedContentTypes'],
    supportedRealtimeInferenceInstanceTypes: ['supportedRealtimeInferenceInstanceTypes'],
    supportedResponseMimeTypes: ['supportedResponseMimeTypes'],
    supportedTransformInstanceTypes: ['supportedTransformInstanceTypes'],
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `algorithmDescription`: string — A description of the algorithm.

- `algorithmName`: string (required) — The name of the algorithm.

- `certifyForMarketplace`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether to certify the algorithm so that it can be listed in AWS Marketplace.

- `inferenceSpecification`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlgorithm.InferenceSpecificationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnAlgorithm.InferenceSpecificationProperty.html)

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

- `trainingSpecification`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlgorithm.TrainingSpecificationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnAlgorithm.TrainingSpecificationProperty.html) (required)
