Class CfnTransformJob

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, ITransformJobRef, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:51:11.571Z") @Stability(Stable) public class CfnTransformJob extends CfnResource implements IInspectable, ITransformJobRef, ITaggableV2
Resource type definition for AWS::SageMaker::TransformJob.

A transform job uses a trained model to get inferences on a dataset and saves these results to an Amazon S3 location that you specify.

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.*;
 CfnTransformJob cfnTransformJob = CfnTransformJob.Builder.create(this, "MyCfnTransformJob")
         .modelName("modelName")
         .transformInput(TransformInputProperty.builder()
                 .dataSource(DataSourceProperty.builder()
                         .s3DataSource(S3DataSourceProperty.builder()
                                 .s3DataType("s3DataType")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build())
                 // the properties below are optional
                 .compressionType("compressionType")
                 .contentType("contentType")
                 .splitType("splitType")
                 .build())
         .transformOutput(TransformOutputProperty.builder()
                 .s3OutputPath("s3OutputPath")
                 // the properties below are optional
                 .accept("accept")
                 .assembleWith("assembleWith")
                 .kmsKeyId("kmsKeyId")
                 .build())
         .transformResources(TransformResourcesProperty.builder()
                 .instanceCount(123)
                 .instanceType("instanceType")
                 // the properties below are optional
                 .volumeKmsKeyId("volumeKmsKeyId")
                 .build())
         // the properties below are optional
         .batchStrategy("batchStrategy")
         .dataCaptureConfig(DataCaptureConfigProperty.builder()
                 .destinationS3Uri("destinationS3Uri")
                 // the properties below are optional
                 .generateInferenceId(false)
                 .kmsKeyId("kmsKeyId")
                 .build())
         .dataProcessing(DataProcessingProperty.builder()
                 .inputFilter("inputFilter")
                 .joinSource("joinSource")
                 .outputFilter("outputFilter")
                 .build())
         .environment(Map.of(
                 "environmentKey", "environment"))
         .experimentConfig(ExperimentConfigProperty.builder()
                 .experimentName("experimentName")
                 .trialComponentDisplayName("trialComponentDisplayName")
                 .trialName("trialName")
                 .build())
         .maxConcurrentTransforms(123)
         .maxPayloadInMb(123)
         .modelClientConfig(ModelClientConfigProperty.builder()
                 .invocationsMaxRetries(123)
                 .invocationsTimeoutInSeconds(123)
                 .build())
         .tags(List.of(TagsItemsProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTransformJob

      protected CfnTransformJob(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTransformJob

      protected CfnTransformJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTransformJob

      @Stability(Stable) public CfnTransformJob(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTransformJobProps props)
      Create a new AWS::SageMaker::TransformJob.

      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

    • arnForTransformJob

      @Stability(Stable) @NotNull public static String arnForTransformJob(@NotNull ITransformJobRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnTransformJob

      @Stability(Stable) @NotNull public static Boolean isCfnTransformJob(@NotNull Object x)
      Checks whether the given object is a CfnTransformJob.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      A timestamp that shows when the transform job was created.
    • getAttrTransformEndTime

      @Stability(Stable) @NotNull public String getAttrTransformEndTime()
      Indicates when the transform job has been completed, or has stopped or failed.
    • getAttrTransformJobArn

      @Stability(Stable) @NotNull public String getAttrTransformJobArn()
      The Amazon Resource Name (ARN) of the transform job.
    • getAttrTransformJobName

      @Stability(Stable) @NotNull public String getAttrTransformJobName()
      The name of the transform job.

      The name must be unique within an AWS Region in an AWS account.

    • getAttrTransformJobStatus

      @Stability(Stable) @NotNull public String getAttrTransformJobStatus()
      The status of the transform job.
    • getAttrTransformStartTime

      @Stability(Stable) @NotNull public String getAttrTransformStartTime()
      Indicates when the transform job starts on ML instances.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getTransformJobRef

      @Stability(Stable) @NotNull public TransformJobReference getTransformJobRef()
      A reference to a TransformJob resource.
      Specified by:
      getTransformJobRef in interface ITransformJobRef
    • getModelName

      @Stability(Stable) @NotNull public String getModelName()
      The name of the model that you want to use for the transform job.
    • setModelName

      @Stability(Stable) public void setModelName(@NotNull String value)
      The name of the model that you want to use for the transform job.
    • getTransformInput

      @Stability(Stable) @NotNull public Object getTransformInput()
      Describes the input source and the way the transform job consumes it.

      Returns union: either IResolvable or CfnTransformJob.TransformInputProperty

    • setTransformInput

      @Stability(Stable) public void setTransformInput(@NotNull IResolvable value)
      Describes the input source and the way the transform job consumes it.
    • setTransformInput

      @Stability(Stable) public void setTransformInput(@NotNull CfnTransformJob.TransformInputProperty value)
      Describes the input source and the way the transform job consumes it.
    • getTransformOutput

      @Stability(Stable) @NotNull public Object getTransformOutput()
      Describes the results of the transform job.

      Returns union: either IResolvable or CfnTransformJob.TransformOutputProperty

    • setTransformOutput

      @Stability(Stable) public void setTransformOutput(@NotNull IResolvable value)
      Describes the results of the transform job.
    • setTransformOutput

      @Stability(Stable) public void setTransformOutput(@NotNull CfnTransformJob.TransformOutputProperty value)
      Describes the results of the transform job.
    • getTransformResources

      @Stability(Stable) @NotNull public Object getTransformResources()
      Describes the resources, including ML instance types and ML instance count, to use for the transform job.

      Returns union: either IResolvable or CfnTransformJob.TransformResourcesProperty

    • setTransformResources

      @Stability(Stable) public void setTransformResources(@NotNull IResolvable value)
      Describes the resources, including ML instance types and ML instance count, to use for the transform job.
    • setTransformResources

      @Stability(Stable) public void setTransformResources(@NotNull CfnTransformJob.TransformResourcesProperty value)
      Describes the resources, including ML instance types and ML instance count, to use for the transform job.
    • getBatchStrategy

      @Stability(Stable) @Nullable public String getBatchStrategy()
      Specifies the number of records to include in a mini-batch for an HTTP inference request.
    • setBatchStrategy

      @Stability(Stable) public void setBatchStrategy(@Nullable String value)
      Specifies the number of records to include in a mini-batch for an HTTP inference request.
    • getDataCaptureConfig

      @Stability(Stable) @Nullable public Object getDataCaptureConfig()
      Configuration to control how SageMaker captures inference data.

      Returns union: either IResolvable or CfnTransformJob.DataCaptureConfigProperty

    • setDataCaptureConfig

      @Stability(Stable) public void setDataCaptureConfig(@Nullable IResolvable value)
      Configuration to control how SageMaker captures inference data.
    • setDataCaptureConfig

      @Stability(Stable) public void setDataCaptureConfig(@Nullable CfnTransformJob.DataCaptureConfigProperty value)
      Configuration to control how SageMaker captures inference data.
    • getDataProcessing

      @Stability(Stable) @Nullable public Object getDataProcessing()
      The data structure used to specify the data to be used for inference in a batch transform job.

      Returns union: either IResolvable or CfnTransformJob.DataProcessingProperty

    • setDataProcessing

      @Stability(Stable) public void setDataProcessing(@Nullable IResolvable value)
      The data structure used to specify the data to be used for inference in a batch transform job.
    • setDataProcessing

      @Stability(Stable) public void setDataProcessing(@Nullable CfnTransformJob.DataProcessingProperty value)
      The data structure used to specify the data to be used for inference in a batch transform job.
    • getEnvironment

      @Stability(Stable) @Nullable public Object getEnvironment()
      The environment variables to set in the Docker container.

      Returns union: either IResolvable or Mapinvalid input: '<'String, String>

    • setEnvironment

      @Stability(Stable) public void setEnvironment(@Nullable IResolvable value)
      The environment variables to set in the Docker container.
    • setEnvironment

      @Stability(Stable) public void setEnvironment(@Nullable Map<String,String> value)
      The environment variables to set in the Docker container.
    • getExperimentConfig

      @Stability(Stable) @Nullable public Object getExperimentConfig()
      Associates a SageMaker job as a trial component with an experiment and trial.

      Returns union: either IResolvable or CfnTransformJob.ExperimentConfigProperty

    • setExperimentConfig

      @Stability(Stable) public void setExperimentConfig(@Nullable IResolvable value)
      Associates a SageMaker job as a trial component with an experiment and trial.
    • setExperimentConfig

      @Stability(Stable) public void setExperimentConfig(@Nullable CfnTransformJob.ExperimentConfigProperty value)
      Associates a SageMaker job as a trial component with an experiment and trial.
    • getMaxConcurrentTransforms

      @Stability(Stable) @Nullable public Number getMaxConcurrentTransforms()
      The maximum number of parallel requests that can be sent to each instance in a transform job.
    • setMaxConcurrentTransforms

      @Stability(Stable) public void setMaxConcurrentTransforms(@Nullable Number value)
      The maximum number of parallel requests that can be sent to each instance in a transform job.
    • getMaxPayloadInMb

      @Stability(Stable) @Nullable public Number getMaxPayloadInMb()
      The maximum allowed size of the payload, in MB.
    • setMaxPayloadInMb

      @Stability(Stable) public void setMaxPayloadInMb(@Nullable Number value)
      The maximum allowed size of the payload, in MB.
    • getModelClientConfig

      @Stability(Stable) @Nullable public Object getModelClientConfig()
      Configures the timeout and maximum number of retries for processing a transform job invocation.

      Returns union: either IResolvable or CfnTransformJob.ModelClientConfigProperty

    • setModelClientConfig

      @Stability(Stable) public void setModelClientConfig(@Nullable IResolvable value)
      Configures the timeout and maximum number of retries for processing a transform job invocation.
    • setModelClientConfig

      @Stability(Stable) public void setModelClientConfig(@Nullable CfnTransformJob.ModelClientConfigProperty value)
      Configures the timeout and maximum number of retries for processing a transform job invocation.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTransformJob.TagsItemsProperty> getTags()
      An array of key-value pairs.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTransformJob.TagsItemsProperty> value)
      An array of key-value pairs.