googleMlEngineModel
Represents a machine learning solution.
A model can have multiple versions, each of which is a deployed, trained model ready to receive prediction requests. The model itself is just a container.
To get more information about Model, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - Ml Model Basic
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.mlEngineModel.MlEngineModel(this, "default", {
description: "My model",
name: "default",
regions: ["us-central1"],
});
Example Usage - Ml Model Full
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.mlEngineModel.MlEngineModel(this, "default", {
description: "My model",
labels: [
{
my_model: "foo",
},
],
name: "default",
online_prediction_console_logging: true,
online_prediction_logging: true,
regions: ["us-central1"],
});
Argument Reference
The following arguments are supported:
name
- (Required) The name specified for the model.
-
description
- (Optional) The description specified for the model when it was created. -
defaultVersion
- (Optional) The default version of the model. This version will be used to handle prediction requests that do not specify a version. Structure is documented below. -
regions
- (Optional) The list of regions where the model is going to be deployed. Currently only one region per model is supported -
onlinePredictionLogging
- (Optional) If true, online prediction access logs are sent to StackDriver Logging. -
onlinePredictionConsoleLogging
- (Optional) If true, online prediction nodes send stderr and stdout streams to Stackdriver Logging -
labels
- (Optional) One or more labels that you can add, to organize your models. -
project
- (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
The defaultVersion
block supports:
name
- (Required) The name specified for the version when it was created.
Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with formatprojects/{{project}}/models/{{name}}
Timeouts
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.
Import
Model can be imported using any of these accepted formats:
$ terraform import google_ml_engine_model.default projects/{{project}}/models/{{name}}
$ terraform import google_ml_engine_model.default {{project}}/{{name}}
$ terraform import google_ml_engine_model.default {{name}}
User Project Overrides
This resource supports User Project Overrides.