We recommend using Azure Native.
azure.cognitive.Deployment
Explore with Pulumi AI
Manages a Cognitive Services Account Deployment.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAccount = new Azure.Cognitive.Account("exampleAccount", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Kind = "OpenAI",
SkuName = "S0",
});
var exampleDeployment = new Azure.Cognitive.Deployment("exampleDeployment", new()
{
CognitiveAccountId = exampleAccount.Id,
Model = new Azure.Cognitive.Inputs.DeploymentModelArgs
{
Format = "OpenAI",
Name = "text-curie-001",
Version = "1",
},
Scale = new Azure.Cognitive.Inputs.DeploymentScaleArgs
{
Type = "Standard",
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cognitive"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := cognitive.NewAccount(ctx, "exampleAccount", &cognitive.AccountArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
Kind: pulumi.String("OpenAI"),
SkuName: pulumi.String("S0"),
})
if err != nil {
return err
}
_, err = cognitive.NewDeployment(ctx, "exampleDeployment", &cognitive.DeploymentArgs{
CognitiveAccountId: exampleAccount.ID(),
Model: &cognitive.DeploymentModelArgs{
Format: pulumi.String("OpenAI"),
Name: pulumi.String("text-curie-001"),
Version: pulumi.String("1"),
},
Scale: &cognitive.DeploymentScaleArgs{
Type: pulumi.String("Standard"),
},
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.cognitive.Account;
import com.pulumi.azure.cognitive.AccountArgs;
import com.pulumi.azure.cognitive.Deployment;
import com.pulumi.azure.cognitive.DeploymentArgs;
import com.pulumi.azure.cognitive.inputs.DeploymentModelArgs;
import com.pulumi.azure.cognitive.inputs.DeploymentScaleArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.kind("OpenAI")
.skuName("S0")
.build());
var exampleDeployment = new Deployment("exampleDeployment", DeploymentArgs.builder()
.cognitiveAccountId(exampleAccount.id())
.model(DeploymentModelArgs.builder()
.format("OpenAI")
.name("text-curie-001")
.version("1")
.build())
.scale(DeploymentScaleArgs.builder()
.type("Standard")
.build())
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.cognitive.Account("exampleAccount",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
kind="OpenAI",
sku_name="S0")
example_deployment = azure.cognitive.Deployment("exampleDeployment",
cognitive_account_id=example_account.id,
model=azure.cognitive.DeploymentModelArgs(
format="OpenAI",
name="text-curie-001",
version="1",
),
scale=azure.cognitive.DeploymentScaleArgs(
type="Standard",
))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.cognitive.Account("exampleAccount", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
kind: "OpenAI",
skuName: "S0",
});
const exampleDeployment = new azure.cognitive.Deployment("exampleDeployment", {
cognitiveAccountId: exampleAccount.id,
model: {
format: "OpenAI",
name: "text-curie-001",
version: "1",
},
scale: {
type: "Standard",
},
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleAccount:
type: azure:cognitive:Account
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
kind: OpenAI
skuName: S0
exampleDeployment:
type: azure:cognitive:Deployment
properties:
cognitiveAccountId: ${exampleAccount.id}
model:
format: OpenAI
name: text-curie-001
version: '1'
scale:
type: Standard
Create Deployment Resource
new Deployment(name: string, args: DeploymentArgs, opts?: CustomResourceOptions);
@overload
def Deployment(resource_name: str,
opts: Optional[ResourceOptions] = None,
cognitive_account_id: Optional[str] = None,
model: Optional[DeploymentModelArgs] = None,
name: Optional[str] = None,
rai_policy_name: Optional[str] = None,
scale: Optional[DeploymentScaleArgs] = None)
@overload
def Deployment(resource_name: str,
args: DeploymentArgs,
opts: Optional[ResourceOptions] = None)
func NewDeployment(ctx *Context, name string, args DeploymentArgs, opts ...ResourceOption) (*Deployment, error)
public Deployment(string name, DeploymentArgs args, CustomResourceOptions? opts = null)
public Deployment(String name, DeploymentArgs args)
public Deployment(String name, DeploymentArgs args, CustomResourceOptions options)
type: azure:cognitive:Deployment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeploymentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DeploymentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DeploymentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeploymentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeploymentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Deployment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Deployment resource accepts the following input properties:
- Cognitive
Account stringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- Model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- Scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.- Name string
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- Rai
Policy stringName The name of RAI policy. Changing this forces a new resource to be created.
- Cognitive
Account stringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- Model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- Scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.- Name string
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- Rai
Policy stringName The name of RAI policy. Changing this forces a new resource to be created.
- cognitive
Account StringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.- name String
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- rai
Policy StringName The name of RAI policy. Changing this forces a new resource to be created.
- cognitive
Account stringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.- name string
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- rai
Policy stringName The name of RAI policy. Changing this forces a new resource to be created.
- cognitive_
account_ strid The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.- name str
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- rai_
policy_ strname The name of RAI policy. Changing this forces a new resource to be created.
- cognitive
Account StringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- model Property Map
A
model
block as defined below. Changing this forces a new resource to be created.- scale Property Map
A
scale
block as defined below. Changing this forces a new resource to be created.- name String
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- rai
Policy StringName The name of RAI policy. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Deployment resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing Deployment Resource
Get an existing Deployment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DeploymentState, opts?: CustomResourceOptions): Deployment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cognitive_account_id: Optional[str] = None,
model: Optional[DeploymentModelArgs] = None,
name: Optional[str] = None,
rai_policy_name: Optional[str] = None,
scale: Optional[DeploymentScaleArgs] = None) -> Deployment
func GetDeployment(ctx *Context, name string, id IDInput, state *DeploymentState, opts ...ResourceOption) (*Deployment, error)
public static Deployment Get(string name, Input<string> id, DeploymentState? state, CustomResourceOptions? opts = null)
public static Deployment get(String name, Output<String> id, DeploymentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cognitive
Account stringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- Model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- Name string
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- Rai
Policy stringName The name of RAI policy. Changing this forces a new resource to be created.
- Scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.
- Cognitive
Account stringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- Model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- Name string
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- Rai
Policy stringName The name of RAI policy. Changing this forces a new resource to be created.
- Scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.
- cognitive
Account StringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- name String
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- rai
Policy StringName The name of RAI policy. Changing this forces a new resource to be created.
- scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.
- cognitive
Account stringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- name string
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- rai
Policy stringName The name of RAI policy. Changing this forces a new resource to be created.
- scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.
- cognitive_
account_ strid The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- model
Deployment
Model Args A
model
block as defined below. Changing this forces a new resource to be created.- name str
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- rai_
policy_ strname The name of RAI policy. Changing this forces a new resource to be created.
- scale
Deployment
Scale Args A
scale
block as defined below. Changing this forces a new resource to be created.
- cognitive
Account StringId The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
- model Property Map
A
model
block as defined below. Changing this forces a new resource to be created.- name String
The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
- rai
Policy StringName The name of RAI policy. Changing this forces a new resource to be created.
- scale Property Map
A
scale
block as defined below. Changing this forces a new resource to be created.
Supporting Types
DeploymentModel
- Format string
The format of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created. Possible value is
OpenAI
.- Name string
The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created.
- Version string
The version of Cognitive Services Account Deployment model.
- Format string
The format of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created. Possible value is
OpenAI
.- Name string
The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created.
- Version string
The version of Cognitive Services Account Deployment model.
- format String
The format of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created. Possible value is
OpenAI
.- name String
The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created.
- version String
The version of Cognitive Services Account Deployment model.
- format string
The format of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created. Possible value is
OpenAI
.- name string
The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created.
- version string
The version of Cognitive Services Account Deployment model.
- format str
The format of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created. Possible value is
OpenAI
.- name str
The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created.
- version str
The version of Cognitive Services Account Deployment model.
- format String
The format of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created. Possible value is
OpenAI
.- name String
The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created.
- version String
The version of Cognitive Services Account Deployment model.
DeploymentScale
- Type string
Deployment scale type. Possible value is
Standard
. Changing this forces a new resource to be created.
- Type string
Deployment scale type. Possible value is
Standard
. Changing this forces a new resource to be created.
- type String
Deployment scale type. Possible value is
Standard
. Changing this forces a new resource to be created.
- type string
Deployment scale type. Possible value is
Standard
. Changing this forces a new resource to be created.
- type str
Deployment scale type. Possible value is
Standard
. Changing this forces a new resource to be created.
- type String
Deployment scale type. Possible value is
Standard
. Changing this forces a new resource to be created.
Import
Cognitive Services Account Deployment can be imported using the resource id
, e.g.
$ pulumi import azure:cognitive/deployment:Deployment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.CognitiveServices/accounts/account1/deployments/deployment1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.