We recommend using Azure Native.
Manages a Cognitive Account Project.
Note: Cognitive Account Projects can only be created under a Cognitive Account that has
project_management_enabled </span>= true,kind = "AIServices", a managed identity configured, and acustom_subdomain_namespecified.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleAccount = new azure.cognitive.Account("example", {
name: "example-account",
location: example.location,
resourceGroupName: example.name,
kind: "AIServices",
skuName: "S0",
projectManagementEnabled: true,
customSubdomainName: "example-account-subdomain",
identity: {
type: "SystemAssigned",
},
});
const exampleAccountProject = new azure.cognitive.AccountProject("example", {
name: "example-project",
cognitiveAccountId: exampleAccount.id,
location: example.location,
description: "Example cognitive services project",
displayName: "Example Project",
identity: {
type: "SystemAssigned",
},
tags: {
Environment: "test",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_account = azure.cognitive.Account("example",
name="example-account",
location=example.location,
resource_group_name=example.name,
kind="AIServices",
sku_name="S0",
project_management_enabled=True,
custom_subdomain_name="example-account-subdomain",
identity={
"type": "SystemAssigned",
})
example_account_project = azure.cognitive.AccountProject("example",
name="example-project",
cognitive_account_id=example_account.id,
location=example.location,
description="Example cognitive services project",
display_name="Example Project",
identity={
"type": "SystemAssigned",
},
tags={
"Environment": "test",
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
Name: pulumi.String("example-account"),
Location: example.Location,
ResourceGroupName: example.Name,
Kind: pulumi.String("AIServices"),
SkuName: pulumi.String("S0"),
ProjectManagementEnabled: pulumi.Bool(true),
CustomSubdomainName: pulumi.String("example-account-subdomain"),
Identity: &cognitive.AccountIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
})
if err != nil {
return err
}
_, err = cognitive.NewAccountProject(ctx, "example", &cognitive.AccountProjectArgs{
Name: pulumi.String("example-project"),
CognitiveAccountId: exampleAccount.ID(),
Location: example.Location,
Description: pulumi.String("Example cognitive services project"),
DisplayName: pulumi.String("Example Project"),
Identity: &cognitive.AccountProjectIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
Tags: pulumi.StringMap{
"Environment": pulumi.String("test"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleAccount = new Azure.Cognitive.Account("example", new()
{
Name = "example-account",
Location = example.Location,
ResourceGroupName = example.Name,
Kind = "AIServices",
SkuName = "S0",
ProjectManagementEnabled = true,
CustomSubdomainName = "example-account-subdomain",
Identity = new Azure.Cognitive.Inputs.AccountIdentityArgs
{
Type = "SystemAssigned",
},
});
var exampleAccountProject = new Azure.Cognitive.AccountProject("example", new()
{
Name = "example-project",
CognitiveAccountId = exampleAccount.Id,
Location = example.Location,
Description = "Example cognitive services project",
DisplayName = "Example Project",
Identity = new Azure.Cognitive.Inputs.AccountProjectIdentityArgs
{
Type = "SystemAssigned",
},
Tags =
{
{ "Environment", "test" },
},
});
});
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.inputs.AccountIdentityArgs;
import com.pulumi.azure.cognitive.AccountProject;
import com.pulumi.azure.cognitive.AccountProjectArgs;
import com.pulumi.azure.cognitive.inputs.AccountProjectIdentityArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("example-account")
.location(example.location())
.resourceGroupName(example.name())
.kind("AIServices")
.skuName("S0")
.projectManagementEnabled(true)
.customSubdomainName("example-account-subdomain")
.identity(AccountIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleAccountProject = new AccountProject("exampleAccountProject", AccountProjectArgs.builder()
.name("example-project")
.cognitiveAccountId(exampleAccount.id())
.location(example.location())
.description("Example cognitive services project")
.displayName("Example Project")
.identity(AccountProjectIdentityArgs.builder()
.type("SystemAssigned")
.build())
.tags(Map.of("Environment", "test"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleAccount:
type: azure:cognitive:Account
name: example
properties:
name: example-account
location: ${example.location}
resourceGroupName: ${example.name}
kind: AIServices
skuName: S0
projectManagementEnabled: true
customSubdomainName: example-account-subdomain
identity:
type: SystemAssigned
exampleAccountProject:
type: azure:cognitive:AccountProject
name: example
properties:
name: example-project
cognitiveAccountId: ${exampleAccount.id}
location: ${example.location}
description: Example cognitive services project
displayName: Example Project
identity:
type: SystemAssigned
tags:
Environment: test
API Providers
This resource uses the following Azure API Providers:
Microsoft.CognitiveServices- 2025-06-01
Create AccountProject Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccountProject(name: string, args: AccountProjectArgs, opts?: CustomResourceOptions);@overload
def AccountProject(resource_name: str,
args: AccountProjectArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccountProject(resource_name: str,
opts: Optional[ResourceOptions] = None,
cognitive_account_id: Optional[str] = None,
identity: Optional[AccountProjectIdentityArgs] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewAccountProject(ctx *Context, name string, args AccountProjectArgs, opts ...ResourceOption) (*AccountProject, error)public AccountProject(string name, AccountProjectArgs args, CustomResourceOptions? opts = null)
public AccountProject(String name, AccountProjectArgs args)
public AccountProject(String name, AccountProjectArgs args, CustomResourceOptions options)
type: azure:cognitive:AccountProject
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccountProjectArgs
- 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 AccountProjectArgs
- 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 AccountProjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountProjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountProjectArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var accountProjectResource = new Azure.Cognitive.AccountProject("accountProjectResource", new()
{
CognitiveAccountId = "string",
Identity = new Azure.Cognitive.Inputs.AccountProjectIdentityArgs
{
Type = "string",
IdentityIds = new[]
{
"string",
},
PrincipalId = "string",
TenantId = "string",
},
Description = "string",
DisplayName = "string",
Location = "string",
Name = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := cognitive.NewAccountProject(ctx, "accountProjectResource", &cognitive.AccountProjectArgs{
CognitiveAccountId: pulumi.String("string"),
Identity: &cognitive.AccountProjectIdentityArgs{
Type: pulumi.String("string"),
IdentityIds: pulumi.StringArray{
pulumi.String("string"),
},
PrincipalId: pulumi.String("string"),
TenantId: pulumi.String("string"),
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Location: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var accountProjectResource = new AccountProject("accountProjectResource", AccountProjectArgs.builder()
.cognitiveAccountId("string")
.identity(AccountProjectIdentityArgs.builder()
.type("string")
.identityIds("string")
.principalId("string")
.tenantId("string")
.build())
.description("string")
.displayName("string")
.location("string")
.name("string")
.tags(Map.of("string", "string"))
.build());
account_project_resource = azure.cognitive.AccountProject("accountProjectResource",
cognitive_account_id="string",
identity={
"type": "string",
"identity_ids": ["string"],
"principal_id": "string",
"tenant_id": "string",
},
description="string",
display_name="string",
location="string",
name="string",
tags={
"string": "string",
})
const accountProjectResource = new azure.cognitive.AccountProject("accountProjectResource", {
cognitiveAccountId: "string",
identity: {
type: "string",
identityIds: ["string"],
principalId: "string",
tenantId: "string",
},
description: "string",
displayName: "string",
location: "string",
name: "string",
tags: {
string: "string",
},
});
type: azure:cognitive:AccountProject
properties:
cognitiveAccountId: string
description: string
displayName: string
identity:
identityIds:
- string
principalId: string
tenantId: string
type: string
location: string
name: string
tags:
string: string
AccountProject Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AccountProject resource accepts the following input properties:
- Cognitive
Account stringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- Identity
Account
Project Identity - An
identityblock as defined below. - Description string
- A description of the Cognitive Account Project.
- Display
Name string - The display name of the Cognitive Account Project.
- Location string
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- Name string
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Cognitive
Account stringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- Identity
Account
Project Identity Args - An
identityblock as defined below. - Description string
- A description of the Cognitive Account Project.
- Display
Name string - The display name of the Cognitive Account Project.
- Location string
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- Name string
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- cognitive
Account StringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- identity
Account
Project Identity - An
identityblock as defined below. - description String
- A description of the Cognitive Account Project.
- display
Name String - The display name of the Cognitive Account Project.
- location String
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- name String
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- cognitive
Account stringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- identity
Account
Project Identity - An
identityblock as defined below. - description string
- A description of the Cognitive Account Project.
- display
Name string - The display name of the Cognitive Account Project.
- location string
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- name string
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- cognitive_
account_ strid - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- identity
Account
Project Identity Args - An
identityblock as defined below. - description str
- A description of the Cognitive Account Project.
- display_
name str - The display name of the Cognitive Account Project.
- location str
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- name str
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- cognitive
Account StringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- identity Property Map
- An
identityblock as defined below. - description String
- A description of the Cognitive Account Project.
- display
Name String - The display name of the Cognitive Account Project.
- location String
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- name String
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccountProject resource produces the following output properties:
Look up Existing AccountProject Resource
Get an existing AccountProject 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?: AccountProjectState, opts?: CustomResourceOptions): AccountProject@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cognitive_account_id: Optional[str] = None,
default: Optional[bool] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
endpoints: Optional[Mapping[str, str]] = None,
identity: Optional[AccountProjectIdentityArgs] = None,
location: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> AccountProjectfunc GetAccountProject(ctx *Context, name string, id IDInput, state *AccountProjectState, opts ...ResourceOption) (*AccountProject, error)public static AccountProject Get(string name, Input<string> id, AccountProjectState? state, CustomResourceOptions? opts = null)public static AccountProject get(String name, Output<String> id, AccountProjectState state, CustomResourceOptions options)resources: _: type: azure:cognitive:AccountProject get: id: ${id}- 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 Account where the Project should exist. Changing this forces a new resource to be created.
- Default bool
- Whether this project is the default project for the Cognitive Account.
- Description string
- A description of the Cognitive Account Project.
- Display
Name string - The display name of the Cognitive Account Project.
- Endpoints Dictionary<string, string>
- A mapping of endpoint names to endpoint URLs for the project.
- Identity
Account
Project Identity - An
identityblock as defined below. - Location string
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- Name string
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Cognitive
Account stringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- Default bool
- Whether this project is the default project for the Cognitive Account.
- Description string
- A description of the Cognitive Account Project.
- Display
Name string - The display name of the Cognitive Account Project.
- Endpoints map[string]string
- A mapping of endpoint names to endpoint URLs for the project.
- Identity
Account
Project Identity Args - An
identityblock as defined below. - Location string
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- Name string
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- cognitive
Account StringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- default_ Boolean
- Whether this project is the default project for the Cognitive Account.
- description String
- A description of the Cognitive Account Project.
- display
Name String - The display name of the Cognitive Account Project.
- endpoints Map<String,String>
- A mapping of endpoint names to endpoint URLs for the project.
- identity
Account
Project Identity - An
identityblock as defined below. - location String
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- name String
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- cognitive
Account stringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- default boolean
- Whether this project is the default project for the Cognitive Account.
- description string
- A description of the Cognitive Account Project.
- display
Name string - The display name of the Cognitive Account Project.
- endpoints {[key: string]: string}
- A mapping of endpoint names to endpoint URLs for the project.
- identity
Account
Project Identity - An
identityblock as defined below. - location string
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- name string
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- cognitive_
account_ strid - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- default bool
- Whether this project is the default project for the Cognitive Account.
- description str
- A description of the Cognitive Account Project.
- display_
name str - The display name of the Cognitive Account Project.
- endpoints Mapping[str, str]
- A mapping of endpoint names to endpoint URLs for the project.
- identity
Account
Project Identity Args - An
identityblock as defined below. - location str
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- name str
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- cognitive
Account StringId - The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
- default Boolean
- Whether this project is the default project for the Cognitive Account.
- description String
- A description of the Cognitive Account Project.
- display
Name String - The display name of the Cognitive Account Project.
- endpoints Map<String>
- A mapping of endpoint names to endpoint URLs for the project.
- identity Property Map
- An
identityblock as defined below. - location String
- The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
- name String
- The name of the Cognitive Account Project. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
Supporting Types
AccountProjectIdentity, AccountProjectIdentityArgs
- Type string
- Specifies the type of Managed Service Identity that should be configured on this Cognitive Account Project. Possible values are
SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both). - Identity
Ids List<string> - Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cognitive Account Project.
- Principal
Id string - The Principal ID associated with this Managed Service Identity.
- Tenant
Id string - The Tenant ID associated with this Managed Service Identity.
- Type string
- Specifies the type of Managed Service Identity that should be configured on this Cognitive Account Project. Possible values are
SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both). - Identity
Ids []string - Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cognitive Account Project.
- Principal
Id string - The Principal ID associated with this Managed Service Identity.
- Tenant
Id string - The Tenant ID associated with this Managed Service Identity.
- type String
- Specifies the type of Managed Service Identity that should be configured on this Cognitive Account Project. Possible values are
SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both). - identity
Ids List<String> - Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cognitive Account Project.
- principal
Id String - The Principal ID associated with this Managed Service Identity.
- tenant
Id String - The Tenant ID associated with this Managed Service Identity.
- type string
- Specifies the type of Managed Service Identity that should be configured on this Cognitive Account Project. Possible values are
SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both). - identity
Ids string[] - Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cognitive Account Project.
- principal
Id string - The Principal ID associated with this Managed Service Identity.
- tenant
Id string - The Tenant ID associated with this Managed Service Identity.
- type str
- Specifies the type of Managed Service Identity that should be configured on this Cognitive Account Project. Possible values are
SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both). - identity_
ids Sequence[str] - Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cognitive Account Project.
- principal_
id str - The Principal ID associated with this Managed Service Identity.
- tenant_
id str - The Tenant ID associated with this Managed Service Identity.
- type String
- Specifies the type of Managed Service Identity that should be configured on this Cognitive Account Project. Possible values are
SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both). - identity
Ids List<String> - Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cognitive Account Project.
- principal
Id String - The Principal ID associated with this Managed Service Identity.
- tenant
Id String - The Tenant ID associated with this Managed Service Identity.
Import
Cognitive Account Projects can be imported using the resource id, e.g.
$ pulumi import azure:cognitive/accountProject:AccountProject example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1/projects/project1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
