ACIService

class ACIService : KotlinCustomResource

Machine Learning service object wrapped into ARM resource envelope. API Version: 2021-01-01.

Example Usage

Create Or Update service

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var aciService = new AzureNative.MachineLearningServices.ACIService("aciService", new()
{
AppInsightsEnabled = true,
AuthEnabled = true,
ComputeType = "ACI",
ContainerResourceRequirements = new AzureNative.MachineLearningServices.Inputs.ContainerResourceRequirementsArgs
{
Cpu = 1,
MemoryInGB = 1,
},
EnvironmentImageRequest = new AzureNative.MachineLearningServices.Inputs.CreateServiceRequestEnvironmentImageRequestArgs
{
Assets = new[]
{
new AzureNative.MachineLearningServices.Inputs.ImageAssetArgs
{
MimeType = "application/x-python",
Unpack = false,
Url = "aml://storage/azureml/score.py",
},
},
DriverProgram = "score.py",
Environment = new AzureNative.MachineLearningServices.Inputs.EnvironmentImageRequestEnvironmentArgs
{
Docker = new AzureNative.MachineLearningServices.Inputs.ModelEnvironmentDefinitionDockerArgs
{
BaseImage = "mcr.microsoft.com/azureml/base:openmpi3.1.2-ubuntu16.04",
BaseImageRegistry = null,
},
EnvironmentVariables =
{
{ "EXAMPLE_ENV_VAR", "EXAMPLE_VALUE" },
},
Name = "AzureML-Scikit-learn-0.20.3",
Python = new AzureNative.MachineLearningServices.Inputs.ModelEnvironmentDefinitionPythonArgs
{
CondaDependencies =
{
{ "channels", new[]
{
"conda-forge",
} },
{ "dependencies", new[]
{
"python=3.6.2",
{
{ "pip", new[]
{
"azureml-core==1.0.69",
"azureml-defaults==1.0.69",
"azureml-telemetry==1.0.69",
"azureml-train-restclients-hyperdrive==1.0.69",
"azureml-train-core==1.0.69",
"scikit-learn==0.20.3",
"scipy==1.2.1",
"numpy==1.16.2",
"joblib==0.13.2",
} },
},
} },
{ "name", "azureml_ae1acbe6e1e6aabbad900b53c491a17c" },
},
InterpreterPath = "python",
UserManagedDependencies = false,
},
Spark = new AzureNative.MachineLearningServices.Inputs.ModelEnvironmentDefinitionSparkArgs
{
Packages = new[] {},
PrecachePackages = true,
Repositories = new[] {},
},
Version = "3",
},
Models = new[]
{
new AzureNative.MachineLearningServices.Inputs.ModelArgs
{
MimeType = "application/x-python",
Name = "sklearn_regression_model.pkl",
Url = "aml://storage/azureml/sklearn_regression_model.pkl",
},
},
},
Location = "eastus2",
ResourceGroupName = "testrg123",
ServiceName = "service456",
WorkspaceName = "workspaces123",
});
});
package main
import (
machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := machinelearningservices.NewACIService(ctx, "aciService", &machinelearningservices.ACIServiceArgs{
AppInsightsEnabled: pulumi.Bool(true),
AuthEnabled: pulumi.Bool(true),
ComputeType: pulumi.String("ACI"),
ContainerResourceRequirements: &machinelearningservices.ContainerResourceRequirementsArgs{
Cpu: pulumi.Float64(1),
MemoryInGB: pulumi.Float64(1),
},
EnvironmentImageRequest: &machinelearningservices.CreateServiceRequestEnvironmentImageRequestArgs{
Assets: machinelearningservices.ImageAssetArray{
&machinelearningservices.ImageAssetArgs{
MimeType: pulumi.String("application/x-python"),
Unpack: pulumi.Bool(false),
Url: pulumi.String("aml://storage/azureml/score.py"),
},
},
DriverProgram: pulumi.String("score.py"),
Environment: &machinelearningservices.EnvironmentImageRequestEnvironmentArgs{
Docker: &machinelearningservices.ModelEnvironmentDefinitionDockerArgs{
BaseImage: pulumi.String("mcr.microsoft.com/azureml/base:openmpi3.1.2-ubuntu16.04"),
BaseImageRegistry: nil,
},
EnvironmentVariables: pulumi.StringMap{
"EXAMPLE_ENV_VAR": pulumi.String("EXAMPLE_VALUE"),
},
Name: pulumi.String("AzureML-Scikit-learn-0.20.3"),
Python: &machinelearningservices.ModelEnvironmentDefinitionPythonArgs{
CondaDependencies: pulumi.Any{
Channels: []string{
"conda-forge",
},
Dependencies: []interface{}{
"python=3.6.2",
map[string]interface{}{
"pip": []string{
"azureml-core==1.0.69",
"azureml-defaults==1.0.69",
"azureml-telemetry==1.0.69",
"azureml-train-restclients-hyperdrive==1.0.69",
"azureml-train-core==1.0.69",
"scikit-learn==0.20.3",
"scipy==1.2.1",
"numpy==1.16.2",
"joblib==0.13.2",
},
},
},
Name: "azureml_ae1acbe6e1e6aabbad900b53c491a17c",
},
InterpreterPath: pulumi.String("python"),
UserManagedDependencies: pulumi.Bool(false),
},
Spark: &machinelearningservices.ModelEnvironmentDefinitionSparkArgs{
Packages: machinelearningservices.SparkMavenPackageArray{},
PrecachePackages: pulumi.Bool(true),
Repositories: pulumi.StringArray{},
},
Version: pulumi.String("3"),
},
Models: machinelearningservices.ModelArray{
&machinelearningservices.ModelArgs{
MimeType: pulumi.String("application/x-python"),
Name: pulumi.String("sklearn_regression_model.pkl"),
Url: pulumi.String("aml://storage/azureml/sklearn_regression_model.pkl"),
},
},
},
Location: pulumi.String("eastus2"),
ResourceGroupName: pulumi.String("testrg123"),
ServiceName: pulumi.String("service456"),
WorkspaceName: pulumi.String("workspaces123"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.machinelearningservices.ACIService;
import com.pulumi.azurenative.machinelearningservices.ACIServiceArgs;
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 aciService = new ACIService("aciService", ACIServiceArgs.builder()
.appInsightsEnabled(true)
.authEnabled(true)
.computeType("ACI")
.containerResourceRequirements(Map.ofEntries(
Map.entry("cpu", 1),
Map.entry("memoryInGB", 1)
))
.environmentImageRequest(Map.ofEntries(
Map.entry("assets", Map.ofEntries(
Map.entry("mimeType", "application/x-python"),
Map.entry("unpack", false),
Map.entry("url", "aml://storage/azureml/score.py")
)),
Map.entry("driverProgram", "score.py"),
Map.entry("environment", Map.ofEntries(
Map.entry("docker", Map.ofEntries(
Map.entry("baseImage", "mcr.microsoft.com/azureml/base:openmpi3.1.2-ubuntu16.04"),
Map.entry("baseImageRegistry", )
)),
Map.entry("environmentVariables", Map.of("EXAMPLE_ENV_VAR", "EXAMPLE_VALUE")),
Map.entry("name", "AzureML-Scikit-learn-0.20.3"),
Map.entry("python", Map.ofEntries(
Map.entry("condaDependencies", Map.ofEntries(
Map.entry("channels", "conda-forge"),
Map.entry("dependencies",
"python=3.6.2",
CreateServiceRequestEnvironmentImageRequestArgs.builder()
.pip(
"azureml-core==1.0.69",
"azureml-defaults==1.0.69",
"azureml-telemetry==1.0.69",
"azureml-train-restclients-hyperdrive==1.0.69",
"azureml-train-core==1.0.69",
"scikit-learn==0.20.3",
"scipy==1.2.1",
"numpy==1.16.2",
"joblib==0.13.2")
.build()),
Map.entry("name", "azureml_ae1acbe6e1e6aabbad900b53c491a17c")
)),
Map.entry("interpreterPath", "python"),
Map.entry("userManagedDependencies", false)
)),
Map.entry("spark", Map.ofEntries(
Map.entry("packages", ),
Map.entry("precachePackages", true),
Map.entry("repositories", )
)),
Map.entry("version", "3")
)),
Map.entry("models", Map.ofEntries(
Map.entry("mimeType", "application/x-python"),
Map.entry("name", "sklearn_regression_model.pkl"),
Map.entry("url", "aml://storage/azureml/sklearn_regression_model.pkl")
))
))
.location("eastus2")
.resourceGroupName("testrg123")
.serviceName("service456")
.workspaceName("workspaces123")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:machinelearningservices:ACIService service456 subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/services/service456

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The identity of the resource.

Link copied to clipboard
val location: Output<String>?

Specifies the location of the resource.

Link copied to clipboard
val name: Output<String>

Specifies the name of the resource.

Link copied to clipboard
val properties: Output<Any>

Service properties

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sku: Output<SkuResponse>?

The sku of the workspace.

Link copied to clipboard

Read only system data

Link copied to clipboard
val tags: Output<Map<String, String>>?

Contains resource tags defined as key/value pairs.

Link copied to clipboard
val type: Output<String>

Specifies the type of the resource.

Link copied to clipboard
val urn: Output<String>