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 AWS
Region in the AWS 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
:
Sets the environment variables in the Docker container.
Parameter networkConfig
:
Networking options for a processing job.
Parameter processingInputs
:
List of input configurations for the processing job.
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 AWS 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 {
ArgumentError.checkNotNull(appSpecification, 'appSpecification');
ArgumentError.checkNotNull(processingJobName, 'processingJobName');
_s.validateStringLength(
'processingJobName',
processingJobName,
1,
63,
isRequired: true,
);
ArgumentError.checkNotNull(processingResources, 'processingResources');
ArgumentError.checkNotNull(roleArn, 'roleArn');
_s.validateStringLength(
'roleArn',
roleArn,
20,
2048,
isRequired: true,
);
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);
}