Account Args
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<CognitiveServicesAccountPropertiesArgs>? = 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, its type, location and SKU. API Version: 2017-04-18.
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.IdentityType.SystemAssigned,
},
Kind = "Emotion",
Location = "West US",
Properties = new AzureNative.CognitiveServices.Inputs.CognitiveServicesAccountPropertiesArgs
{
Encryption = new AzureNative.CognitiveServices.Inputs.EncryptionArgs
{
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",
},
});
});
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.Account;
import com.pulumi.azurenative.cognitiveservices.AccountArgs;
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(Map.of("type", "SystemAssigned"))
.kind("Emotion")
.location("West US")
.properties(Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("keySource", "Microsoft.KeyVault"),
Map.entry("keyVaultProperties", Map.ofEntries(
Map.entry("keyName", "KeyName"),
Map.entry("keyVaultUri", "https://pltfrmscrts-use-pc-dev.vault.azure.net/"),
Map.entry("keyVersion", "891CF236-D241-4738-9462-D506AF493DFA")
))
)),
Map.entry("userOwnedStorage", Map.of("resourceId", "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"))
))
.resourceGroupName("myResourceGroup")
.sku(Map.of("name", "S0"))
.build());
}
}
Content copied to clipboard
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.IdentityType.SystemAssigned,
},
Kind = "CognitiveServices",
Location = "West US",
Properties = null,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.CognitiveServices.Inputs.SkuArgs
{
Name = "S0",
},
});
});
Content copied to clipboard
package main
import (
cognitiveservices "github.com/pulumi/pulumi-azure-native-sdk/cognitiveservices"
"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.IdentityTypeSystemAssigned,
},
Kind: pulumi.String("CognitiveServices"),
Location: pulumi.String("West US"),
Properties: nil,
ResourceGroupName: pulumi.String("myResourceGroup"),
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.Account;
import com.pulumi.azurenative.cognitiveservices.AccountArgs;
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(Map.of("type", "SystemAssigned"))
.kind("CognitiveServices")
.location("West US")
.properties()
.resourceGroupName("myResourceGroup")
.sku(Map.of("name", "S0"))
.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:Account testCreate1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(accountName: Output<String>? = null, identity: Output<IdentityArgs>? = null, kind: Output<String>? = null, location: Output<String>? = null, properties: Output<CognitiveServicesAccountPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, sku: Output<SkuArgs>? = null, tags: Output<Map<String, String>>? = null)
Properties
Link copied to clipboard
The name of Cognitive Services account.
Link copied to clipboard
The identity of Cognitive Services account.
Link copied to clipboard
Properties of Cognitive Services account.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.