1. Packages
  2. Grafana Cloud
  3. API Docs
  4. MachineLearningJob
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

grafana.MachineLearningJob

Explore with Pulumi AI

grafana logo
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

    A job defines the queries and model parameters for a machine learning task.

    Create MachineLearningJob Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MachineLearningJob(name: string, args: MachineLearningJobArgs, opts?: CustomResourceOptions);
    @overload
    def MachineLearningJob(resource_name: str,
                           args: MachineLearningJobArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def MachineLearningJob(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           datasource_type: Optional[str] = None,
                           metric: Optional[str] = None,
                           query_params: Optional[Mapping[str, Any]] = None,
                           custom_labels: Optional[Mapping[str, Any]] = None,
                           datasource_id: Optional[int] = None,
                           datasource_uid: Optional[str] = None,
                           description: Optional[str] = None,
                           holidays: Optional[Sequence[str]] = None,
                           hyper_params: Optional[Mapping[str, Any]] = None,
                           interval: Optional[int] = None,
                           name: Optional[str] = None,
                           training_window: Optional[int] = None)
    func NewMachineLearningJob(ctx *Context, name string, args MachineLearningJobArgs, opts ...ResourceOption) (*MachineLearningJob, error)
    public MachineLearningJob(string name, MachineLearningJobArgs args, CustomResourceOptions? opts = null)
    public MachineLearningJob(String name, MachineLearningJobArgs args)
    public MachineLearningJob(String name, MachineLearningJobArgs args, CustomResourceOptions options)
    
    type: grafana:MachineLearningJob
    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 MachineLearningJobArgs
    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 MachineLearningJobArgs
    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 MachineLearningJobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MachineLearningJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MachineLearningJobArgs
    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 machineLearningJobResource = new Grafana.MachineLearningJob("machineLearningJobResource", new()
    {
        DatasourceType = "string",
        Metric = "string",
        QueryParams = 
        {
            { "string", "any" },
        },
        CustomLabels = 
        {
            { "string", "any" },
        },
        DatasourceUid = "string",
        Description = "string",
        Holidays = new[]
        {
            "string",
        },
        HyperParams = 
        {
            { "string", "any" },
        },
        Interval = 0,
        Name = "string",
        TrainingWindow = 0,
    });
    
    example, err := grafana.NewMachineLearningJob(ctx, "machineLearningJobResource", &grafana.MachineLearningJobArgs{
    	DatasourceType: pulumi.String("string"),
    	Metric:         pulumi.String("string"),
    	QueryParams: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	CustomLabels: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	DatasourceUid: pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	Holidays: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	HyperParams: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Interval:       pulumi.Int(0),
    	Name:           pulumi.String("string"),
    	TrainingWindow: pulumi.Int(0),
    })
    
    var machineLearningJobResource = new MachineLearningJob("machineLearningJobResource", MachineLearningJobArgs.builder()
        .datasourceType("string")
        .metric("string")
        .queryParams(Map.of("string", "any"))
        .customLabels(Map.of("string", "any"))
        .datasourceUid("string")
        .description("string")
        .holidays("string")
        .hyperParams(Map.of("string", "any"))
        .interval(0)
        .name("string")
        .trainingWindow(0)
        .build());
    
    machine_learning_job_resource = grafana.MachineLearningJob("machineLearningJobResource",
        datasource_type="string",
        metric="string",
        query_params={
            "string": "any",
        },
        custom_labels={
            "string": "any",
        },
        datasource_uid="string",
        description="string",
        holidays=["string"],
        hyper_params={
            "string": "any",
        },
        interval=0,
        name="string",
        training_window=0)
    
    const machineLearningJobResource = new grafana.MachineLearningJob("machineLearningJobResource", {
        datasourceType: "string",
        metric: "string",
        queryParams: {
            string: "any",
        },
        customLabels: {
            string: "any",
        },
        datasourceUid: "string",
        description: "string",
        holidays: ["string"],
        hyperParams: {
            string: "any",
        },
        interval: 0,
        name: "string",
        trainingWindow: 0,
    });
    
    type: grafana:MachineLearningJob
    properties:
        customLabels:
            string: any
        datasourceType: string
        datasourceUid: string
        description: string
        holidays:
            - string
        hyperParams:
            string: any
        interval: 0
        metric: string
        name: string
        queryParams:
            string: any
        trainingWindow: 0
    

    MachineLearningJob Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The MachineLearningJob resource accepts the following input properties:

    DatasourceType string
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    Metric string
    The metric used to query the job results.
    QueryParams Dictionary<string, object>
    An object representing the query params to query Grafana with.
    CustomLabels Dictionary<string, object>
    An object representing the custom labels added on the forecast.
    DatasourceId int
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    DatasourceUid string
    The uid of the datasource to query.
    Description string
    A description of the job.
    Holidays List<string>
    A list of holiday IDs or names to take into account when training the model.
    HyperParams Dictionary<string, object>
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    Interval int
    The data interval in seconds to train the data on. Defaults to 300.
    Name string
    The name of the job.
    TrainingWindow int
    The data interval in seconds to train the data on. Defaults to 7776000.
    DatasourceType string
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    Metric string
    The metric used to query the job results.
    QueryParams map[string]interface{}
    An object representing the query params to query Grafana with.
    CustomLabels map[string]interface{}
    An object representing the custom labels added on the forecast.
    DatasourceId int
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    DatasourceUid string
    The uid of the datasource to query.
    Description string
    A description of the job.
    Holidays []string
    A list of holiday IDs or names to take into account when training the model.
    HyperParams map[string]interface{}
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    Interval int
    The data interval in seconds to train the data on. Defaults to 300.
    Name string
    The name of the job.
    TrainingWindow int
    The data interval in seconds to train the data on. Defaults to 7776000.
    datasourceType String
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    metric String
    The metric used to query the job results.
    queryParams Map<String,Object>
    An object representing the query params to query Grafana with.
    customLabels Map<String,Object>
    An object representing the custom labels added on the forecast.
    datasourceId Integer
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    datasourceUid String
    The uid of the datasource to query.
    description String
    A description of the job.
    holidays List<String>
    A list of holiday IDs or names to take into account when training the model.
    hyperParams Map<String,Object>
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    interval Integer
    The data interval in seconds to train the data on. Defaults to 300.
    name String
    The name of the job.
    trainingWindow Integer
    The data interval in seconds to train the data on. Defaults to 7776000.
    datasourceType string
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    metric string
    The metric used to query the job results.
    queryParams {[key: string]: any}
    An object representing the query params to query Grafana with.
    customLabels {[key: string]: any}
    An object representing the custom labels added on the forecast.
    datasourceId number
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    datasourceUid string
    The uid of the datasource to query.
    description string
    A description of the job.
    holidays string[]
    A list of holiday IDs or names to take into account when training the model.
    hyperParams {[key: string]: any}
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    interval number
    The data interval in seconds to train the data on. Defaults to 300.
    name string
    The name of the job.
    trainingWindow number
    The data interval in seconds to train the data on. Defaults to 7776000.
    datasource_type str
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    metric str
    The metric used to query the job results.
    query_params Mapping[str, Any]
    An object representing the query params to query Grafana with.
    custom_labels Mapping[str, Any]
    An object representing the custom labels added on the forecast.
    datasource_id int
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    datasource_uid str
    The uid of the datasource to query.
    description str
    A description of the job.
    holidays Sequence[str]
    A list of holiday IDs or names to take into account when training the model.
    hyper_params Mapping[str, Any]
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    interval int
    The data interval in seconds to train the data on. Defaults to 300.
    name str
    The name of the job.
    training_window int
    The data interval in seconds to train the data on. Defaults to 7776000.
    datasourceType String
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    metric String
    The metric used to query the job results.
    queryParams Map<Any>
    An object representing the query params to query Grafana with.
    customLabels Map<Any>
    An object representing the custom labels added on the forecast.
    datasourceId Number
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    datasourceUid String
    The uid of the datasource to query.
    description String
    A description of the job.
    holidays List<String>
    A list of holiday IDs or names to take into account when training the model.
    hyperParams Map<Any>
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    interval Number
    The data interval in seconds to train the data on. Defaults to 300.
    name String
    The name of the job.
    trainingWindow Number
    The data interval in seconds to train the data on. Defaults to 7776000.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MachineLearningJob resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MachineLearningJob Resource

    Get an existing MachineLearningJob 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?: MachineLearningJobState, opts?: CustomResourceOptions): MachineLearningJob
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            custom_labels: Optional[Mapping[str, Any]] = None,
            datasource_id: Optional[int] = None,
            datasource_type: Optional[str] = None,
            datasource_uid: Optional[str] = None,
            description: Optional[str] = None,
            holidays: Optional[Sequence[str]] = None,
            hyper_params: Optional[Mapping[str, Any]] = None,
            interval: Optional[int] = None,
            metric: Optional[str] = None,
            name: Optional[str] = None,
            query_params: Optional[Mapping[str, Any]] = None,
            training_window: Optional[int] = None) -> MachineLearningJob
    func GetMachineLearningJob(ctx *Context, name string, id IDInput, state *MachineLearningJobState, opts ...ResourceOption) (*MachineLearningJob, error)
    public static MachineLearningJob Get(string name, Input<string> id, MachineLearningJobState? state, CustomResourceOptions? opts = null)
    public static MachineLearningJob get(String name, Output<String> id, MachineLearningJobState 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.
    The following state arguments are supported:
    CustomLabels Dictionary<string, object>
    An object representing the custom labels added on the forecast.
    DatasourceId int
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    DatasourceType string
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    DatasourceUid string
    The uid of the datasource to query.
    Description string
    A description of the job.
    Holidays List<string>
    A list of holiday IDs or names to take into account when training the model.
    HyperParams Dictionary<string, object>
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    Interval int
    The data interval in seconds to train the data on. Defaults to 300.
    Metric string
    The metric used to query the job results.
    Name string
    The name of the job.
    QueryParams Dictionary<string, object>
    An object representing the query params to query Grafana with.
    TrainingWindow int
    The data interval in seconds to train the data on. Defaults to 7776000.
    CustomLabels map[string]interface{}
    An object representing the custom labels added on the forecast.
    DatasourceId int
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    DatasourceType string
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    DatasourceUid string
    The uid of the datasource to query.
    Description string
    A description of the job.
    Holidays []string
    A list of holiday IDs or names to take into account when training the model.
    HyperParams map[string]interface{}
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    Interval int
    The data interval in seconds to train the data on. Defaults to 300.
    Metric string
    The metric used to query the job results.
    Name string
    The name of the job.
    QueryParams map[string]interface{}
    An object representing the query params to query Grafana with.
    TrainingWindow int
    The data interval in seconds to train the data on. Defaults to 7776000.
    customLabels Map<String,Object>
    An object representing the custom labels added on the forecast.
    datasourceId Integer
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    datasourceType String
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    datasourceUid String
    The uid of the datasource to query.
    description String
    A description of the job.
    holidays List<String>
    A list of holiday IDs or names to take into account when training the model.
    hyperParams Map<String,Object>
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    interval Integer
    The data interval in seconds to train the data on. Defaults to 300.
    metric String
    The metric used to query the job results.
    name String
    The name of the job.
    queryParams Map<String,Object>
    An object representing the query params to query Grafana with.
    trainingWindow Integer
    The data interval in seconds to train the data on. Defaults to 7776000.
    customLabels {[key: string]: any}
    An object representing the custom labels added on the forecast.
    datasourceId number
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    datasourceType string
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    datasourceUid string
    The uid of the datasource to query.
    description string
    A description of the job.
    holidays string[]
    A list of holiday IDs or names to take into account when training the model.
    hyperParams {[key: string]: any}
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    interval number
    The data interval in seconds to train the data on. Defaults to 300.
    metric string
    The metric used to query the job results.
    name string
    The name of the job.
    queryParams {[key: string]: any}
    An object representing the query params to query Grafana with.
    trainingWindow number
    The data interval in seconds to train the data on. Defaults to 7776000.
    custom_labels Mapping[str, Any]
    An object representing the custom labels added on the forecast.
    datasource_id int
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    datasource_type str
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    datasource_uid str
    The uid of the datasource to query.
    description str
    A description of the job.
    holidays Sequence[str]
    A list of holiday IDs or names to take into account when training the model.
    hyper_params Mapping[str, Any]
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    interval int
    The data interval in seconds to train the data on. Defaults to 300.
    metric str
    The metric used to query the job results.
    name str
    The name of the job.
    query_params Mapping[str, Any]
    An object representing the query params to query Grafana with.
    training_window int
    The data interval in seconds to train the data on. Defaults to 7776000.
    customLabels Map<Any>
    An object representing the custom labels added on the forecast.
    datasourceId Number
    The id of the datasource to query.

    Deprecated: Use datasource_uid instead.

    datasourceType String
    The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
    datasourceUid String
    The uid of the datasource to query.
    description String
    A description of the job.
    holidays List<String>
    A list of holiday IDs or names to take into account when training the model.
    hyperParams Map<Any>
    The hyperparameters used to fine tune the algorithm. See https://grafana.com/docs/grafana-cloud/machine-learning/models/ for the full list of available hyperparameters. Defaults to map[].
    interval Number
    The data interval in seconds to train the data on. Defaults to 300.
    metric String
    The metric used to query the job results.
    name String
    The name of the job.
    queryParams Map<Any>
    An object representing the query params to query Grafana with.
    trainingWindow Number
    The data interval in seconds to train the data on. Defaults to 7776000.

    Import

    $ pulumi import grafana:index/machineLearningJob:MachineLearningJob name "{{ id }}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse