Class CfnAlgorithm
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.sagemaker.CfnAlgorithm
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IAlgorithmRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)",
date="2026-07-24T11:46:53.979Z")
@Stability(Stable)
public class CfnAlgorithm
extends CfnResource
implements IInspectable, IAlgorithmRef, ITaggableV2
Resource Type definition for AWS::SageMaker::Algorithm.
Example:
// 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.*;
CfnAlgorithm cfnAlgorithm = CfnAlgorithm.Builder.create(this, "MyCfnAlgorithm")
.algorithmName("algorithmName")
.trainingSpecification(TrainingSpecificationProperty.builder()
.supportedTrainingInstanceTypes(List.of("supportedTrainingInstanceTypes"))
.trainingChannels(List.of(ChannelSpecificationProperty.builder()
.name("name")
.supportedContentTypes(List.of("supportedContentTypes"))
.supportedInputModes(List.of("supportedInputModes"))
// the properties below are optional
.description("description")
.isRequired(false)
.supportedCompressionTypes(List.of("supportedCompressionTypes"))
.build()))
.trainingImage("trainingImage")
// the properties below are optional
.metricDefinitions(List.of(MetricDefinitionProperty.builder()
.name("name")
.regex("regex")
.build()))
.supportedHyperParameters(List.of(HyperParameterSpecificationProperty.builder()
.name("name")
.type("type")
// the properties below are optional
.defaultValue("defaultValue")
.description("description")
.isRequired(false)
.isTunable(false)
.range(ParameterRangeProperty.builder()
.categoricalParameterRangeSpecification(CategoricalParameterRangeSpecificationProperty.builder()
.values(List.of("values"))
.build())
.continuousParameterRangeSpecification(ContinuousParameterRangeSpecificationProperty.builder()
.maxValue("maxValue")
.minValue("minValue")
.build())
.integerParameterRangeSpecification(IntegerParameterRangeSpecificationProperty.builder()
.maxValue("maxValue")
.minValue("minValue")
.build())
.build())
.build()))
.supportedTuningJobObjectiveMetrics(List.of(HyperParameterTuningJobObjectiveProperty.builder()
.metricName("metricName")
.type("type")
.build()))
.supportsDistributedTraining(false)
.trainingImageDigest("trainingImageDigest")
.build())
// the properties below are optional
.algorithmDescription("algorithmDescription")
.certifyForMarketplace(false)
.inferenceSpecification(InferenceSpecificationProperty.builder()
.containers(List.of(ModelPackageContainerDefinitionProperty.builder()
.image("image")
// the properties below are optional
.containerHostname("containerHostname")
.environment(Map.of(
"environmentKey", "environment"))
.framework("framework")
.frameworkVersion("frameworkVersion")
.imageDigest("imageDigest")
.isCheckpoint(false)
.modelInput(ModelInputProperty.builder()
.dataInputConfig("dataInputConfig")
.build())
.nearestModelName("nearestModelName")
.build()))
// the properties below are optional
.supportedContentTypes(List.of("supportedContentTypes"))
.supportedRealtimeInferenceInstanceTypes(List.of("supportedRealtimeInferenceInstanceTypes"))
.supportedResponseMimeTypes(List.of("supportedResponseMimeTypes"))
.supportedTransformInstanceTypes(List.of("supportedTransformInstanceTypes"))
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnAlgorithm.static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.sagemaker.IAlgorithmRef
IAlgorithmRef.Jsii$Default, IAlgorithmRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAlgorithm(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAlgorithm(software.amazon.jsii.JsiiObjectRef objRef) CfnAlgorithm(software.constructs.Construct scope, String id, CfnAlgorithmProps props) Create a newAWS::SageMaker::Algorithm. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForAlgorithm(IAlgorithmRef resource) A description of the algorithm.The name of the algorithm.A reference to a Algorithm resource.The Amazon Resource Name (ARN) of the algorithm.A timestamp specifying when the algorithm was created.Tag Manager which manages the tags for this resource.Whether to certify the algorithm so that it can be listed in AWS Marketplace.Returns union: eitherIResolvableorCfnAlgorithm.InferenceSpecificationPropertygetTags()An array of key-value pairs to apply to this resource.Returns union: eitherIResolvableorCfnAlgorithm.TrainingSpecificationPropertyvoidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnAlgorithm.renderProperties(Map<String, Object> props) voidsetAlgorithmDescription(String value) A description of the algorithm.voidsetAlgorithmName(String value) The name of the algorithm.voidsetCertifyForMarketplace(Boolean value) Whether to certify the algorithm so that it can be listed in AWS Marketplace.voidWhether to certify the algorithm so that it can be listed in AWS Marketplace.voidvoidvoidAn array of key-value pairs to apply to this resource.voidvoidMethods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, addResourceDependency, addResourceDependency, applyCrossStackReferenceStrength, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, cfnPropertyName, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, removeDependency, removeResourceDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId, withMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAlgorithm
protected CfnAlgorithm(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAlgorithm
protected CfnAlgorithm(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAlgorithm
@Stability(Stable) public CfnAlgorithm(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAlgorithmProps props) Create a newAWS::SageMaker::Algorithm.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForAlgorithm
- Parameters:
resource- This parameter is required.
-
isCfnAlgorithm
Checks whether the given object is a CfnAlgorithm.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAlgorithmRef
A reference to a Algorithm resource.- Specified by:
getAlgorithmRefin interfaceIAlgorithmRef
-
getAttrAlgorithmArn
The Amazon Resource Name (ARN) of the algorithm. -
getAttrCreationTime
A timestamp specifying when the algorithm was created. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getCfnPropertyNames
- Overrides:
getCfnPropertyNamesin classCfnResource
-
getAlgorithmName
The name of the algorithm. -
setAlgorithmName
The name of the algorithm. -
getTrainingSpecification
Returns union: eitherIResolvableorCfnAlgorithm.TrainingSpecificationProperty -
setTrainingSpecification
-
setTrainingSpecification
@Stability(Stable) public void setTrainingSpecification(@NotNull CfnAlgorithm.TrainingSpecificationProperty value) -
getAlgorithmDescription
A description of the algorithm. -
setAlgorithmDescription
A description of the algorithm. -
getCertifyForMarketplace
Whether to certify the algorithm so that it can be listed in AWS Marketplace.Returns union: either
BooleanorIResolvable -
setCertifyForMarketplace
Whether to certify the algorithm so that it can be listed in AWS Marketplace. -
setCertifyForMarketplace
Whether to certify the algorithm so that it can be listed in AWS Marketplace. -
getInferenceSpecification
Returns union: eitherIResolvableorCfnAlgorithm.InferenceSpecificationProperty -
setInferenceSpecification
-
setInferenceSpecification
@Stability(Stable) public void setInferenceSpecification(@Nullable CfnAlgorithm.InferenceSpecificationProperty value) -
getTags
An array of key-value pairs to apply to this resource. -
setTags
An array of key-value pairs to apply to this resource.
-