1. Packages
  2. Azure Classic
  3. API Docs
  4. cognitive
  5. getAccountProject

We recommend using Azure Native.

Viewing docs for Azure v6.33.0
published on Monday, Feb 23, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v6.33.0
published on Monday, Feb 23, 2026 by Pulumi

    Use this data source to access information about an existing Cognitive Services Account Project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.cognitive.getAccountProject({
        name: "example-project",
        cognitiveAccountName: "example-account",
        resourceGroupName: "example-resources",
    });
    export const id = example.then(example => example.id);
    export const location = example.then(example => example.location);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.cognitive.get_account_project(name="example-project",
        cognitive_account_name="example-account",
        resource_group_name="example-resources")
    pulumi.export("id", example.id)
    pulumi.export("location", example.location)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := cognitive.LookupAccountProject(ctx, &cognitive.LookupAccountProjectArgs{
    			Name:                 "example-project",
    			CognitiveAccountName: "example-account",
    			ResourceGroupName:    "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		ctx.Export("location", example.Location)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Cognitive.GetAccountProject.Invoke(new()
        {
            Name = "example-project",
            CognitiveAccountName = "example-account",
            ResourceGroupName = "example-resources",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getAccountProjectResult => getAccountProjectResult.Id),
            ["location"] = example.Apply(getAccountProjectResult => getAccountProjectResult.Location),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.cognitive.CognitiveFunctions;
    import com.pulumi.azure.cognitive.inputs.GetAccountProjectArgs;
    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) {
            final var example = CognitiveFunctions.getAccountProject(GetAccountProjectArgs.builder()
                .name("example-project")
                .cognitiveAccountName("example-account")
                .resourceGroupName("example-resources")
                .build());
    
            ctx.export("id", example.id());
            ctx.export("location", example.location());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: azure:cognitive:getAccountProject
          arguments:
            name: example-project
            cognitiveAccountName: example-account
            resourceGroupName: example-resources
    outputs:
      id: ${example.id}
      location: ${example.location}
    

    API Providers

    This data source uses the following Azure API Providers:

    • Microsoft.CognitiveServices - 2025-06-01

    Using getAccountProject

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAccountProject(args: GetAccountProjectArgs, opts?: InvokeOptions): Promise<GetAccountProjectResult>
    function getAccountProjectOutput(args: GetAccountProjectOutputArgs, opts?: InvokeOptions): Output<GetAccountProjectResult>
    def get_account_project(cognitive_account_name: Optional[str] = None,
                            name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetAccountProjectResult
    def get_account_project_output(cognitive_account_name: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            resource_group_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetAccountProjectResult]
    func LookupAccountProject(ctx *Context, args *LookupAccountProjectArgs, opts ...InvokeOption) (*LookupAccountProjectResult, error)
    func LookupAccountProjectOutput(ctx *Context, args *LookupAccountProjectOutputArgs, opts ...InvokeOption) LookupAccountProjectResultOutput

    > Note: This function is named LookupAccountProject in the Go SDK.

    public static class GetAccountProject 
    {
        public static Task<GetAccountProjectResult> InvokeAsync(GetAccountProjectArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountProjectResult> Invoke(GetAccountProjectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccountProjectResult> getAccountProject(GetAccountProjectArgs args, InvokeOptions options)
    public static Output<GetAccountProjectResult> getAccountProject(GetAccountProjectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:cognitive/getAccountProject:getAccountProject
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CognitiveAccountName string
    The name of the Cognitive Services Account in which the Project exists.
    Name string
    The name of the Cognitive Services Account Project.
    ResourceGroupName string
    The name of the Resource Group where the Cognitive Services Account exists.
    CognitiveAccountName string
    The name of the Cognitive Services Account in which the Project exists.
    Name string
    The name of the Cognitive Services Account Project.
    ResourceGroupName string
    The name of the Resource Group where the Cognitive Services Account exists.
    cognitiveAccountName String
    The name of the Cognitive Services Account in which the Project exists.
    name String
    The name of the Cognitive Services Account Project.
    resourceGroupName String
    The name of the Resource Group where the Cognitive Services Account exists.
    cognitiveAccountName string
    The name of the Cognitive Services Account in which the Project exists.
    name string
    The name of the Cognitive Services Account Project.
    resourceGroupName string
    The name of the Resource Group where the Cognitive Services Account exists.
    cognitive_account_name str
    The name of the Cognitive Services Account in which the Project exists.
    name str
    The name of the Cognitive Services Account Project.
    resource_group_name str
    The name of the Resource Group where the Cognitive Services Account exists.
    cognitiveAccountName String
    The name of the Cognitive Services Account in which the Project exists.
    name String
    The name of the Cognitive Services Account Project.
    resourceGroupName String
    The name of the Resource Group where the Cognitive Services Account exists.

    getAccountProject Result

    The following output properties are available:

    CognitiveAccountName string
    Default bool
    Whether this is the default project for the Cognitive Services Account.
    Description string
    The description of the Cognitive Services Account Project.
    DisplayName string
    The display name of the Cognitive Services Account Project.
    Endpoints Dictionary<string, string>
    A mapping of endpoint names to endpoint URLs for the Cognitive Services Account Project.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetAccountProjectIdentity>
    An identity block as defined below.
    Location string
    The Azure Region where the Cognitive Services Account Project exists.
    Name string
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Cognitive Services Account Project.
    CognitiveAccountName string
    Default bool
    Whether this is the default project for the Cognitive Services Account.
    Description string
    The description of the Cognitive Services Account Project.
    DisplayName string
    The display name of the Cognitive Services Account Project.
    Endpoints map[string]string
    A mapping of endpoint names to endpoint URLs for the Cognitive Services Account Project.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetAccountProjectIdentity
    An identity block as defined below.
    Location string
    The Azure Region where the Cognitive Services Account Project exists.
    Name string
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags assigned to the Cognitive Services Account Project.
    cognitiveAccountName String
    default_ Boolean
    Whether this is the default project for the Cognitive Services Account.
    description String
    The description of the Cognitive Services Account Project.
    displayName String
    The display name of the Cognitive Services Account Project.
    endpoints Map<String,String>
    A mapping of endpoint names to endpoint URLs for the Cognitive Services Account Project.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetAccountProjectIdentity>
    An identity block as defined below.
    location String
    The Azure Region where the Cognitive Services Account Project exists.
    name String
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags assigned to the Cognitive Services Account Project.
    cognitiveAccountName string
    default boolean
    Whether this is the default project for the Cognitive Services Account.
    description string
    The description of the Cognitive Services Account Project.
    displayName string
    The display name of the Cognitive Services Account Project.
    endpoints {[key: string]: string}
    A mapping of endpoint names to endpoint URLs for the Cognitive Services Account Project.
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetAccountProjectIdentity[]
    An identity block as defined below.
    location string
    The Azure Region where the Cognitive Services Account Project exists.
    name string
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags assigned to the Cognitive Services Account Project.
    cognitive_account_name str
    default bool
    Whether this is the default project for the Cognitive Services Account.
    description str
    The description of the Cognitive Services Account Project.
    display_name str
    The display name of the Cognitive Services Account Project.
    endpoints Mapping[str, str]
    A mapping of endpoint names to endpoint URLs for the Cognitive Services Account Project.
    id str
    The provider-assigned unique ID for this managed resource.
    identities Sequence[GetAccountProjectIdentity]
    An identity block as defined below.
    location str
    The Azure Region where the Cognitive Services Account Project exists.
    name str
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags assigned to the Cognitive Services Account Project.
    cognitiveAccountName String
    default Boolean
    Whether this is the default project for the Cognitive Services Account.
    description String
    The description of the Cognitive Services Account Project.
    displayName String
    The display name of the Cognitive Services Account Project.
    endpoints Map<String>
    A mapping of endpoint names to endpoint URLs for the Cognitive Services Account Project.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    An identity block as defined below.
    location String
    The Azure Region where the Cognitive Services Account Project exists.
    name String
    resourceGroupName String
    tags Map<String>
    A mapping of tags assigned to the Cognitive Services Account Project.

    Supporting Types

    GetAccountProjectIdentity

    IdentityIds List<string>
    The list of User Assigned Managed Identity IDs assigned to this Cognitive Services Account Project.
    PrincipalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    TenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    Type string
    The type of Managed Service Identity that is configured on this Cognitive Services Account Project.
    IdentityIds []string
    The list of User Assigned Managed Identity IDs assigned to this Cognitive Services Account Project.
    PrincipalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    TenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    Type string
    The type of Managed Service Identity that is configured on this Cognitive Services Account Project.
    identityIds List<String>
    The list of User Assigned Managed Identity IDs assigned to this Cognitive Services Account Project.
    principalId String
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    tenantId String
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    type String
    The type of Managed Service Identity that is configured on this Cognitive Services Account Project.
    identityIds string[]
    The list of User Assigned Managed Identity IDs assigned to this Cognitive Services Account Project.
    principalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    tenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    type string
    The type of Managed Service Identity that is configured on this Cognitive Services Account Project.
    identity_ids Sequence[str]
    The list of User Assigned Managed Identity IDs assigned to this Cognitive Services Account Project.
    principal_id str
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    tenant_id str
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    type str
    The type of Managed Service Identity that is configured on this Cognitive Services Account Project.
    identityIds List<String>
    The list of User Assigned Managed Identity IDs assigned to this Cognitive Services Account Project.
    principalId String
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    tenantId String
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Cognitive Services Account Project.
    type String
    The type of Managed Service Identity that is configured on this Cognitive Services Account Project.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v6.33.0
    published on Monday, Feb 23, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.