datarobot.CustomJob
Explore with Pulumi AI
Custom Job
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datarobot from "@datarobot/pulumi-datarobot";
const example = new datarobot.CustomJob("example", {
jobType: "retraining",
files: [
"file1.py",
"file2.py",
],
environmentId: "65f9b27eab986d30d4c64268",
description: "Example Custom Job Description",
runtimeParameterValues: [{
key: "EXAMPLE_PARAM",
type: "string",
value: "val",
}],
egressNetworkPolicy: "none",
resourceBundleId: "cpu.micro",
});
export const exampleId = example.id;
import pulumi
import pulumi_datarobot as datarobot
example = datarobot.CustomJob("example",
job_type="retraining",
files=[
"file1.py",
"file2.py",
],
environment_id="65f9b27eab986d30d4c64268",
description="Example Custom Job Description",
runtime_parameter_values=[{
"key": "EXAMPLE_PARAM",
"type": "string",
"value": "val",
}],
egress_network_policy="none",
resource_bundle_id="cpu.micro")
pulumi.export("exampleId", example.id)
package main
import (
"github.com/datarobot-community/pulumi-datarobot/sdk/go/datarobot"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := datarobot.NewCustomJob(ctx, "example", &datarobot.CustomJobArgs{
JobType: pulumi.String("retraining"),
Files: pulumi.Any{
"file1.py",
"file2.py",
},
EnvironmentId: pulumi.String("65f9b27eab986d30d4c64268"),
Description: pulumi.String("Example Custom Job Description"),
RuntimeParameterValues: datarobot.CustomJobRuntimeParameterValueArray{
&datarobot.CustomJobRuntimeParameterValueArgs{
Key: pulumi.String("EXAMPLE_PARAM"),
Type: pulumi.String("string"),
Value: pulumi.String("val"),
},
},
EgressNetworkPolicy: pulumi.String("none"),
ResourceBundleId: pulumi.String("cpu.micro"),
})
if err != nil {
return err
}
ctx.Export("exampleId", example.ID())
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datarobot = DataRobotPulumi.Datarobot;
return await Deployment.RunAsync(() =>
{
var example = new Datarobot.CustomJob("example", new()
{
JobType = "retraining",
Files = new[]
{
"file1.py",
"file2.py",
},
EnvironmentId = "65f9b27eab986d30d4c64268",
Description = "Example Custom Job Description",
RuntimeParameterValues = new[]
{
new Datarobot.Inputs.CustomJobRuntimeParameterValueArgs
{
Key = "EXAMPLE_PARAM",
Type = "string",
Value = "val",
},
},
EgressNetworkPolicy = "none",
ResourceBundleId = "cpu.micro",
});
return new Dictionary<string, object?>
{
["exampleId"] = example.Id,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datarobot.CustomJob;
import com.pulumi.datarobot.CustomJobArgs;
import com.pulumi.datarobot.inputs.CustomJobRuntimeParameterValueArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new CustomJob("example", CustomJobArgs.builder()
.jobType("retraining")
.files(
"file1.py",
"file2.py")
.environmentId("65f9b27eab986d30d4c64268")
.description("Example Custom Job Description")
.runtimeParameterValues(CustomJobRuntimeParameterValueArgs.builder()
.key("EXAMPLE_PARAM")
.type("string")
.value("val")
.build())
.egressNetworkPolicy("none")
.resourceBundleId("cpu.micro")
.build());
ctx.export("exampleId", example.id());
}
}
resources:
example:
type: datarobot:CustomJob
properties:
jobType: retraining
files:
- file1.py
- file2.py
environmentId: 65f9b27eab986d30d4c64268
# Optional
description: Example Custom Job Description
runtimeParameterValues:
- key: EXAMPLE_PARAM
type: string
value: val
egressNetworkPolicy: none
resourceBundleId: cpu.micro
outputs:
exampleId: ${example.id}
Create CustomJob Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomJob(name: string, args?: CustomJobArgs, opts?: CustomResourceOptions);
@overload
def CustomJob(resource_name: str,
args: Optional[CustomJobArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def CustomJob(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
egress_network_policy: Optional[str] = None,
environment_id: Optional[str] = None,
environment_version_id: Optional[str] = None,
files: Optional[Any] = None,
folder_path: Optional[str] = None,
job_type: Optional[str] = None,
name: Optional[str] = None,
resource_bundle_id: Optional[str] = None,
runtime_parameter_values: Optional[Sequence[CustomJobRuntimeParameterValueArgs]] = None)
func NewCustomJob(ctx *Context, name string, args *CustomJobArgs, opts ...ResourceOption) (*CustomJob, error)
public CustomJob(string name, CustomJobArgs? args = null, CustomResourceOptions? opts = null)
public CustomJob(String name, CustomJobArgs args)
public CustomJob(String name, CustomJobArgs args, CustomResourceOptions options)
type: datarobot:CustomJob
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CustomJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CustomJobArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CustomJobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomJobArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var customJobResource = new Datarobot.CustomJob("customJobResource", new()
{
Description = "string",
EgressNetworkPolicy = "string",
EnvironmentId = "string",
EnvironmentVersionId = "string",
Files = "any",
FolderPath = "string",
JobType = "string",
Name = "string",
ResourceBundleId = "string",
RuntimeParameterValues = new[]
{
new Datarobot.Inputs.CustomJobRuntimeParameterValueArgs
{
Key = "string",
Type = "string",
Value = "string",
},
},
});
example, err := datarobot.NewCustomJob(ctx, "customJobResource", &datarobot.CustomJobArgs{
Description: pulumi.String("string"),
EgressNetworkPolicy: pulumi.String("string"),
EnvironmentId: pulumi.String("string"),
EnvironmentVersionId: pulumi.String("string"),
Files: pulumi.Any("any"),
FolderPath: pulumi.String("string"),
JobType: pulumi.String("string"),
Name: pulumi.String("string"),
ResourceBundleId: pulumi.String("string"),
RuntimeParameterValues: datarobot.CustomJobRuntimeParameterValueArray{
&datarobot.CustomJobRuntimeParameterValueArgs{
Key: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var customJobResource = new CustomJob("customJobResource", CustomJobArgs.builder()
.description("string")
.egressNetworkPolicy("string")
.environmentId("string")
.environmentVersionId("string")
.files("any")
.folderPath("string")
.jobType("string")
.name("string")
.resourceBundleId("string")
.runtimeParameterValues(CustomJobRuntimeParameterValueArgs.builder()
.key("string")
.type("string")
.value("string")
.build())
.build());
custom_job_resource = datarobot.CustomJob("customJobResource",
description="string",
egress_network_policy="string",
environment_id="string",
environment_version_id="string",
files="any",
folder_path="string",
job_type="string",
name="string",
resource_bundle_id="string",
runtime_parameter_values=[{
"key": "string",
"type": "string",
"value": "string",
}])
const customJobResource = new datarobot.CustomJob("customJobResource", {
description: "string",
egressNetworkPolicy: "string",
environmentId: "string",
environmentVersionId: "string",
files: "any",
folderPath: "string",
jobType: "string",
name: "string",
resourceBundleId: "string",
runtimeParameterValues: [{
key: "string",
type: "string",
value: "string",
}],
});
type: datarobot:CustomJob
properties:
description: string
egressNetworkPolicy: string
environmentId: string
environmentVersionId: string
files: any
folderPath: string
jobType: string
name: string
resourceBundleId: string
runtimeParameterValues:
- key: string
type: string
value: string
CustomJob Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CustomJob resource accepts the following input properties:
- Description string
- The description of the Custom Job.
- Egress
Network stringPolicy - The egress network policy for the Job.
- Environment
Id string - The ID of the environment to use with the Job.
- Environment
Version stringId - The ID of the environment version to use with the Job.
- Files object
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- Folder
Path string - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- Job
Type string - The type of the Custom Job.
- Name string
- The name of the Custom Job.
- Resource
Bundle stringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- Runtime
Parameter List<DataValues Robot Custom Job Runtime Parameter Value> - Additional parameters to be injected into a Job at runtime.
- Description string
- The description of the Custom Job.
- Egress
Network stringPolicy - The egress network policy for the Job.
- Environment
Id string - The ID of the environment to use with the Job.
- Environment
Version stringId - The ID of the environment version to use with the Job.
- Files interface{}
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- Folder
Path string - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- Job
Type string - The type of the Custom Job.
- Name string
- The name of the Custom Job.
- Resource
Bundle stringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- Runtime
Parameter []CustomValues Job Runtime Parameter Value Args - Additional parameters to be injected into a Job at runtime.
- description String
- The description of the Custom Job.
- egress
Network StringPolicy - The egress network policy for the Job.
- environment
Id String - The ID of the environment to use with the Job.
- environment
Version StringId - The ID of the environment version to use with the Job.
- files Object
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- folder
Path String - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- job
Type String - The type of the Custom Job.
- name String
- The name of the Custom Job.
- resource
Bundle StringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- runtime
Parameter List<CustomValues Job Runtime Parameter Value> - Additional parameters to be injected into a Job at runtime.
- description string
- The description of the Custom Job.
- egress
Network stringPolicy - The egress network policy for the Job.
- environment
Id string - The ID of the environment to use with the Job.
- environment
Version stringId - The ID of the environment version to use with the Job.
- files any
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- folder
Path string - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- job
Type string - The type of the Custom Job.
- name string
- The name of the Custom Job.
- resource
Bundle stringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- runtime
Parameter CustomValues Job Runtime Parameter Value[] - Additional parameters to be injected into a Job at runtime.
- description str
- The description of the Custom Job.
- egress_
network_ strpolicy - The egress network policy for the Job.
- environment_
id str - The ID of the environment to use with the Job.
- environment_
version_ strid - The ID of the environment version to use with the Job.
- files Any
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- folder_
path str - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- job_
type str - The type of the Custom Job.
- name str
- The name of the Custom Job.
- resource_
bundle_ strid - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- runtime_
parameter_ Sequence[Customvalues Job Runtime Parameter Value Args] - Additional parameters to be injected into a Job at runtime.
- description String
- The description of the Custom Job.
- egress
Network StringPolicy - The egress network policy for the Job.
- environment
Id String - The ID of the environment to use with the Job.
- environment
Version StringId - The ID of the environment version to use with the Job.
- files Any
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- folder
Path String - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- job
Type String - The type of the Custom Job.
- name String
- The name of the Custom Job.
- resource
Bundle StringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- runtime
Parameter List<Property Map>Values - Additional parameters to be injected into a Job at runtime.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomJob resource produces the following output properties:
- Files
Hashes List<string> - The hash of file contents for each file in files.
- Folder
Path stringHash - The hash of the folder path contents.
- Id string
- The provider-assigned unique ID for this managed resource.
- Files
Hashes []string - The hash of file contents for each file in files.
- Folder
Path stringHash - The hash of the folder path contents.
- Id string
- The provider-assigned unique ID for this managed resource.
- files
Hashes List<String> - The hash of file contents for each file in files.
- folder
Path StringHash - The hash of the folder path contents.
- id String
- The provider-assigned unique ID for this managed resource.
- files
Hashes string[] - The hash of file contents for each file in files.
- folder
Path stringHash - The hash of the folder path contents.
- id string
- The provider-assigned unique ID for this managed resource.
- files_
hashes Sequence[str] - The hash of file contents for each file in files.
- folder_
path_ strhash - The hash of the folder path contents.
- id str
- The provider-assigned unique ID for this managed resource.
- files
Hashes List<String> - The hash of file contents for each file in files.
- folder
Path StringHash - The hash of the folder path contents.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CustomJob Resource
Get an existing CustomJob resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CustomJobState, opts?: CustomResourceOptions): CustomJob
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
egress_network_policy: Optional[str] = None,
environment_id: Optional[str] = None,
environment_version_id: Optional[str] = None,
files: Optional[Any] = None,
files_hashes: Optional[Sequence[str]] = None,
folder_path: Optional[str] = None,
folder_path_hash: Optional[str] = None,
job_type: Optional[str] = None,
name: Optional[str] = None,
resource_bundle_id: Optional[str] = None,
runtime_parameter_values: Optional[Sequence[CustomJobRuntimeParameterValueArgs]] = None) -> CustomJob
func GetCustomJob(ctx *Context, name string, id IDInput, state *CustomJobState, opts ...ResourceOption) (*CustomJob, error)
public static CustomJob Get(string name, Input<string> id, CustomJobState? state, CustomResourceOptions? opts = null)
public static CustomJob get(String name, Output<String> id, CustomJobState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- The description of the Custom Job.
- Egress
Network stringPolicy - The egress network policy for the Job.
- Environment
Id string - The ID of the environment to use with the Job.
- Environment
Version stringId - The ID of the environment version to use with the Job.
- Files object
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- Files
Hashes List<string> - The hash of file contents for each file in files.
- Folder
Path string - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- Folder
Path stringHash - The hash of the folder path contents.
- Job
Type string - The type of the Custom Job.
- Name string
- The name of the Custom Job.
- Resource
Bundle stringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- Runtime
Parameter List<DataValues Robot Custom Job Runtime Parameter Value> - Additional parameters to be injected into a Job at runtime.
- Description string
- The description of the Custom Job.
- Egress
Network stringPolicy - The egress network policy for the Job.
- Environment
Id string - The ID of the environment to use with the Job.
- Environment
Version stringId - The ID of the environment version to use with the Job.
- Files interface{}
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- Files
Hashes []string - The hash of file contents for each file in files.
- Folder
Path string - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- Folder
Path stringHash - The hash of the folder path contents.
- Job
Type string - The type of the Custom Job.
- Name string
- The name of the Custom Job.
- Resource
Bundle stringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- Runtime
Parameter []CustomValues Job Runtime Parameter Value Args - Additional parameters to be injected into a Job at runtime.
- description String
- The description of the Custom Job.
- egress
Network StringPolicy - The egress network policy for the Job.
- environment
Id String - The ID of the environment to use with the Job.
- environment
Version StringId - The ID of the environment version to use with the Job.
- files Object
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- files
Hashes List<String> - The hash of file contents for each file in files.
- folder
Path String - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- folder
Path StringHash - The hash of the folder path contents.
- job
Type String - The type of the Custom Job.
- name String
- The name of the Custom Job.
- resource
Bundle StringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- runtime
Parameter List<CustomValues Job Runtime Parameter Value> - Additional parameters to be injected into a Job at runtime.
- description string
- The description of the Custom Job.
- egress
Network stringPolicy - The egress network policy for the Job.
- environment
Id string - The ID of the environment to use with the Job.
- environment
Version stringId - The ID of the environment version to use with the Job.
- files any
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- files
Hashes string[] - The hash of file contents for each file in files.
- folder
Path string - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- folder
Path stringHash - The hash of the folder path contents.
- job
Type string - The type of the Custom Job.
- name string
- The name of the Custom Job.
- resource
Bundle stringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- runtime
Parameter CustomValues Job Runtime Parameter Value[] - Additional parameters to be injected into a Job at runtime.
- description str
- The description of the Custom Job.
- egress_
network_ strpolicy - The egress network policy for the Job.
- environment_
id str - The ID of the environment to use with the Job.
- environment_
version_ strid - The ID of the environment version to use with the Job.
- files Any
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- files_
hashes Sequence[str] - The hash of file contents for each file in files.
- folder_
path str - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- folder_
path_ strhash - The hash of the folder path contents.
- job_
type str - The type of the Custom Job.
- name str
- The name of the Custom Job.
- resource_
bundle_ strid - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- runtime_
parameter_ Sequence[Customvalues Job Runtime Parameter Value Args] - Additional parameters to be injected into a Job at runtime.
- description String
- The description of the Custom Job.
- egress
Network StringPolicy - The egress network policy for the Job.
- environment
Id String - The ID of the environment to use with the Job.
- environment
Version StringId - The ID of the environment version to use with the Job.
- files Any
- The list of tuples, where values in each tuple are the local filesystem path and the path the file should be placed in the Job. If list is of strings, then basenames will be used for tuples.
- files
Hashes List<String> - The hash of file contents for each file in files.
- folder
Path String - The path to a folder containing files to be uploaded. Each file in the folder is uploaded under path relative to a folder path.
- folder
Path StringHash - The hash of the folder path contents.
- job
Type String - The type of the Custom Job.
- name String
- The name of the Custom Job.
- resource
Bundle StringId - A single identifier that represents a bundle of resources: Memory, CPU, GPU, etc.
- runtime
Parameter List<Property Map>Values - Additional parameters to be injected into a Job at runtime.
Supporting Types
CustomJobRuntimeParameterValue, CustomJobRuntimeParameterValueArgs
Package Details
- Repository
- datarobot datarobot-community/pulumi-datarobot
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datarobot
Terraform Provider.