describeJobSchemaVersion method
Future<DescribeJobSchemaVersionResponse>
describeJobSchemaVersion({
- required JobCategory jobCategory,
- String? jobConfigSchemaVersion,
Returns the JSON schema for a specified job category and schema version.
Use this schema to validate your JobConfigDocument before
calling CreateJob. If you don't specify a schema version, the
latest version is returned. The schema defines required fields, allowed
values, and constraints for the job configuration.
The following operations are related to
DescribeJobSchemaVersion:
-
ListJobSchemaVersions -
CreateJob
May throw ResourceNotFound.
Parameter jobCategory :
The category of the job schema to describe.
Parameter jobConfigSchemaVersion :
The version of the schema to retrieve. If not specified, the latest
version is returned.
Implementation
Future<DescribeJobSchemaVersionResponse> describeJobSchemaVersion({
required JobCategory jobCategory,
String? jobConfigSchemaVersion,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.DescribeJobSchemaVersion'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'JobCategory': jobCategory.value,
if (jobConfigSchemaVersion != null)
'JobConfigSchemaVersion': jobConfigSchemaVersion,
},
);
return DescribeJobSchemaVersionResponse.fromJson(jsonResponse.body);
}