grafana.MachineLearningJob

Explore with Pulumi AI

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

Create MachineLearningJob Resource

new MachineLearningJob(name: string, args: MachineLearningJobArgs, opts?: CustomResourceOptions);
@overload
def MachineLearningJob(resource_name: 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)
@overload
def MachineLearningJob(resource_name: str,
                       args: MachineLearningJobArgs,
                       opts: Optional[ResourceOptions] = 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Package Details

Repository
grafana lbrlabs/pulumi-grafana
License
Apache-2.0
Notes

This Pulumi package is based on the grafana Terraform Provider.