Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.machinelearningservices.kotlin.ComputeArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.machinelearningservices.kotlin
import com.pulumi.azurenative.machinelearningservices.ComputeArgs.builder
import com.pulumi.azurenative.machinelearningservices.kotlin.inputs.ManagedServiceIdentityArgs
import com.pulumi.azurenative.machinelearningservices.kotlin.inputs.ManagedServiceIdentityArgsBuilder
import com.pulumi.azurenative.machinelearningservices.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.machinelearningservices.kotlin.inputs.SkuArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Machine Learning compute object wrapped into ARM resource envelope.
* Azure REST API version: 2023-04-01.
* Other available API versions: 2022-01-01-preview, 2023-04-01-preview, 2023-06-01-preview, 2023-08-01-preview, 2023-10-01, 2024-01-01-preview, 2024-04-01, 2024-04-01-preview, 2024-07-01-preview.
* ## Example Usage
* ### Create a AML Compute
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var compute = new AzureNative.MachineLearningServices.Compute("compute", new()
* {
* ComputeName = "compute123",
* Location = "eastus",
* Properties = new AzureNative.MachineLearningServices.Inputs.AmlComputeArgs
* {
* ComputeType = "AmlCompute",
* Properties = new AzureNative.MachineLearningServices.Inputs.AmlComputePropertiesArgs
* {
* EnableNodePublicIp = true,
* IsolatedNetwork = false,
* OsType = AzureNative.MachineLearningServices.OsType.Windows,
* RemoteLoginPortPublicAccess = AzureNative.MachineLearningServices.RemoteLoginPortPublicAccess.NotSpecified,
* ScaleSettings = new AzureNative.MachineLearningServices.Inputs.ScaleSettingsArgs
* {
* MaxNodeCount = 1,
* MinNodeCount = 0,
* NodeIdleTimeBeforeScaleDown = "PT5M",
* },
* VirtualMachineImage = new AzureNative.MachineLearningServices.Inputs.VirtualMachineImageArgs
* {
* Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1",
* },
* VmPriority = AzureNative.MachineLearningServices.VmPriority.Dedicated,
* VmSize = "STANDARD_NC6",
* },
* },
* ResourceGroupName = "testrg123",
* WorkspaceName = "workspaces123",
* });
* });
* ```
* ```go
* package main
* import (
* machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := machinelearningservices.NewCompute(ctx, "compute", &machinelearningservices.ComputeArgs{
* ComputeName: pulumi.String("compute123"),
* Location: pulumi.String("eastus"),
* Properties: &machinelearningservices.AmlComputeArgs{
* ComputeType: pulumi.String("AmlCompute"),
* Properties: &machinelearningservices.AmlComputePropertiesArgs{
* EnableNodePublicIp: pulumi.Bool(true),
* IsolatedNetwork: pulumi.Bool(false),
* OsType: pulumi.String(machinelearningservices.OsTypeWindows),
* RemoteLoginPortPublicAccess: pulumi.String(machinelearningservices.RemoteLoginPortPublicAccessNotSpecified),
* ScaleSettings: &machinelearningservices.ScaleSettingsArgs{
* MaxNodeCount: pulumi.Int(1),
* MinNodeCount: pulumi.Int(0),
* NodeIdleTimeBeforeScaleDown: pulumi.String("PT5M"),
* },
* VirtualMachineImage: &machinelearningservices.VirtualMachineImageArgs{
* Id: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1"),
* },
* VmPriority: pulumi.String(machinelearningservices.VmPriorityDedicated),
* VmSize: pulumi.String("STANDARD_NC6"),
* },
* },
* ResourceGroupName: pulumi.String("testrg123"),
* WorkspaceName: pulumi.String("workspaces123"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearningservices.Compute;
* import com.pulumi.azurenative.machinelearningservices.ComputeArgs;
* 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 compute = new Compute("compute", ComputeArgs.builder()
* .computeName("compute123")
* .location("eastus")
* .properties(AmlComputeArgs.builder()
* .computeType("AmlCompute")
* .properties(AmlComputePropertiesArgs.builder()
* .enableNodePublicIp(true)
* .isolatedNetwork(false)
* .osType("Windows")
* .remoteLoginPortPublicAccess("NotSpecified")
* .scaleSettings(ScaleSettingsArgs.builder()
* .maxNodeCount(1)
* .minNodeCount(0)
* .nodeIdleTimeBeforeScaleDown("PT5M")
* .build())
* .virtualMachineImage(VirtualMachineImageArgs.builder()
* .id("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1")
* .build())
* .vmPriority("Dedicated")
* .vmSize("STANDARD_NC6")
* .build())
* .build())
* .resourceGroupName("testrg123")
* .workspaceName("workspaces123")
* .build());
* }
* }
* ```
* ### Create a DataFactory Compute
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var compute = new AzureNative.MachineLearningServices.Compute("compute", new()
* {
* ComputeName = "compute123",
* Location = "eastus",
* Properties = new AzureNative.MachineLearningServices.Inputs.DataFactoryArgs
* {
* ComputeType = "DataFactory",
* },
* ResourceGroupName = "testrg123",
* WorkspaceName = "workspaces123",
* });
* });
* ```
* ```go
* package main
* import (
* machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := machinelearningservices.NewCompute(ctx, "compute", &machinelearningservices.ComputeArgs{
* ComputeName: pulumi.String("compute123"),
* Location: pulumi.String("eastus"),
* Properties: &machinelearningservices.DataFactoryArgs{
* ComputeType: pulumi.String("DataFactory"),
* },
* ResourceGroupName: pulumi.String("testrg123"),
* WorkspaceName: pulumi.String("workspaces123"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearningservices.Compute;
* import com.pulumi.azurenative.machinelearningservices.ComputeArgs;
* 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 compute = new Compute("compute", ComputeArgs.builder()
* .computeName("compute123")
* .location("eastus")
* .properties(DataFactoryArgs.builder()
* .computeType("DataFactory")
* .build())
* .resourceGroupName("testrg123")
* .workspaceName("workspaces123")
* .build());
* }
* }
* ```
* ### Create an AKS Compute
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var compute = new AzureNative.MachineLearningServices.Compute("compute", new()
* {
* ComputeName = "compute123",
* Location = "eastus",
* Properties = new AzureNative.MachineLearningServices.Inputs.AKSArgs
* {
* ComputeType = "AKS",
* },
* ResourceGroupName = "testrg123",
* WorkspaceName = "workspaces123",
* });
* });
* ```
* ```go
* package main
* import (
* machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := machinelearningservices.NewCompute(ctx, "compute", &machinelearningservices.ComputeArgs{
* ComputeName: pulumi.String("compute123"),
* Location: pulumi.String("eastus"),
* Properties: &machinelearningservices.AKSArgs{
* ComputeType: pulumi.String("AKS"),
* },
* ResourceGroupName: pulumi.String("testrg123"),
* WorkspaceName: pulumi.String("workspaces123"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearningservices.Compute;
* import com.pulumi.azurenative.machinelearningservices.ComputeArgs;
* 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 compute = new Compute("compute", ComputeArgs.builder()
* .computeName("compute123")
* .location("eastus")
* .properties(AKSArgs.builder()
* .computeType("AKS")
* .build())
* .resourceGroupName("testrg123")
* .workspaceName("workspaces123")
* .build());
* }
* }
* ```
* ### Create an ComputeInstance Compute
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var compute = new AzureNative.MachineLearningServices.Compute("compute", new()
* {
* ComputeName = "compute123",
* Location = "eastus",
* Properties = new AzureNative.MachineLearningServices.Inputs.ComputeInstanceArgs
* {
* ComputeType = "ComputeInstance",
* Properties = new AzureNative.MachineLearningServices.Inputs.ComputeInstancePropertiesArgs
* {
* ApplicationSharingPolicy = AzureNative.MachineLearningServices.ApplicationSharingPolicy.Personal,
* ComputeInstanceAuthorizationType = AzureNative.MachineLearningServices.ComputeInstanceAuthorizationType.Personal,
* CustomServices = new[]
* {
* new AzureNative.MachineLearningServices.Inputs.CustomServiceArgs
* {
* Docker = new AzureNative.MachineLearningServices.Inputs.DockerArgs
* {
* Privileged = true,
* },
* Endpoints = new[]
* {
* new AzureNative.MachineLearningServices.Inputs.EndpointArgs
* {
* Name = "connect",
* Protocol = AzureNative.MachineLearningServices.Protocol.Http,
* Published = 8787,
* Target = 8787,
* },
* },
* EnvironmentVariables =
* {
* { "test_variable", new AzureNative.MachineLearningServices.Inputs.EnvironmentVariableArgs
* {
* Type = AzureNative.MachineLearningServices.EnvironmentVariableType.Local,
* Value = "test_value",
* } },
* },
* Image = new AzureNative.MachineLearningServices.Inputs.ImageArgs
* {
* Reference = "ghcr.io/azure/rocker-rstudio-ml-verse:latest",
* Type = AzureNative.MachineLearningServices.ImageType.Docker,
* },
* Name = "rstudio",
* Volumes = new[]
* {
* new AzureNative.MachineLearningServices.Inputs.VolumeDefinitionArgs
* {
* ReadOnly = false,
* Source = "/home/azureuser/cloudfiles",
* Target = "/home/azureuser/cloudfiles",
* Type = AzureNative.MachineLearningServices.VolumeDefinitionType.Bind,
* },
* },
* },
* },
* PersonalComputeInstanceSettings = new AzureNative.MachineLearningServices.Inputs.PersonalComputeInstanceSettingsArgs
* {
* AssignedUser = new AzureNative.MachineLearningServices.Inputs.AssignedUserArgs
* {
* ObjectId = "00000000-0000-0000-0000-000000000000",
* TenantId = "00000000-0000-0000-0000-000000000000",
* },
* },
* SshSettings = new AzureNative.MachineLearningServices.Inputs.ComputeInstanceSshSettingsArgs
* {
* SshPublicAccess = AzureNative.MachineLearningServices.SshPublicAccess.Disabled,
* },
* Subnet = new AzureNative.MachineLearningServices.Inputs.ResourceIdArgs
* {
* Id = "test-subnet-resource-id",
* },
* VmSize = "STANDARD_NC6",
* },
* },
* ResourceGroupName = "testrg123",
* WorkspaceName = "workspaces123",
* });
* });
* ```
* ```go
* package main
* import (
* machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := machinelearningservices.NewCompute(ctx, "compute", &machinelearningservices.ComputeArgs{
* ComputeName: pulumi.String("compute123"),
* Location: pulumi.String("eastus"),
* Properties: &machinelearningservices.ComputeInstanceArgs{
* ComputeType: pulumi.String("ComputeInstance"),
* Properties: &machinelearningservices.ComputeInstancePropertiesArgs{
* ApplicationSharingPolicy: pulumi.String(machinelearningservices.ApplicationSharingPolicyPersonal),
* ComputeInstanceAuthorizationType: pulumi.String(machinelearningservices.ComputeInstanceAuthorizationTypePersonal),
* CustomServices: machinelearningservices.CustomServiceArray{
* &machinelearningservices.CustomServiceArgs{
* Docker: &machinelearningservices.DockerArgs{
* Privileged: pulumi.Bool(true),
* },
* Endpoints: machinelearningservices.EndpointArray{
* &machinelearningservices.EndpointArgs{
* Name: pulumi.String("connect"),
* Protocol: pulumi.String(machinelearningservices.ProtocolHttp),
* Published: pulumi.Int(8787),
* Target: pulumi.Int(8787),
* },
* },
* EnvironmentVariables: machinelearningservices.EnvironmentVariableMap{
* "test_variable": &machinelearningservices.EnvironmentVariableArgs{
* Type: pulumi.String(machinelearningservices.EnvironmentVariableTypeLocal),
* Value: pulumi.String("test_value"),
* },
* },
* Image: &machinelearningservices.ImageArgs{
* Reference: pulumi.String("ghcr.io/azure/rocker-rstudio-ml-verse:latest"),
* Type: pulumi.String(machinelearningservices.ImageTypeDocker),
* },
* Name: pulumi.String("rstudio"),
* Volumes: machinelearningservices.VolumeDefinitionArray{
* &machinelearningservices.VolumeDefinitionArgs{
* ReadOnly: pulumi.Bool(false),
* Source: pulumi.String("/home/azureuser/cloudfiles"),
* Target: pulumi.String("/home/azureuser/cloudfiles"),
* Type: pulumi.String(machinelearningservices.VolumeDefinitionTypeBind),
* },
* },
* },
* },
* PersonalComputeInstanceSettings: &machinelearningservices.PersonalComputeInstanceSettingsArgs{
* AssignedUser: &machinelearningservices.AssignedUserArgs{
* ObjectId: pulumi.String("00000000-0000-0000-0000-000000000000"),
* TenantId: pulumi.String("00000000-0000-0000-0000-000000000000"),
* },
* },
* SshSettings: &machinelearningservices.ComputeInstanceSshSettingsArgs{
* SshPublicAccess: pulumi.String(machinelearningservices.SshPublicAccessDisabled),
* },
* Subnet: &machinelearningservices.ResourceIdArgs{
* Id: pulumi.String("test-subnet-resource-id"),
* },
* VmSize: pulumi.String("STANDARD_NC6"),
* },
* },
* ResourceGroupName: pulumi.String("testrg123"),
* WorkspaceName: pulumi.String("workspaces123"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearningservices.Compute;
* import com.pulumi.azurenative.machinelearningservices.ComputeArgs;
* 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 compute = new Compute("compute", ComputeArgs.builder()
* .computeName("compute123")
* .location("eastus")
* .properties(ComputeInstanceArgs.builder()
* .computeType("ComputeInstance")
* .properties(ComputeInstancePropertiesArgs.builder()
* .applicationSharingPolicy("Personal")
* .computeInstanceAuthorizationType("personal")
* .customServices(CustomServiceArgs.builder()
* .docker(DockerArgs.builder()
* .privileged(true)
* .build())
* .endpoints(EndpointArgs.builder()
* .name("connect")
* .protocol("http")
* .published(8787)
* .target(8787)
* .build())
* .environmentVariables(Map.of("test_variable", Map.ofEntries(
* Map.entry("type", "local"),
* Map.entry("value", "test_value")
* )))
* .image(ImageArgs.builder()
* .reference("ghcr.io/azure/rocker-rstudio-ml-verse:latest")
* .type("docker")
* .build())
* .name("rstudio")
* .volumes(VolumeDefinitionArgs.builder()
* .readOnly(false)
* .source("/home/azureuser/cloudfiles")
* .target("/home/azureuser/cloudfiles")
* .type("bind")
* .build())
* .build())
* .personalComputeInstanceSettings(PersonalComputeInstanceSettingsArgs.builder()
* .assignedUser(AssignedUserArgs.builder()
* .objectId("00000000-0000-0000-0000-000000000000")
* .tenantId("00000000-0000-0000-0000-000000000000")
* .build())
* .build())
* .sshSettings(ComputeInstanceSshSettingsArgs.builder()
* .sshPublicAccess("Disabled")
* .build())
* .subnet(ResourceIdArgs.builder()
* .id("test-subnet-resource-id")
* .build())
* .vmSize("STANDARD_NC6")
* .build())
* .build())
* .resourceGroupName("testrg123")
* .workspaceName("workspaces123")
* .build());
* }
* }
* ```
* ### Create an ComputeInstance Compute with Schedules
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var compute = new AzureNative.MachineLearningServices.Compute("compute", new()
* {
* ComputeName = "compute123",
* Location = "eastus",
* Properties = new AzureNative.MachineLearningServices.Inputs.ComputeInstanceArgs
* {
* ComputeType = "ComputeInstance",
* Properties = new AzureNative.MachineLearningServices.Inputs.ComputeInstancePropertiesArgs
* {
* ApplicationSharingPolicy = AzureNative.MachineLearningServices.ApplicationSharingPolicy.Personal,
* ComputeInstanceAuthorizationType = AzureNative.MachineLearningServices.ComputeInstanceAuthorizationType.Personal,
* PersonalComputeInstanceSettings = new AzureNative.MachineLearningServices.Inputs.PersonalComputeInstanceSettingsArgs
* {
* AssignedUser = new AzureNative.MachineLearningServices.Inputs.AssignedUserArgs
* {
* ObjectId = "00000000-0000-0000-0000-000000000000",
* TenantId = "00000000-0000-0000-0000-000000000000",
* },
* },
* Schedules = new AzureNative.MachineLearningServices.Inputs.ComputeSchedulesArgs
* {
* ComputeStartStop = new[]
* {
* new AzureNative.MachineLearningServices.Inputs.ComputeStartStopScheduleArgs
* {
* Action = AzureNative.MachineLearningServices.ComputePowerAction.Stop,
* Cron = new AzureNative.MachineLearningServices.Inputs.CronArgs
* {
* Expression = "0 18 * * *",
* StartTime = "2021-04-23T01:30:00",
* TimeZone = "Pacific Standard Time",
* },
* Status = AzureNative.MachineLearningServices.ScheduleStatus.Enabled,
* TriggerType = AzureNative.MachineLearningServices.TriggerType.Cron,
* },
* },
* },
* SshSettings = new AzureNative.MachineLearningServices.Inputs.ComputeInstanceSshSettingsArgs
* {
* SshPublicAccess = AzureNative.MachineLearningServices.SshPublicAccess.Disabled,
* },
* VmSize = "STANDARD_NC6",
* },
* },
* ResourceGroupName = "testrg123",
* WorkspaceName = "workspaces123",
* });
* });
* ```
* ```go
* package main
* import (
* machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := machinelearningservices.NewCompute(ctx, "compute", &machinelearningservices.ComputeArgs{
* ComputeName: pulumi.String("compute123"),
* Location: pulumi.String("eastus"),
* Properties: &machinelearningservices.ComputeInstanceArgs{
* ComputeType: pulumi.String("ComputeInstance"),
* Properties: &machinelearningservices.ComputeInstancePropertiesArgs{
* ApplicationSharingPolicy: pulumi.String(machinelearningservices.ApplicationSharingPolicyPersonal),
* ComputeInstanceAuthorizationType: pulumi.String(machinelearningservices.ComputeInstanceAuthorizationTypePersonal),
* PersonalComputeInstanceSettings: &machinelearningservices.PersonalComputeInstanceSettingsArgs{
* AssignedUser: &machinelearningservices.AssignedUserArgs{
* ObjectId: pulumi.String("00000000-0000-0000-0000-000000000000"),
* TenantId: pulumi.String("00000000-0000-0000-0000-000000000000"),
* },
* },
* Schedules: &machinelearningservices.ComputeSchedulesArgs{
* ComputeStartStop: machinelearningservices.ComputeStartStopScheduleArray{
* &machinelearningservices.ComputeStartStopScheduleArgs{
* Action: pulumi.String(machinelearningservices.ComputePowerActionStop),
* Cron: &machinelearningservices.CronArgs{
* Expression: pulumi.String("0 18 * * *"),
* StartTime: pulumi.String("2021-04-23T01:30:00"),
* TimeZone: pulumi.String("Pacific Standard Time"),
* },
* Status: pulumi.String(machinelearningservices.ScheduleStatusEnabled),
* TriggerType: pulumi.String(machinelearningservices.TriggerTypeCron),
* },
* },
* },
* SshSettings: &machinelearningservices.ComputeInstanceSshSettingsArgs{
* SshPublicAccess: pulumi.String(machinelearningservices.SshPublicAccessDisabled),
* },
* VmSize: pulumi.String("STANDARD_NC6"),
* },
* },
* ResourceGroupName: pulumi.String("testrg123"),
* WorkspaceName: pulumi.String("workspaces123"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearningservices.Compute;
* import com.pulumi.azurenative.machinelearningservices.ComputeArgs;
* 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 compute = new Compute("compute", ComputeArgs.builder()
* .computeName("compute123")
* .location("eastus")
* .properties(ComputeInstanceArgs.builder()
* .computeType("ComputeInstance")
* .properties(ComputeInstancePropertiesArgs.builder()
* .applicationSharingPolicy("Personal")
* .computeInstanceAuthorizationType("personal")
* .personalComputeInstanceSettings(PersonalComputeInstanceSettingsArgs.builder()
* .assignedUser(AssignedUserArgs.builder()
* .objectId("00000000-0000-0000-0000-000000000000")
* .tenantId("00000000-0000-0000-0000-000000000000")
* .build())
* .build())
* .schedules(ComputeSchedulesArgs.builder()
* .computeStartStop(ComputeStartStopScheduleArgs.builder()
* .action("Stop")
* .cron(CronArgs.builder()
* .expression("0 18 * * *")
* .startTime("2021-04-23T01:30:00")
* .timeZone("Pacific Standard Time")
* .build())
* .status("Enabled")
* .triggerType("Cron")
* .build())
* .build())
* .sshSettings(ComputeInstanceSshSettingsArgs.builder()
* .sshPublicAccess("Disabled")
* .build())
* .vmSize("STANDARD_NC6")
* .build())
* .build())
* .resourceGroupName("testrg123")
* .workspaceName("workspaces123")
* .build());
* }
* }
* ```
* ### Create an ComputeInstance Compute with minimal inputs
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var compute = new AzureNative.MachineLearningServices.Compute("compute", new()
* {
* ComputeName = "compute123",
* Location = "eastus",
* Properties = new AzureNative.MachineLearningServices.Inputs.ComputeInstanceArgs
* {
* ComputeType = "ComputeInstance",
* Properties = new AzureNative.MachineLearningServices.Inputs.ComputeInstancePropertiesArgs
* {
* VmSize = "STANDARD_NC6",
* },
* },
* ResourceGroupName = "testrg123",
* WorkspaceName = "workspaces123",
* });
* });
* ```
* ```go
* package main
* import (
* machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := machinelearningservices.NewCompute(ctx, "compute", &machinelearningservices.ComputeArgs{
* ComputeName: pulumi.String("compute123"),
* Location: pulumi.String("eastus"),
* Properties: &machinelearningservices.ComputeInstanceArgs{
* ComputeType: pulumi.String("ComputeInstance"),
* Properties: &machinelearningservices.ComputeInstancePropertiesArgs{
* VmSize: pulumi.String("STANDARD_NC6"),
* },
* },
* ResourceGroupName: pulumi.String("testrg123"),
* WorkspaceName: pulumi.String("workspaces123"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearningservices.Compute;
* import com.pulumi.azurenative.machinelearningservices.ComputeArgs;
* 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 compute = new Compute("compute", ComputeArgs.builder()
* .computeName("compute123")
* .location("eastus")
* .properties(ComputeInstanceArgs.builder()
* .computeType("ComputeInstance")
* .properties(ComputeInstancePropertiesArgs.builder()
* .vmSize("STANDARD_NC6")
* .build())
* .build())
* .resourceGroupName("testrg123")
* .workspaceName("workspaces123")
* .build());
* }
* }
* ```
* ### Update a AML Compute
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var compute = new AzureNative.MachineLearningServices.Compute("compute", new()
* {
* ComputeName = "compute123",
* Location = "eastus",
* Properties = new AzureNative.MachineLearningServices.Inputs.AmlComputeArgs
* {
* ComputeType = "AmlCompute",
* Description = "some compute",
* Properties = new AzureNative.MachineLearningServices.Inputs.AmlComputePropertiesArgs
* {
* ScaleSettings = new AzureNative.MachineLearningServices.Inputs.ScaleSettingsArgs
* {
* MaxNodeCount = 4,
* MinNodeCount = 4,
* NodeIdleTimeBeforeScaleDown = "PT5M",
* },
* },
* },
* ResourceGroupName = "testrg123",
* WorkspaceName = "workspaces123",
* });
* });
* ```
* ```go
* package main
* import (
* machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := machinelearningservices.NewCompute(ctx, "compute", &machinelearningservices.ComputeArgs{
* ComputeName: pulumi.String("compute123"),
* Location: pulumi.String("eastus"),
* Properties: &machinelearningservices.AmlComputeArgs{
* ComputeType: pulumi.String("AmlCompute"),
* Description: pulumi.String("some compute"),
* Properties: &machinelearningservices.AmlComputePropertiesArgs{
* ScaleSettings: &machinelearningservices.ScaleSettingsArgs{
* MaxNodeCount: pulumi.Int(4),
* MinNodeCount: pulumi.Int(4),
* NodeIdleTimeBeforeScaleDown: pulumi.String("PT5M"),
* },
* },
* },
* ResourceGroupName: pulumi.String("testrg123"),
* WorkspaceName: pulumi.String("workspaces123"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearningservices.Compute;
* import com.pulumi.azurenative.machinelearningservices.ComputeArgs;
* 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 compute = new Compute("compute", ComputeArgs.builder()
* .computeName("compute123")
* .location("eastus")
* .properties(AmlComputeArgs.builder()
* .computeType("AmlCompute")
* .description("some compute")
* .properties(AmlComputePropertiesArgs.builder()
* .scaleSettings(ScaleSettingsArgs.builder()
* .maxNodeCount(4)
* .minNodeCount(4)
* .nodeIdleTimeBeforeScaleDown("PT5M")
* .build())
* .build())
* .build())
* .resourceGroupName("testrg123")
* .workspaceName("workspaces123")
* .build());
* }
* }
* ```
* ### Update an AKS Compute
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var compute = new AzureNative.MachineLearningServices.Compute("compute", new()
* {
* ComputeName = "compute123",
* Location = "eastus",
* Properties = new AzureNative.MachineLearningServices.Inputs.AKSArgs
* {
* ComputeType = "AKS",
* Description = "some compute",
* Properties = new AzureNative.MachineLearningServices.Inputs.AKSSchemaPropertiesArgs
* {
* AgentCount = 4,
* },
* ResourceId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2",
* },
* ResourceGroupName = "testrg123",
* WorkspaceName = "workspaces123",
* });
* });
* ```
* ```go
* package main
* import (
* machinelearningservices "github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := machinelearningservices.NewCompute(ctx, "compute", &machinelearningservices.ComputeArgs{
* ComputeName: pulumi.String("compute123"),
* Location: pulumi.String("eastus"),
* Properties: &machinelearningservices.AKSArgs{
* ComputeType: pulumi.String("AKS"),
* Description: pulumi.String("some compute"),
* Properties: &machinelearningservices.AKSSchemaPropertiesArgs{
* AgentCount: pulumi.Int(4),
* },
* ResourceId: pulumi.String("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"),
* },
* ResourceGroupName: pulumi.String("testrg123"),
* WorkspaceName: pulumi.String("workspaces123"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearningservices.Compute;
* import com.pulumi.azurenative.machinelearningservices.ComputeArgs;
* 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 compute = new Compute("compute", ComputeArgs.builder()
* .computeName("compute123")
* .location("eastus")
* .properties(AKSArgs.builder()
* .computeType("AKS")
* .description("some compute")
* .properties(AKSSchemaPropertiesArgs.builder()
* .agentCount(4)
* .build())
* .resourceId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2")
* .build())
* .resourceGroupName("testrg123")
* .workspaceName("workspaces123")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:machinelearningservices:Compute compute123 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}
* ```
* @property computeName Name of the Azure Machine Learning compute.
* @property identity The identity of the resource.
* @property location Specifies the location of the resource.
* @property properties Compute properties
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property sku The sku of the workspace.
* @property tags Contains resource tags defined as key/value pairs.
* @property workspaceName Name of Azure Machine Learning workspace.
*/
public data class ComputeArgs(
public val computeName: Output? = null,
public val identity: Output? = null,
public val location: Output? = null,
public val properties: Output? = null,
public val resourceGroupName: Output? = null,
public val sku: Output? = null,
public val tags: Output>? = null,
public val workspaceName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.machinelearningservices.ComputeArgs =
com.pulumi.azurenative.machinelearningservices.ComputeArgs.builder()
.computeName(computeName?.applyValue({ args0 -> args0 }))
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.properties(properties?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ComputeArgs].
*/
@PulumiTagMarker
public class ComputeArgsBuilder internal constructor() {
private var computeName: Output? = null
private var identity: Output? = null
private var location: Output? = null
private var properties: Output? = null
private var resourceGroupName: Output? = null
private var sku: Output? = null
private var tags: Output>? = null
private var workspaceName: Output? = null
/**
* @param value Name of the Azure Machine Learning compute.
*/
@JvmName("xykhjiblqkelsxkt")
public suspend fun computeName(`value`: Output) {
this.computeName = value
}
/**
* @param value The identity of the resource.
*/
@JvmName("twfponsrpbrxxlmb")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value Specifies the location of the resource.
*/
@JvmName("mtbguutfyhbfhmfo")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Compute properties
*/
@JvmName("qtylnrptbanajrrb")
public suspend fun properties(`value`: Output) {
this.properties = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("yehqimkouuagdwoh")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The sku of the workspace.
*/
@JvmName("bqvidudqskyrvnnd")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value Contains resource tags defined as key/value pairs.
*/
@JvmName("hvowxwtwyhgfdaso")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Name of Azure Machine Learning workspace.
*/
@JvmName("beyqvegfuxpljhuv")
public suspend fun workspaceName(`value`: Output) {
this.workspaceName = value
}
/**
* @param value Name of the Azure Machine Learning compute.
*/
@JvmName("halklvmyqicladwx")
public suspend fun computeName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.computeName = mapped
}
/**
* @param value The identity of the resource.
*/
@JvmName("qerwwfygmsqrbcba")
public suspend fun identity(`value`: ManagedServiceIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument The identity of the resource.
*/
@JvmName("teyitesohqffnayq")
public suspend fun identity(argument: suspend ManagedServiceIdentityArgsBuilder.() -> Unit) {
val toBeMapped = ManagedServiceIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value Specifies the location of the resource.
*/
@JvmName("updfgvkpniudsjmp")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Compute properties
*/
@JvmName("gbqiagndalxrahrm")
public suspend fun properties(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.properties = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("jdyrfiwytufxkkjv")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The sku of the workspace.
*/
@JvmName("knrqqptiuxfylfir")
public suspend fun sku(`value`: SkuArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param argument The sku of the workspace.
*/
@JvmName("bcrswydchcbsbnig")
public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sku = mapped
}
/**
* @param value Contains resource tags defined as key/value pairs.
*/
@JvmName("mwlujfvejbistbkv")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Contains resource tags defined as key/value pairs.
*/
@JvmName("sncwqqruumfkhjde")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Name of Azure Machine Learning workspace.
*/
@JvmName("meqygbslvluhsahr")
public suspend fun workspaceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.workspaceName = mapped
}
internal fun build(): ComputeArgs = ComputeArgs(
computeName = computeName,
identity = identity,
location = location,
properties = properties,
resourceGroupName = resourceGroupName,
sku = sku,
tags = tags,
workspaceName = workspaceName,
)
}