All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.machinelearningservices.kotlin.EndpointDeploymentArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.machinelearningservices.kotlin

import com.pulumi.azurenative.machinelearningservices.EndpointDeploymentArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * Azure REST API version: 2024-01-01-preview.
 * Other available API versions: 2024-04-01-preview, 2024-07-01-preview.
 * ## Example Usage
 * ### Create Endpoint Deployment
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var endpointDeployment = new AzureNative.MachineLearningServices.EndpointDeployment("endpointDeployment", new()
 *     {
 *         DeploymentName = "text-davinci-003",
 *         EndpointName = "Azure.OpenAI",
 *         Properties = new AzureNative.MachineLearningServices.Inputs.OpenAIEndpointDeploymentResourcePropertiesArgs
 *         {
 *             Model = new AzureNative.MachineLearningServices.Inputs.EndpointDeploymentModelArgs
 *             {
 *                 Format = "OpenAI",
 *                 Name = "text-davinci-003",
 *                 Version = "1",
 *             },
 *             Type = "Azure.OpenAI",
 *             VersionUpgradeOption = AzureNative.MachineLearningServices.DeploymentModelVersionUpgradeOption.OnceNewDefaultVersionAvailable,
 *         },
 *         ResourceGroupName = "resourceGroup-1",
 *         WorkspaceName = "testworkspace",
 *     });
 * });
 * ```
 * ```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.NewEndpointDeployment(ctx, "endpointDeployment", &machinelearningservices.EndpointDeploymentArgs{
 * 			DeploymentName: pulumi.String("text-davinci-003"),
 * 			EndpointName:   pulumi.String("Azure.OpenAI"),
 * 			Properties: &machinelearningservices.OpenAIEndpointDeploymentResourcePropertiesArgs{
 * 				Model: &machinelearningservices.EndpointDeploymentModelArgs{
 * 					Format:  pulumi.String("OpenAI"),
 * 					Name:    pulumi.String("text-davinci-003"),
 * 					Version: pulumi.String("1"),
 * 				},
 * 				Type:                 pulumi.String("Azure.OpenAI"),
 * 				VersionUpgradeOption: pulumi.String(machinelearningservices.DeploymentModelVersionUpgradeOptionOnceNewDefaultVersionAvailable),
 * 			},
 * 			ResourceGroupName: pulumi.String("resourceGroup-1"),
 * 			WorkspaceName:     pulumi.String("testworkspace"),
 * 		})
 * 		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.EndpointDeployment;
 * import com.pulumi.azurenative.machinelearningservices.EndpointDeploymentArgs;
 * 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 endpointDeployment = new EndpointDeployment("endpointDeployment", EndpointDeploymentArgs.builder()
 *             .deploymentName("text-davinci-003")
 *             .endpointName("Azure.OpenAI")
 *             .properties(ContentSafetyEndpointDeploymentResourcePropertiesArgs.builder()
 *                 .model(EndpointDeploymentModelArgs.builder()
 *                     .format("OpenAI")
 *                     .name("text-davinci-003")
 *                     .version("1")
 *                     .build())
 *                 .type("Azure.OpenAI")
 *                 .versionUpgradeOption("OnceNewDefaultVersionAvailable")
 *                 .build())
 *             .resourceGroupName("resourceGroup-1")
 *             .workspaceName("testworkspace")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:machinelearningservices:EndpointDeployment text-davinci-003 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName}
 * ```
 * @property deploymentName Name of the deployment resource
 * @property endpointName Name of the endpoint resource.
 * @property properties
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property workspaceName Azure Machine Learning Workspace Name
 */
public data class EndpointDeploymentArgs(
    public val deploymentName: Output? = null,
    public val endpointName: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val workspaceName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.EndpointDeploymentArgs =
        com.pulumi.azurenative.machinelearningservices.EndpointDeploymentArgs.builder()
            .deploymentName(deploymentName?.applyValue({ args0 -> args0 }))
            .endpointName(endpointName?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EndpointDeploymentArgs].
 */
@PulumiTagMarker
public class EndpointDeploymentArgsBuilder internal constructor() {
    private var deploymentName: Output? = null

    private var endpointName: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var workspaceName: Output? = null

    /**
     * @param value Name of the deployment resource
     */
    @JvmName("clluxrxmnxduwknt")
    public suspend fun deploymentName(`value`: Output) {
        this.deploymentName = value
    }

    /**
     * @param value Name of the endpoint resource.
     */
    @JvmName("wieeqflmguayjdsy")
    public suspend fun endpointName(`value`: Output) {
        this.endpointName = value
    }

    /**
     * @param value
     */
    @JvmName("gpeogquvkpppomqn")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("raxwljsrlqsavfmf")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Azure Machine Learning Workspace Name
     */
    @JvmName("sagxtdmpydekuxwc")
    public suspend fun workspaceName(`value`: Output) {
        this.workspaceName = value
    }

    /**
     * @param value Name of the deployment resource
     */
    @JvmName("jaukwikeelbasbul")
    public suspend fun deploymentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentName = mapped
    }

    /**
     * @param value Name of the endpoint resource.
     */
    @JvmName("jlmbnllydjdcnfbw")
    public suspend fun endpointName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endpointName = mapped
    }

    /**
     * @param value
     */
    @JvmName("yxaxiknuvbxrqvxr")
    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("fyqetlsdkehtlgad")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Azure Machine Learning Workspace Name
     */
    @JvmName("xxflpepdrhikmuao")
    public suspend fun workspaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workspaceName = mapped
    }

    internal fun build(): EndpointDeploymentArgs = EndpointDeploymentArgs(
        deploymentName = deploymentName,
        endpointName = endpointName,
        properties = properties,
        resourceGroupName = resourceGroupName,
        workspaceName = workspaceName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy