createProcessingJob method
- required AppSpecification appSpecification,
- required String processingJobName,
- required ProcessingResources processingResources,
- required String roleArn,
- Map<
String, String> ? environment, - ExperimentConfig? experimentConfig,
- NetworkConfig? networkConfig,
- List<
ProcessingInput> ? processingInputs, - ProcessingOutputConfig? processingOutputConfig,
- ProcessingStoppingCondition? stoppingCondition,
- List<
Tag> ? tags,
Creates a processing job.
May throw ResourceInUse.
May throw ResourceLimitExceeded.
May throw ResourceNotFound.
Parameter appSpecification :
Configures the processing job to run a specified Docker container image.
Parameter processingJobName :
The name of the processing job. The name must be unique within an Amazon
Web Services Region in the Amazon Web Services account.
Parameter processingResources :
Identifies the resources, ML compute instances, and ML storage volumes to
deploy for a processing job. In distributed training, you specify more
than one instance.
Parameter roleArn :
The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can
assume to perform tasks on your behalf.
Parameter environment :
The environment variables to set in the Docker container. Up to 100 key
and values entries in the map are supported.
Parameter networkConfig :
Networking options for a processing job, such as whether to allow inbound
and outbound network calls to and from processing containers, and the VPC
subnets and security groups to use for VPC-enabled processing jobs.
Parameter processingInputs :
An array of inputs configuring the data to download into the processing
container.
Parameter processingOutputConfig :
Output configuration for the processing job.
Parameter stoppingCondition :
The time limit for how long the processing job is allowed to run.
Parameter tags :
(Optional) An array of key-value pairs. For more information, see Using
Cost Allocation Tags in the Amazon Web Services Billing and Cost
Management User Guide.
Implementation
Future<CreateProcessingJobResponse> createProcessingJob({
required AppSpecification appSpecification,
required String processingJobName,
required ProcessingResources processingResources,
required String roleArn,
Map<String, String>? environment,
ExperimentConfig? experimentConfig,
NetworkConfig? networkConfig,
List<ProcessingInput>? processingInputs,
ProcessingOutputConfig? processingOutputConfig,
ProcessingStoppingCondition? stoppingCondition,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreateProcessingJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AppSpecification': appSpecification,
'ProcessingJobName': processingJobName,
'ProcessingResources': processingResources,
'RoleArn': roleArn,
if (environment != null) 'Environment': environment,
if (experimentConfig != null) 'ExperimentConfig': experimentConfig,
if (networkConfig != null) 'NetworkConfig': networkConfig,
if (processingInputs != null) 'ProcessingInputs': processingInputs,
if (processingOutputConfig != null)
'ProcessingOutputConfig': processingOutputConfig,
if (stoppingCondition != null) 'StoppingCondition': stoppingCondition,
if (tags != null) 'Tags': tags,
},
);
return CreateProcessingJobResponse.fromJson(jsonResponse.body);
}