DataSphere Jobs API v2, gRPC: ProjectJobService.Clone
Clone job.
gRPC request
rpc Clone (CloneProjectJobRequest) returns (operation.Operation)
CloneProjectJobRequest
{
"sourceJobId": "string",
"jobParametersOverrides": {
"inputFiles": [
{
"desc": {
"path": "string",
"var": "string"
},
"sha256": "string",
"sizeBytes": "int64",
"compressionType": "FileCompressionType"
}
],
"outputFiles": [
{
"path": "string",
"var": "string"
}
],
"s3MountIds": [
"string"
],
"datasetIds": [
"string"
],
"cmd": "string",
"env": {
"vars": "string",
// Includes only one of the fields `dockerImageResourceId`, `dockerImageSpec`
"dockerImageResourceId": "string",
"dockerImageSpec": {
"imageUrl": "string",
"username": "string",
// Includes only one of the fields `passwordPlainText`, `passwordDsSecretName`
"passwordPlainText": "string",
"passwordDsSecretName": "string"
// end of the list of possible fields
},
// end of the list of possible fields
"pythonEnv": {
"condaYaml": "string",
"localModules": [
{
"desc": {
"path": "string",
"var": "string"
},
"sha256": "string",
"sizeBytes": "int64",
"compressionType": "FileCompressionType"
}
],
"pythonVersion": "string",
"requirements": [
"string"
],
"pipOptions": {
"indexUrl": "string",
"extraIndexUrls": [
"string"
],
"trustedHosts": [
"string"
],
"noDeps": "bool"
}
}
},
"attachProjectDisk": "bool",
"cloudInstanceTypes": [
{
"name": "string"
}
],
"extendedWorkingStorage": {
"type": "StorageType",
"sizeGb": "int64"
},
"arguments": [
{
"name": "string",
"value": "string"
}
],
"outputDatasets": [
{
"name": "string",
"description": "string",
"labels": "string",
"sizeGb": "int64",
"var": "string"
}
],
"gracefulShutdownParameters": {
"timeout": "google.protobuf.Duration",
"signal": "int64"
}
},
"name": "string",
"desc": "string",
"dataTtl": "google.protobuf.Duration"
}
Field |
Description |
sourceJobId |
string ID of job to be cloned. |
jobParametersOverrides |
Parameters overrides. |
name |
string New job name. |
desc |
string New job description |
dataTtl |
Data ttl. |
JobParameters
Job parameters.
Field |
Description |
inputFiles[] |
List of input files. |
outputFiles[] |
List of output files descriptions. |
s3MountIds[] |
string List of DataSphere S3 mount ids. |
datasetIds[] |
string List of DataSphere dataset ids. |
cmd |
string Job run command. |
env |
Job environment description. |
attachProjectDisk |
bool Should project disk be attached to VM. |
cloudInstanceTypes[] |
VM specification. |
extendedWorkingStorage |
Extended working storage configuration. |
arguments[] |
List of literal arguments. |
outputDatasets[] |
List of DataSets descriptions to create. |
gracefulShutdownParameters |
Graceful shutdown settings. |
File
Field |
Description |
desc |
|
sha256 |
string SHA256 of the file. |
sizeBytes |
int64 File size in bytes. |
compressionType |
enum FileCompressionType File compression info
|
FileDesc
Field |
Description |
path |
string Path of the file on filesystem. |
var |
string Variable to use in cmd substitution. |
Environment
Field |
Description |
vars |
string Environment variables. |
dockerImageResourceId |
string DS docker image id. Includes only one of the fields |
dockerImageSpec |
Includes only one of the fields |
pythonEnv |
DockerImageSpec
Field |
Description |
imageUrl |
string Docker image URL. |
username |
string Username for container registry. |
passwordPlainText |
string Plaintext password. Includes only one of the fields Password for container registry. |
passwordDsSecretName |
string ID of DataSphere secret containing password. Includes only one of the fields Password for container registry. |
PythonEnv
Field |
Description |
condaYaml |
string Conda YAML. |
localModules[] |
List of local modules descriptions. |
pythonVersion |
string Python version reduced to major.minor |
requirements[] |
string List of pip requirements |
pipOptions |
Pip install options |
PipOptions
Field |
Description |
indexUrl |
string --index-url option |
extraIndexUrls[] |
string --extra-index-urls option |
trustedHosts[] |
string --trusted-hosts option |
noDeps |
bool --no-deps option |
CloudInstanceType
Field |
Description |
name |
string Name of DataSphere VM configuration. |
ExtendedWorkingStorage
Extended working storage configuration.
Field |
Description |
type |
enum StorageType
|
sizeGb |
int64 |
Argument
Field |
Description |
name |
string |
value |
string |
OutputDatasetDesc
Field |
Description |
name |
string Name to create dataset with |
description |
string Description to show in UI |
labels |
string |
sizeGb |
int64 Size of dataset to create |
var |
string Var name to replace in cmd, like in FileDesc |
GracefulShutdownParameters
Field |
Description |
timeout |
|
signal |
int64 default 15 (SIGTERM) |
operation.Operation
{
"id": "string",
"description": "string",
"createdAt": "google.protobuf.Timestamp",
"createdBy": "string",
"modifiedAt": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"projectId": "string",
"jobId": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"jobId": "string",
"uploadFiles": [
{
"file": {
"desc": {
"path": "string",
"var": "string"
},
"sha256": "string",
"sizeBytes": "int64",
"compressionType": "FileCompressionType"
},
"url": "string"
}
]
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
Creation timestamp. |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CloneProjectJobMetadata
Field |
Description |
projectId |
string |
jobId |
string |
CloneProjectJobResponse
Field |
Description |
jobId |
string Job ID. |
uploadFiles[] |
Files with presigned URLs generated by server to upload them to storage. Order is arbitrary. Upload files include input files, executable file (python main script or binary executable) and local modules If file was already uploaded, there will be no element for it. |
StorageFile
Field |
Description |
file |
|
url |
string File URL. |
File
Field |
Description |
desc |
|
sha256 |
string SHA256 of the file. |
sizeBytes |
int64 File size in bytes. |
compressionType |
enum FileCompressionType File compression info
|
FileDesc
Field |
Description |
path |
string Path of the file on filesystem. |
var |
string Variable to use in cmd substitution. |