Class CfnProcessingJob
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IProcessingJobRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
For more information, see Process Data and Evaluate Models .
Also, note the following details specific to processing jobs created using CloudFormation stacks:
- When you delete a CloudFormation stack with a processing job resource, the processing job is stopped using the StopProcessingJob API but not deleted. Any tags associated with the processing job are deleted using the DeleteTags API.
- If any part of your CloudFormation stack deployment fails and a rollback initiates, processing jobs with a specified
ProcessingJobNamevalue might cause the stack to become stuck in a failed state. This occurs because during a rollback, CloudFormation attempts to recreate the stack resources. Processing job names must be unique, so when CloudFormation attempts to recreate a processing job using the already defined name, this results in anAlreadyExistserror. To prevent this, we recommend that you don't specify the optionalProcessingJobNameproperty, thereby allowing SageMaker to auto-generate a unique name for your processing job. This ensures successful stack rollbacks when necessary. If you must use custom job names, you have to manually modify theProcessingJobNameand redeploy the stack to recover from a failed rollback.
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.*;
CfnProcessingJob cfnProcessingJob = CfnProcessingJob.Builder.create(this, "MyCfnProcessingJob")
.appSpecification(AppSpecificationProperty.builder()
.imageUri("imageUri")
// the properties below are optional
.containerArguments(List.of("containerArguments"))
.containerEntrypoint(List.of("containerEntrypoint"))
.build())
.processingResources(ProcessingResourcesProperty.builder()
.clusterConfig(ClusterConfigProperty.builder()
.instanceCount(123)
.instanceType("instanceType")
.volumeSizeInGb(123)
// the properties below are optional
.volumeKmsKeyId("volumeKmsKeyId")
.build())
.build())
.roleArn("roleArn")
// the properties below are optional
.environment(Map.of(
"environmentKey", "environment"))
.experimentConfig(ExperimentConfigProperty.builder()
.experimentName("experimentName")
.runName("runName")
.trialComponentDisplayName("trialComponentDisplayName")
.trialName("trialName")
.build())
.networkConfig(NetworkConfigProperty.builder()
.enableInterContainerTrafficEncryption(false)
.enableNetworkIsolation(false)
.vpcConfig(VpcConfigProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnets(List.of("subnets"))
.build())
.build())
.processingInputs(List.of(ProcessingInputsObjectProperty.builder()
.inputName("inputName")
// the properties below are optional
.appManaged(false)
.datasetDefinition(DatasetDefinitionProperty.builder()
.athenaDatasetDefinition(AthenaDatasetDefinitionProperty.builder()
.catalog("catalog")
.database("database")
.outputFormat("outputFormat")
.outputS3Uri("outputS3Uri")
.queryString("queryString")
// the properties below are optional
.kmsKeyId("kmsKeyId")
.outputCompression("outputCompression")
.workGroup("workGroup")
.build())
.dataDistributionType("dataDistributionType")
.inputMode("inputMode")
.localPath("localPath")
.redshiftDatasetDefinition(RedshiftDatasetDefinitionProperty.builder()
.clusterId("clusterId")
.clusterRoleArn("clusterRoleArn")
.database("database")
.dbUser("dbUser")
.outputFormat("outputFormat")
.outputS3Uri("outputS3Uri")
.queryString("queryString")
// the properties below are optional
.kmsKeyId("kmsKeyId")
.outputCompression("outputCompression")
.build())
.build())
.s3Input(S3InputProperty.builder()
.s3DataType("s3DataType")
.s3Uri("s3Uri")
// the properties below are optional
.localPath("localPath")
.s3CompressionType("s3CompressionType")
.s3DataDistributionType("s3DataDistributionType")
.s3InputMode("s3InputMode")
.build())
.build()))
.processingJobName("processingJobName")
.processingOutputConfig(ProcessingOutputConfigProperty.builder()
.outputs(List.of(ProcessingOutputsObjectProperty.builder()
.outputName("outputName")
// the properties below are optional
.appManaged(false)
.featureStoreOutput(FeatureStoreOutputProperty.builder()
.featureGroupName("featureGroupName")
.build())
.s3Output(S3OutputProperty.builder()
.s3UploadMode("s3UploadMode")
.s3Uri("s3Uri")
// the properties below are optional
.localPath("localPath")
.build())
.build()))
// the properties below are optional
.kmsKeyId("kmsKeyId")
.build())
.stoppingCondition(StoppingConditionProperty.builder()
.maxRuntimeInSeconds(123)
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConfiguration to run a processing job in a specified container image.static interfaceConfiguration for Athena Dataset Definition input.static final classA fluent builder forCfnProcessingJob.static interfaceConfiguration for the cluster used to run a processing job.static interfaceConfiguration for Dataset Definition inputs.static interfaceAssociates a SageMaker job as a trial component with an experiment and trial.static interfaceConfiguration for processing job outputs in Amazon SageMaker Feature Store.static interfaceNetworking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs.static interfaceThe inputs for a processing job.static interfaceConfiguration for uploading output from the processing container.static interfaceDescribes the results of a processing job.static interfaceIdentifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job.static interfaceConfiguration for Redshift Dataset Definition input.static interfaceConfiguration for downloading input data from Amazon S3 into the processing container.static interfaceConfiguration for uploading output data to Amazon S3 from the processing container.static interfaceConfigures conditions under which the processing job should be stopped, such as how long the processing job has been running.static interfaceSpecifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested 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.interfaces.sagemaker.IProcessingJobRef
IProcessingJobRef.Jsii$Default, IProcessingJobRef.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
ConstructorsModifierConstructorDescriptionprotectedCfnProcessingJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnProcessingJob(software.amazon.jsii.JsiiObjectRef objRef) CfnProcessingJob(software.constructs.Construct scope, String id, CfnProcessingJobProps props) Create a newAWS::SageMaker::ProcessingJob. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForProcessingJob(IProcessingJobRef resource) Configuration to run a processing job in a specified container image.The Amazon Resource Name (ARN) of the AutoML job associated with this processing job.The time the processing job was created.A string, up to one KB in size, that contains metadata from the processing container when the processing job exits.A string, up to one KB in size, that contains the reason a processing job failed, if it failed.The time the processing job was last modified.The ARN of a monitoring schedule for an endpoint associated with this processing job.The time that the processing job ended.The ARN of the processing job.The status of the processing job.The time that the processing job started.The ARN of the training job associated with this processing job.Tag Manager which manages the tags for this resource.Sets the environment variables in the Docker container.Associates a SageMaker job as a trial component with an experiment and trial.Networking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs.List of input configurations for the processing job.The name of the processing job.A reference to a ProcessingJob resource.Contains information about the output location for the compiled model and the target device that the model runs on.Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job.The ARN of the role used to create the processing job.Configures conditions under which the processing job should be stopped, such as how long the processing job has been running.getTags()An array of key-value pairs.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnProcessingJob.renderProperties(Map<String, Object> props) voidsetAppSpecification(IResolvable value) Configuration to run a processing job in a specified container image.voidConfiguration to run a processing job in a specified container image.voidsetEnvironment(Map<String, String> value) Sets the environment variables in the Docker container.voidsetEnvironment(IResolvable value) Sets the environment variables in the Docker container.voidsetExperimentConfig(IResolvable value) Associates a SageMaker job as a trial component with an experiment and trial.voidAssociates a SageMaker job as a trial component with an experiment and trial.voidsetNetworkConfig(IResolvable value) Networking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs.voidNetworking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs.voidsetProcessingInputs(List<Object> value) List of input configurations for the processing job.voidsetProcessingInputs(IResolvable value) List of input configurations for the processing job.voidsetProcessingJobName(String value) The name of the processing job.voidContains information about the output location for the compiled model and the target device that the model runs on.voidContains information about the output location for the compiled model and the target device that the model runs on.voidIdentifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job.voidIdentifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job.voidsetRoleArn(String value) The ARN of the role used to create the processing job.voidsetStoppingCondition(IResolvable value) Configures conditions under which the processing job should be stopped, such as how long the processing job has been running.voidConfigures conditions under which the processing job should be stopped, such as how long the processing job has been running.voidAn array of key-value pairs.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods 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
getNodeMethods 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
-
CfnProcessingJob
protected CfnProcessingJob(software.amazon.jsii.JsiiObjectRef objRef) -
CfnProcessingJob
protected CfnProcessingJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnProcessingJob
@Stability(Stable) public CfnProcessingJob(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnProcessingJobProps props) Create a newAWS::SageMaker::ProcessingJob.- 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
-
arnForProcessingJob
@Stability(Stable) @NotNull public static String arnForProcessingJob(@NotNull IProcessingJobRef resource) - Parameters:
resource- This parameter is required.
-
isCfnProcessingJob
Checks whether the given object is a CfnProcessingJob.- 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.
-
getAttrAutoMlJobArn
The Amazon Resource Name (ARN) of the AutoML job associated with this processing job. -
getAttrCreationTime
The time the processing job was created. -
getAttrExitMessage
A string, up to one KB in size, that contains metadata from the processing container when the processing job exits. -
getAttrFailureReason
A string, up to one KB in size, that contains the reason a processing job failed, if it failed. -
getAttrLastModifiedTime
The time the processing job was last modified. -
getAttrMonitoringScheduleArn
The ARN of a monitoring schedule for an endpoint associated with this processing job. -
getAttrProcessingEndTime
The time that the processing job ended. -
getAttrProcessingJobArn
The ARN of the processing job. -
getAttrProcessingJobStatus
The status of the processing job. -
getAttrProcessingStartTime
The time that the processing job started. -
getAttrTrainingJobArn
The ARN of the training job associated with this processing job. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getProcessingJobRef
A reference to a ProcessingJob resource.- Specified by:
getProcessingJobRefin interfaceIProcessingJobRef
-
getAppSpecification
Configuration to run a processing job in a specified container image.Returns union: either
IResolvableorCfnProcessingJob.AppSpecificationProperty -
setAppSpecification
Configuration to run a processing job in a specified container image. -
setAppSpecification
@Stability(Stable) public void setAppSpecification(@NotNull CfnProcessingJob.AppSpecificationProperty value) Configuration to run a processing job in a specified container image. -
getProcessingResources
Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job.Returns union: either
IResolvableorCfnProcessingJob.ProcessingResourcesProperty -
setProcessingResources
Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. -
setProcessingResources
@Stability(Stable) public void setProcessingResources(@NotNull CfnProcessingJob.ProcessingResourcesProperty value) Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. -
getRoleArn
The ARN of the role used to create the processing job. -
setRoleArn
The ARN of the role used to create the processing job. -
getEnvironment
Sets the environment variables in the Docker container.Returns union: either Mapinvalid input: '<'String,
String> orIResolvable -
setEnvironment
Sets the environment variables in the Docker container. -
setEnvironment
Sets the environment variables in the Docker container. -
getExperimentConfig
Associates a SageMaker job as a trial component with an experiment and trial.Returns union: either
IResolvableorCfnProcessingJob.ExperimentConfigProperty -
setExperimentConfig
Associates a SageMaker job as a trial component with an experiment and trial. -
setExperimentConfig
@Stability(Stable) public void setExperimentConfig(@Nullable CfnProcessingJob.ExperimentConfigProperty value) Associates a SageMaker job as a trial component with an experiment and trial. -
getNetworkConfig
Networking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs.Returns union: either
IResolvableorCfnProcessingJob.NetworkConfigProperty -
setNetworkConfig
Networking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs. -
setNetworkConfig
@Stability(Stable) public void setNetworkConfig(@Nullable CfnProcessingJob.NetworkConfigProperty value) Networking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs. -
getProcessingInputs
List of input configurations for the processing job.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnProcessingJob.ProcessingInputsObjectProperty> -
setProcessingInputs
List of input configurations for the processing job. -
setProcessingInputs
List of input configurations for the processing job. -
getProcessingJobName
The name of the processing job. -
setProcessingJobName
The name of the processing job. -
getProcessingOutputConfig
Contains information about the output location for the compiled model and the target device that the model runs on.Returns union: either
IResolvableorCfnProcessingJob.ProcessingOutputConfigProperty -
setProcessingOutputConfig
Contains information about the output location for the compiled model and the target device that the model runs on. -
setProcessingOutputConfig
@Stability(Stable) public void setProcessingOutputConfig(@Nullable CfnProcessingJob.ProcessingOutputConfigProperty value) Contains information about the output location for the compiled model and the target device that the model runs on. -
getStoppingCondition
Configures conditions under which the processing job should be stopped, such as how long the processing job has been running.Returns union: either
IResolvableorCfnProcessingJob.StoppingConditionProperty -
setStoppingCondition
Configures conditions under which the processing job should be stopped, such as how long the processing job has been running. -
setStoppingCondition
@Stability(Stable) public void setStoppingCondition(@Nullable CfnProcessingJob.StoppingConditionProperty value) Configures conditions under which the processing job should be stopped, such as how long the processing job has been running. -
getTags
An array of key-value pairs. -
setTags
An array of key-value pairs.
-