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

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

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.machinelearningservices.kotlin

import com.pulumi.azurenative.machinelearningservices.ConnectionDeploymentArgs.builder
import com.pulumi.azurenative.machinelearningservices.kotlin.inputs.CognitiveServicesSkuArgs
import com.pulumi.azurenative.machinelearningservices.kotlin.inputs.CognitiveServicesSkuArgsBuilder
import com.pulumi.azurenative.machinelearningservices.kotlin.inputs.EndpointDeploymentResourcePropertiesArgs
import com.pulumi.azurenative.machinelearningservices.kotlin.inputs.EndpointDeploymentResourcePropertiesArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * Azure REST API version: 2024-04-01-preview.
 * Other available API versions: 2024-07-01-preview.
 * ## Example Usage
 * ### Create Azure OpenAI Connection Deployment
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var connectionDeployment = new AzureNative.MachineLearningServices.ConnectionDeployment("connectionDeployment", new()
 *     {
 *         ConnectionName = "testConnection",
 *         DeploymentName = "text-davinci-003",
 *         Properties = new AzureNative.MachineLearningServices.Inputs.EndpointDeploymentResourcePropertiesArgs
 *         {
 *             Model = new AzureNative.MachineLearningServices.Inputs.EndpointDeploymentModelArgs
 *             {
 *                 Format = "OpenAI",
 *                 Name = "text-davinci-003",
 *                 Version = "1",
 *             },
 *             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.NewConnectionDeployment(ctx, "connectionDeployment", &machinelearningservices.ConnectionDeploymentArgs{
 * 			ConnectionName: pulumi.String("testConnection"),
 * 			DeploymentName: pulumi.String("text-davinci-003"),
 * 			Properties: &machinelearningservices.EndpointDeploymentResourcePropertiesArgs{
 * 				Model: &machinelearningservices.EndpointDeploymentModelArgs{
 * 					Format:  pulumi.String("OpenAI"),
 * 					Name:    pulumi.String("text-davinci-003"),
 * 					Version: pulumi.String("1"),
 * 				},
 * 				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.ConnectionDeployment;
 * import com.pulumi.azurenative.machinelearningservices.ConnectionDeploymentArgs;
 * import com.pulumi.azurenative.machinelearningservices.inputs.EndpointDeploymentResourcePropertiesArgs;
 * import com.pulumi.azurenative.machinelearningservices.inputs.EndpointDeploymentModelArgs;
 * 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 connectionDeployment = new ConnectionDeployment("connectionDeployment", ConnectionDeploymentArgs.builder()
 *             .connectionName("testConnection")
 *             .deploymentName("text-davinci-003")
 *             .properties(EndpointDeploymentResourcePropertiesArgs.builder()
 *                 .model(EndpointDeploymentModelArgs.builder()
 *                     .format("OpenAI")
 *                     .name("text-davinci-003")
 *                     .version("1")
 *                     .build())
 *                 .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:ConnectionDeployment text-davinci-003 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}
 * ```
 * @property connectionName Friendly name of the workspace connection
 * @property deploymentName Name of the deployment resource
 * @property properties
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property sku
 * @property workspaceName Azure Machine Learning Workspace Name
 */
public data class ConnectionDeploymentArgs(
    public val connectionName: Output? = null,
    public val deploymentName: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
    public val workspaceName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.ConnectionDeploymentArgs =
        com.pulumi.azurenative.machinelearningservices.ConnectionDeploymentArgs.builder()
            .connectionName(connectionName?.applyValue({ args0 -> args0 }))
            .deploymentName(deploymentName?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConnectionDeploymentArgs].
 */
@PulumiTagMarker
public class ConnectionDeploymentArgsBuilder internal constructor() {
    private var connectionName: Output? = null

    private var deploymentName: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    private var workspaceName: Output? = null

    /**
     * @param value Friendly name of the workspace connection
     */
    @JvmName("numrcxtcsqyevnet")
    public suspend fun connectionName(`value`: Output) {
        this.connectionName = value
    }

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

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

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

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

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

    /**
     * @param value Friendly name of the workspace connection
     */
    @JvmName("uhacncrsyatchrkl")
    public suspend fun connectionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionName = mapped
    }

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

    /**
     * @param value
     */
    @JvmName("wbfbcppwpooaygna")
    public suspend fun properties(`value`: EndpointDeploymentResourcePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument
     */
    @JvmName("tduwugdtljgidnvn")
    public suspend fun properties(argument: suspend EndpointDeploymentResourcePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = EndpointDeploymentResourcePropertiesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("qyuhonsrnsnwomli")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value
     */
    @JvmName("jfwocanoluddqvih")
    public suspend fun sku(`value`: CognitiveServicesSkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument
     */
    @JvmName("hnklkobmidfvfbnp")
    public suspend fun sku(argument: suspend CognitiveServicesSkuArgsBuilder.() -> Unit) {
        val toBeMapped = CognitiveServicesSkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

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

    internal fun build(): ConnectionDeploymentArgs = ConnectionDeploymentArgs(
        connectionName = connectionName,
        deploymentName = deploymentName,
        properties = properties,
        resourceGroupName = resourceGroupName,
        sku = sku,
        workspaceName = workspaceName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy