Deployment Args
data class DeploymentArgs(val accountName: Output<String>? = null, val deploymentName: Output<String>? = null, val properties: Output<DeploymentPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<SkuArgs>? = null) : ConvertibleToJava<DeploymentArgs>
Cognitive Services account deployment. Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2021-10-01. Other available API versions: 2023-10-01-preview.
Example Usage
PutDeployment
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deployment = new AzureNative.CognitiveServices.Deployment("deployment", new()
{
AccountName = "accountName",
DeploymentName = "deploymentName",
Properties = new AzureNative.CognitiveServices.Inputs.DeploymentPropertiesArgs
{
Model = new AzureNative.CognitiveServices.Inputs.DeploymentModelArgs
{
Format = "OpenAI",
Name = "ada",
Version = "1",
},
},
ResourceGroupName = "resourceGroupName",
Sku = new AzureNative.CognitiveServices.Inputs.SkuArgs
{
Capacity = 1,
Name = "Standard",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/cognitiveservices/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cognitiveservices.NewDeployment(ctx, "deployment", &cognitiveservices.DeploymentArgs{
AccountName: pulumi.String("accountName"),
DeploymentName: pulumi.String("deploymentName"),
Properties: cognitiveservices.DeploymentPropertiesResponse{
Model: &cognitiveservices.DeploymentModelArgs{
Format: pulumi.String("OpenAI"),
Name: pulumi.String("ada"),
Version: pulumi.String("1"),
},
},
ResourceGroupName: pulumi.String("resourceGroupName"),
Sku: &cognitiveservices.SkuArgs{
Capacity: pulumi.Int(1),
Name: pulumi.String("Standard"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.cognitiveservices.Deployment;
import com.pulumi.azurenative.cognitiveservices.DeploymentArgs;
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 deployment = new Deployment("deployment", DeploymentArgs.builder()
.accountName("accountName")
.deploymentName("deploymentName")
.properties(Map.of("model", Map.ofEntries(
Map.entry("format", "OpenAI"),
Map.entry("name", "ada"),
Map.entry("version", "1")
)))
.resourceGroupName("resourceGroupName")
.sku(Map.ofEntries(
Map.entry("capacity", 1),
Map.entry("name", "Standard")
))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:cognitiveservices:Deployment deploymentName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}
Content copied to clipboard
Constructors
Link copied to clipboard
fun DeploymentArgs(accountName: Output<String>? = null, deploymentName: Output<String>? = null, properties: Output<DeploymentPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, sku: Output<SkuArgs>? = null)