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
Parameters:
-
job_category
(Optional[JobCategory], default:
None
)
–
The category of the job schema to describe.
-
job_config_schema_version
(Optional[JobSchemaVersion], default:
None
)
–
The version of the schema to retrieve. If not specified, the latest version is returned.
Raises:
Source code in docs_src/capo_sagemaker/_services/sage_maker.py
| def describe_job_schema_version(
self,
*,
config_overrides: Optional[SageMakerClientConfig] = None,
job_category: Optional["capo_sagemaker.types.job_category.JobCategory"] = None,
job_config_schema_version: Optional[
"capo_sagemaker.types.job_schema_version.JobSchemaVersion"
] = None,
) -> "capo_sagemaker.types.describe_job_schema_version_response.DescribeJobSchemaVersionResponse":
"""<p>Returns the JSON schema for a specified job category and schema version. Use this schema to validate your <code>JobConfigDocument</code> before calling <code>CreateJob</code>. 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.</p> <p>The following operations are related to <code>DescribeJobSchemaVersion</code>:</p> <ul> <li> <p> <code>ListJobSchemaVersions</code> </p> </li> <li> <p> <code>CreateJob</code> </p> </li> </ul>
Args:
job_category: <p>The category of the job schema to describe.</p>
job_config_schema_version: <p>The version of the schema to retrieve. If not specified, the latest version is returned.</p>
Raises:
capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_sagemaker.types.describe_job_schema_version_request.DescribeJobSchemaVersionRequest]",
) -> OperationResponse[
"capo_sagemaker.types.describe_job_schema_version_response.DescribeJobSchemaVersionResponse"
]:
import capo_sagemaker._operations.sage_maker.describe_job_schema_version
output, http_response = (
capo_sagemaker._operations.sage_maker.describe_job_schema_version.describe_job_schema_version(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeJobSchemaVersion")
)
input_: capo_sagemaker.types.describe_job_schema_version_request.DescribeJobSchemaVersionRequest = {}
if job_category is not None:
input_["job_category"] = job_category
if job_config_schema_version is not None:
input_["job_config_schema_version"] = job_config_schema_version
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|