AccountArgs

data class AccountArgs(val accountName: Output<String>? = null, val identity: Output<IdentityArgs>? = null, val kind: Output<String>? = null, val location: Output<String>? = null, val properties: Output<AccountPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<SkuArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AccountArgs>

Cognitive Services account is an Azure resource representing the provisioned account, it's type, location and SKU. 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 Account

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var account = new AzureNative.CognitiveServices.Account("account", new()
{
AccountName = "testCreate1",
Identity = new AzureNative.CognitiveServices.Inputs.IdentityArgs
{
Type = AzureNative.CognitiveServices.ResourceIdentityType.SystemAssigned,
},
Kind = "Emotion",
Location = "West US",
Properties = new AzureNative.CognitiveServices.Inputs.AccountPropertiesArgs
{
Encryption = new AzureNative.CognitiveServices.Inputs.EncryptionArgs
{
KeySource = AzureNative.CognitiveServices.KeySource.Microsoft_KeyVault,
KeyVaultProperties = new AzureNative.CognitiveServices.Inputs.KeyVaultPropertiesArgs
{
KeyName = "KeyName",
KeyVaultUri = "https://pltfrmscrts-use-pc-dev.vault.azure.net/",
KeyVersion = "891CF236-D241-4738-9462-D506AF493DFA",
},
},
UserOwnedStorage = new[]
{
new AzureNative.CognitiveServices.Inputs.UserOwnedStorageArgs
{
ResourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
},
},
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.CognitiveServices.Inputs.SkuArgs
{
Name = "S0",
},
});
});
package main
import (
cognitiveservices "github.com/pulumi/pulumi-azure-native-sdk/cognitiveservices/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cognitiveservices.NewAccount(ctx, "account", &cognitiveservices.AccountArgs{
AccountName: pulumi.String("testCreate1"),
Identity: &cognitiveservices.IdentityArgs{
Type: cognitiveservices.ResourceIdentityTypeSystemAssigned,
},
Kind: pulumi.String("Emotion"),
Location: pulumi.String("West US"),
Properties: &cognitiveservices.AccountPropertiesArgs{
Encryption: &cognitiveservices.EncryptionArgs{
KeySource: pulumi.String(cognitiveservices.KeySource_Microsoft_KeyVault),
KeyVaultProperties: &cognitiveservices.KeyVaultPropertiesArgs{
KeyName: pulumi.String("KeyName"),
KeyVaultUri: pulumi.String("https://pltfrmscrts-use-pc-dev.vault.azure.net/"),
KeyVersion: pulumi.String("891CF236-D241-4738-9462-D506AF493DFA"),
},
},
UserOwnedStorage: cognitiveservices.UserOwnedStorageArray{
&cognitiveservices.UserOwnedStorageArgs{
ResourceId: pulumi.String("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
},
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &cognitiveservices.SkuArgs{
Name: pulumi.String("S0"),
},
})
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.azurenative.cognitiveservices.Account;
import com.pulumi.azurenative.cognitiveservices.AccountArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.IdentityArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.AccountPropertiesArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.EncryptionArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.KeyVaultPropertiesArgs;
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 account = new Account("account", AccountArgs.builder()
.accountName("testCreate1")
.identity(IdentityArgs.builder()
.type("SystemAssigned")
.build())
.kind("Emotion")
.location("West US")
.properties(AccountPropertiesArgs.builder()
.encryption(EncryptionArgs.builder()
.keySource("Microsoft.KeyVault")
.keyVaultProperties(KeyVaultPropertiesArgs.builder()
.keyName("KeyName")
.keyVaultUri("https://pltfrmscrts-use-pc-dev.vault.azure.net/")
.keyVersion("891CF236-D241-4738-9462-D506AF493DFA")
.build())
.build())
.userOwnedStorage(UserOwnedStorageArgs.builder()
.resourceId("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount")
.build())
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.name("S0")
.build())
.build());
}
}

Create Account Min

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var account = new AzureNative.CognitiveServices.Account("account", new()
{
AccountName = "testCreate1",
Identity = new AzureNative.CognitiveServices.Inputs.IdentityArgs
{
Type = AzureNative.CognitiveServices.ResourceIdentityType.SystemAssigned,
},
Kind = "CognitiveServices",
Location = "West US",
Properties = null,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.CognitiveServices.Inputs.SkuArgs
{
Name = "S0",
},
});
});
package main
import (
cognitiveservices "github.com/pulumi/pulumi-azure-native-sdk/cognitiveservices/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cognitiveservices.NewAccount(ctx, "account", &cognitiveservices.AccountArgs{
AccountName: pulumi.String("testCreate1"),
Identity: &cognitiveservices.IdentityArgs{
Type: cognitiveservices.ResourceIdentityTypeSystemAssigned,
},
Kind: pulumi.String("CognitiveServices"),
Location: pulumi.String("West US"),
Properties: &cognitiveservices.AccountPropertiesArgs{},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &cognitiveservices.SkuArgs{
Name: pulumi.String("S0"),
},
})
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.azurenative.cognitiveservices.Account;
import com.pulumi.azurenative.cognitiveservices.AccountArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.IdentityArgs;
import com.pulumi.azurenative.cognitiveservices.inputs.AccountPropertiesArgs;
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 account = new Account("account", AccountArgs.builder()
.accountName("testCreate1")
.identity(IdentityArgs.builder()
.type("SystemAssigned")
.build())
.kind("CognitiveServices")
.location("West US")
.properties(AccountPropertiesArgs.builder()
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.name("S0")
.build())
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:cognitiveservices:Account testCreate1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}

Constructors

Link copied to clipboard
constructor(accountName: Output<String>? = null, identity: Output<IdentityArgs>? = null, kind: Output<String>? = null, location: Output<String>? = null, properties: Output<AccountPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, sku: Output<SkuArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val accountName: Output<String>? = null

The name of Cognitive Services account.

Link copied to clipboard
val identity: Output<IdentityArgs>? = null

Identity for the resource.

Link copied to clipboard
val kind: Output<String>? = null

The Kind of the resource.

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard
val properties: Output<AccountPropertiesArgs>? = null

Properties of Cognitive Services account.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val sku: Output<SkuArgs>? = null

The resource model definition representing SKU

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Functions

Link copied to clipboard
open override fun toJava(): AccountArgs