Shared Commitment Plan Args
data class SharedCommitmentPlanArgs(val commitmentPlanName: Output<String>? = null, val kind: Output<String>? = null, val location: Output<String>? = null, val properties: Output<CommitmentPlanPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<SkuArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<SharedCommitmentPlanArgs>
Cognitive Services account commitment plan. Uses Azure REST API version 2024-10-01. In version 2.x of the Azure Native provider, it used API version 2023-05-01. Other available API versions: 2023-05-01, 2023-10-01-preview, 2024-04-01-preview, 2024-06-01-preview, 2025-04-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cognitiveservices [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create Commitment Plan
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sharedCommitmentPlan = new AzureNative.CognitiveServices.SharedCommitmentPlan("sharedCommitmentPlan", new()
{
CommitmentPlanName = "commitmentPlanName",
Kind = "SpeechServices",
Location = "West US",
Properties = new AzureNative.CognitiveServices.Inputs.CommitmentPlanPropertiesArgs
{
AutoRenew = true,
Current = new AzureNative.CognitiveServices.Inputs.CommitmentPeriodArgs
{
Tier = "T1",
},
HostingModel = AzureNative.CognitiveServices.HostingModel.Web,
PlanType = "STT",
},
ResourceGroupName = "resourceGroupName",
Sku = new AzureNative.CognitiveServices.Inputs.SkuArgs
{
Name = "S0",
},
});
});
Content copied to clipboard
package main
import (
cognitiveservices "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.NewSharedCommitmentPlan(ctx, "sharedCommitmentPlan", &cognitiveservices.SharedCommitmentPlanArgs{
CommitmentPlanName: pulumi.String("commitmentPlanName"),
Kind: pulumi.String("SpeechServices"),
Location: pulumi.String("West US"),
Properties: &cognitiveservices.CommitmentPlanPropertiesArgs{
AutoRenew: pulumi.Bool(true),
Current: &cognitiveservices.CommitmentPeriodArgs{
Tier: pulumi.String("T1"),
},
HostingModel: pulumi.String(cognitiveservices.HostingModelWeb),
PlanType: pulumi.String("STT"),
},
ResourceGroupName: pulumi.String("resourceGroupName"),
Sku: &cognitiveservices.SkuArgs{
Name: pulumi.String("S0"),
},
})
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.SharedCommitmentPlan;
import com.pulumi.azurenative.cognitiveservices.SharedCommitmentPlanArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.CommitmentPlanPropertiesArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.CommitmentPeriodArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.SkuArgs;
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 sharedCommitmentPlan = new SharedCommitmentPlan("sharedCommitmentPlan", SharedCommitmentPlanArgs.builder()
.commitmentPlanName("commitmentPlanName")
.kind("SpeechServices")
.location("West US")
.properties(CommitmentPlanPropertiesArgs.builder()
.autoRenew(true)
.current(CommitmentPeriodArgs.builder()
.tier("T1")
.build())
.hostingModel("Web")
.planType("STT")
.build())
.resourceGroupName("resourceGroupName")
.sku(SkuArgs.builder()
.name("S0")
.build())
.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:SharedCommitmentPlan commitmentPlanName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}
Content copied to clipboard