Create Cognitive Services Account's Project. Project is a sub-resource of an account which give AI developer it's individual container to work on.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}?api-version=2025-06-01
URI Parameters
| Name |
In |
Required |
Type |
Description |
|
accountName
|
path |
True
|
string
minLength: 2 maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
|
The name of Cognitive Services account.
|
|
projectName
|
path |
True
|
string
minLength: 2 maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
|
The name of Cognitive Services account's project.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
The name of the resource group. The name is case insensitive.
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
The ID of the target subscription.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
The API version to use for this operation.
|
Request Body
| Name |
Type |
Description |
|
identity
|
Identity
|
Identity for the resource.
|
|
location
|
string
|
The geo-location where the resource lives
|
|
properties
|
ProjectProperties
|
Properties of Cognitive Services project.
|
|
tags
|
object
|
Resource tags.
|
Responses
| Name |
Type |
Description |
|
200 OK
|
Project
|
If resource is created successfully or already existed, the service should return 200 (OK).
|
|
201 Created
|
Project
|
If resource is created successfully, the service should return 201 (OK).
|
|
202 Accepted
|
Project
|
HTTP 202 (Accepted) if the operation was successfully started and will complete asynchronously.
|
|
Other Status Codes
|
ErrorResponse
|
Error response describing why the operation failed
|
Examples
Create Project
Sample request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1/projects/testProject1?api-version=2025-06-01
{
"location": "West US",
"properties": {
"description": "Description of this project",
"displayName": "p1"
},
"identity": {
"type": "SystemAssigned"
}
}
import com.azure.resourcemanager.cognitiveservices.models.Identity;
import com.azure.resourcemanager.cognitiveservices.models.ProjectProperties;
import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType;
/**
* Samples for Projects Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/
* CreateProject.json
*/
/**
* Sample code: Create Project.
*
* @param manager Entry point to CognitiveServicesManager.
*/
public static void createProject(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
manager.projects().define("testProject1").withExistingAccount("myResourceGroup", "testCreate1")
.withRegion("West US").withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
.withProperties(
new ProjectProperties().withDisplayName("p1").withDescription("Description of this project"))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-cognitiveservices
# USAGE
python create_project.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = CognitiveServicesManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-1111-2222-3333-444444444444",
)
response = client.projects.begin_create(
resource_group_name="myResourceGroup",
account_name="testCreate1",
project_name="testProject1",
project={
"identity": {"type": "SystemAssigned"},
"location": "West US",
"properties": {"description": "Description of this project", "displayName": "p1"},
},
).result()
print(response)
# x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/CreateProject.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcognitiveservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1004eed4202d64b48157c084fe2830760f8190f4/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/CreateProject.json
func ExampleProjectsClient_BeginCreate_createProject() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectsClient().BeginCreate(ctx, "myResourceGroup", "testCreate1", "testProject1", armcognitiveservices.Project{
Identity: &armcognitiveservices.Identity{
Type: to.Ptr(armcognitiveservices.ResourceIdentityTypeSystemAssigned),
},
Location: to.Ptr("West US"),
Properties: &armcognitiveservices.ProjectProperties{
Description: to.Ptr("Description of this project"),
DisplayName: to.Ptr("p1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Project = armcognitiveservices.Project{
// Name: to.Ptr("testProject1"),
// Type: to.Ptr("Microsoft.CognitiveServices/accounts/projects"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1/projects/testProject1"),
// Etag: to.Ptr("W/\"datetime'2017-04-10T08%3A00%3A05.445595Z'\""),
// Identity: &armcognitiveservices.Identity{
// Type: to.Ptr(armcognitiveservices.ResourceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("b5cf119e-a5c2-42c7-802f-592e0efb169f"),
// TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
// },
// Location: to.Ptr("West US"),
// Properties: &armcognitiveservices.ProjectProperties{
// Description: to.Ptr("Description of this project"),
// DisplayName: to.Ptr("p1"),
// Endpoints: map[string]*string{
// "OpenAI Dall-E API": to.Ptr("https://sub-donmain-name.openai.azure.com/"),
// "OpenAI Language Model Instance API": to.Ptr("https://sub-donmain-name.openai.azure.com/"),
// "OpenAI Sora API": to.Ptr("https://sub-donmain-name.openai.azure.com/"),
// },
// IsDefault: to.Ptr(true),
// ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Create Cognitive Services Account's Project. Project is a sub-resource of an account which give AI developer it's individual container to work on.
*
* @summary Create Cognitive Services Account's Project. Project is a sub-resource of an account which give AI developer it's individual container to work on.
* x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/CreateProject.json
*/
async function createProject() {
const subscriptionId =
process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "myResourceGroup";
const accountName = "testCreate1";
const projectName = "testProject1";
const project = {
identity: { type: "SystemAssigned" },
location: "West US",
properties: {
description: "Description of this project",
displayName: "p1",
},
};
const credential = new DefaultAzureCredential();
const client = new CognitiveServicesManagementClient(credential, subscriptionId);
const result = await client.projects.beginCreateAndWait(
resourceGroupName,
accountName,
projectName,
project,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.CognitiveServices.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.CognitiveServices;
// Generated from example definition: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/CreateProject.json
// this example is just showing the usage of "Projects_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this CognitiveServicesAccountResource created on azure
// for more information of creating CognitiveServicesAccountResource, please refer to the document of CognitiveServicesAccountResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "myResourceGroup";
string accountName = "testCreate1";
ResourceIdentifier cognitiveServicesAccountResourceId = CognitiveServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
CognitiveServicesAccountResource cognitiveServicesAccount = client.GetCognitiveServicesAccountResource(cognitiveServicesAccountResourceId);
// get the collection of this CognitiveServicesProjectResource
CognitiveServicesProjectCollection collection = cognitiveServicesAccount.GetCognitiveServicesProjects();
// invoke the operation
string projectName = "testProject1";
CognitiveServicesProjectData data = new CognitiveServicesProjectData(new AzureLocation("West US"))
{
Identity = new ManagedServiceIdentity("SystemAssigned"),
Properties = new CognitiveServicesProjectProperties
{
DisplayName = "p1",
Description = "Description of this project",
},
};
ArmOperation<CognitiveServicesProjectResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, projectName, data);
CognitiveServicesProjectResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
CognitiveServicesProjectData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1/projects/testProject1",
"name": "testProject1",
"type": "Microsoft.CognitiveServices/accounts/projects",
"location": "West US",
"etag": "W/\"datetime'2017-04-10T08%3A00%3A05.445595Z'\"",
"properties": {
"description": "Description of this project",
"displayName": "p1",
"provisioningState": "Succeeded",
"endpoints": {
"OpenAI Language Model Instance API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Dall-E API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Sora API": "https://sub-donmain-name.openai.azure.com/"
},
"isDefault": true
},
"identity": {
"principalId": "b5cf119e-a5c2-42c7-802f-592e0efb169f",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1/projects/testProject1",
"name": "testProject1",
"type": "Microsoft.CognitiveServices/accounts/projects",
"location": "West US",
"etag": "W/\"datetime'2017-04-10T07%3A57%3A48.4582781Z'\"",
"properties": {
"description": "Description of this project",
"displayName": "p1",
"provisioningState": "Succeeded",
"endpoints": {
"OpenAI Language Model Instance API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Dall-E API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Sora API": "https://sub-donmain-name.openai.azure.com/"
},
"isDefault": true
},
"identity": {
"principalId": "b5cf119e-a5c2-42c7-802f-592e0efb169f",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1/projects/testProject1",
"name": "testProject1",
"type": "Microsoft.CognitiveServices/accounts/projects",
"location": "West US",
"etag": "W/\"datetime'2017-04-10T07%3A57%3A48.4582781Z'\"",
"properties": {
"description": "Description of this project",
"displayName": "p1",
"provisioningState": "Succeeded",
"endpoints": {
"OpenAI Language Model Instance API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Dall-E API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Sora API": "https://sub-donmain-name.openai.azure.com/"
},
"isDefault": true
},
"identity": {
"principalId": "b5cf119e-a5c2-42c7-802f-592e0efb169f",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned"
}
}
Create Project Min
Sample request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1/projects/testProject1?api-version=2025-06-01
{
"location": "West US",
"properties": {},
"identity": {
"type": "SystemAssigned"
}
}
import com.azure.resourcemanager.cognitiveservices.models.Identity;
import com.azure.resourcemanager.cognitiveservices.models.ProjectProperties;
import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType;
/**
* Samples for Projects Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/
* CreateProjectMin.json
*/
/**
* Sample code: Create Project Min.
*
* @param manager Entry point to CognitiveServicesManager.
*/
public static void createProjectMin(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
manager.projects().define("testProject1").withExistingAccount("myResourceGroup", "testCreate1")
.withRegion("West US").withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
.withProperties(new ProjectProperties()).create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-cognitiveservices
# USAGE
python create_project_min.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = CognitiveServicesManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-1111-2222-3333-444444444444",
)
response = client.projects.begin_create(
resource_group_name="myResourceGroup",
account_name="testCreate1",
project_name="testProject1",
project={"identity": {"type": "SystemAssigned"}, "location": "West US", "properties": {}},
).result()
print(response)
# x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/CreateProjectMin.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcognitiveservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1004eed4202d64b48157c084fe2830760f8190f4/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/CreateProjectMin.json
func ExampleProjectsClient_BeginCreate_createProjectMin() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectsClient().BeginCreate(ctx, "myResourceGroup", "testCreate1", "testProject1", armcognitiveservices.Project{
Identity: &armcognitiveservices.Identity{
Type: to.Ptr(armcognitiveservices.ResourceIdentityTypeSystemAssigned),
},
Location: to.Ptr("West US"),
Properties: &armcognitiveservices.ProjectProperties{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Project = armcognitiveservices.Project{
// Name: to.Ptr("testProject1"),
// Type: to.Ptr("Microsoft.CognitiveServices/accounts/projects"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1/projects/testProject1"),
// Etag: to.Ptr("W/\"datetime'2017-04-10T08%3A00%3A05.445595Z'\""),
// Identity: &armcognitiveservices.Identity{
// Type: to.Ptr(armcognitiveservices.ResourceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("b5cf119e-a5c2-42c7-802f-592e0efb169f"),
// TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
// },
// Location: to.Ptr("West US"),
// Properties: &armcognitiveservices.ProjectProperties{
// Endpoints: map[string]*string{
// "OpenAI Dall-E API": to.Ptr("https://sub-donmain-name.openai.azure.com/"),
// "OpenAI Language Model Instance API": to.Ptr("https://sub-donmain-name.openai.azure.com/"),
// "OpenAI Sora API": to.Ptr("https://sub-donmain-name.openai.azure.com/"),
// },
// IsDefault: to.Ptr(true),
// ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Create Cognitive Services Account's Project. Project is a sub-resource of an account which give AI developer it's individual container to work on.
*
* @summary Create Cognitive Services Account's Project. Project is a sub-resource of an account which give AI developer it's individual container to work on.
* x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/CreateProjectMin.json
*/
async function createProjectMin() {
const subscriptionId =
process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "myResourceGroup";
const accountName = "testCreate1";
const projectName = "testProject1";
const project = {
identity: { type: "SystemAssigned" },
location: "West US",
properties: {},
};
const credential = new DefaultAzureCredential();
const client = new CognitiveServicesManagementClient(credential, subscriptionId);
const result = await client.projects.beginCreateAndWait(
resourceGroupName,
accountName,
projectName,
project,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.CognitiveServices.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.CognitiveServices;
// Generated from example definition: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2025-06-01/examples/CreateProjectMin.json
// this example is just showing the usage of "Projects_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this CognitiveServicesAccountResource created on azure
// for more information of creating CognitiveServicesAccountResource, please refer to the document of CognitiveServicesAccountResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "myResourceGroup";
string accountName = "testCreate1";
ResourceIdentifier cognitiveServicesAccountResourceId = CognitiveServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
CognitiveServicesAccountResource cognitiveServicesAccount = client.GetCognitiveServicesAccountResource(cognitiveServicesAccountResourceId);
// get the collection of this CognitiveServicesProjectResource
CognitiveServicesProjectCollection collection = cognitiveServicesAccount.GetCognitiveServicesProjects();
// invoke the operation
string projectName = "testProject1";
CognitiveServicesProjectData data = new CognitiveServicesProjectData(new AzureLocation("West US"))
{
Identity = new ManagedServiceIdentity("SystemAssigned"),
Properties = new CognitiveServicesProjectProperties(),
};
ArmOperation<CognitiveServicesProjectResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, projectName, data);
CognitiveServicesProjectResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
CognitiveServicesProjectData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1/projects/testProject1",
"name": "testProject1",
"type": "Microsoft.CognitiveServices/accounts/projects",
"location": "West US",
"etag": "W/\"datetime'2017-04-10T08%3A00%3A05.445595Z'\"",
"properties": {
"provisioningState": "Succeeded",
"endpoints": {
"OpenAI Language Model Instance API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Dall-E API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Sora API": "https://sub-donmain-name.openai.azure.com/"
},
"isDefault": true
},
"identity": {
"principalId": "b5cf119e-a5c2-42c7-802f-592e0efb169f",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1",
"name": "testProject1",
"type": "Microsoft.CognitiveServices/accounts/projects",
"location": "West US",
"etag": "W/\"datetime'2017-04-10T07%3A57%3A48.4582781Z'\"",
"properties": {
"provisioningState": "Succeeded",
"endpoints": {
"OpenAI Language Model Instance API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Dall-E API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Sora API": "https://sub-donmain-name.openai.azure.com/"
},
"isDefault": true
},
"identity": {
"principalId": "b5cf119e-a5c2-42c7-802f-592e0efb169f",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1",
"name": "testProject1",
"type": "Microsoft.CognitiveServices/accounts/projects",
"location": "West US",
"etag": "W/\"datetime'2017-04-10T07%3A57%3A48.4582781Z'\"",
"properties": {
"provisioningState": "Succeeded",
"endpoints": {
"OpenAI Language Model Instance API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Dall-E API": "https://sub-donmain-name.openai.azure.com/",
"OpenAI Sora API": "https://sub-donmain-name.openai.azure.com/"
},
"isDefault": true
},
"identity": {
"principalId": "b5cf119e-a5c2-42c7-802f-592e0efb169f",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned"
}
}
Definitions
createdByType
Enumeration
The type of identity that created the resource.
| Value |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ErrorAdditionalInfo
Object
The resource management error additional info.
| Name |
Type |
Description |
|
info
|
object
|
The additional info.
|
|
type
|
string
|
The additional info type.
|
ErrorDetail
Object
The error detail.
| Name |
Type |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
|
code
|
string
|
The error code.
|
|
details
|
ErrorDetail[]
|
The error details.
|
|
message
|
string
|
The error message.
|
|
target
|
string
|
The error target.
|
ErrorResponse
Object
Error response
| Name |
Type |
Description |
|
error
|
ErrorDetail
|
The error object.
|
Identity
Object
Identity for the resource.
| Name |
Type |
Description |
|
principalId
|
string
|
The principal ID of resource identity.
|
|
tenantId
|
string
|
The tenant ID of resource.
|
|
type
|
ResourceIdentityType
|
The identity type.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}
|
Project
Object
Cognitive Services project is an Azure resource representing the provisioned account's project, it's type, location and SKU.
| Name |
Type |
Description |
|
etag
|
string
|
Resource Etag.
|
|
id
|
string
|
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
identity
|
Identity
|
Identity for the resource.
|
|
location
|
string
|
The geo-location where the resource lives
|
|
name
|
string
|
The name of the resource
|
|
properties
|
ProjectProperties
|
Properties of Cognitive Services project.
|
|
systemData
|
systemData
|
Metadata pertaining to creation and last modification of the resource.
|
|
tags
|
object
|
Resource tags.
|
|
type
|
string
|
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
|
ProjectProperties
Object
Properties of Cognitive Services Project'.
| Name |
Type |
Description |
|
description
|
string
|
The description of the Cognitive Services Project.
|
|
displayName
|
string
|
The display name of the Cognitive Services Project.
|
|
endpoints
|
object
|
The list of endpoint for this Cognitive Services Project.
|
|
isDefault
|
boolean
|
Indicates whether the project is the default project for the account.
|
|
provisioningState
|
ProvisioningState
|
Gets the status of the cognitive services project at the time the operation was called.
|
ProvisioningState
Enumeration
Gets the status of the cognitive services account at the time the operation was called.
| Value |
Description |
|
Accepted
|
|
|
Creating
|
|
|
Deleting
|
|
|
Moving
|
|
|
Failed
|
|
|
Succeeded
|
|
|
ResolvingDNS
|
|
ResourceIdentityType
Enumeration
The identity type.
| Value |
Description |
|
None
|
|
|
SystemAssigned
|
|
|
UserAssigned
|
|
|
SystemAssigned, UserAssigned
|
|
systemData
Object
Metadata pertaining to creation and last modification of the resource.
| Name |
Type |
Description |
|
createdAt
|
string
(date-time)
|
The timestamp of resource creation (UTC).
|
|
createdBy
|
string
|
The identity that created the resource.
|
|
createdByType
|
createdByType
|
The type of identity that created the resource.
|
|
lastModifiedAt
|
string
(date-time)
|
The timestamp of resource last modification (UTC)
|
|
lastModifiedBy
|
string
|
The identity that last modified the resource.
|
|
lastModifiedByType
|
createdByType
|
The type of identity that last modified the resource.
|
UserAssignedIdentity
Object
User-assigned managed identity.
| Name |
Type |
Description |
|
clientId
|
string
|
Client App Id associated with this identity.
|
|
principalId
|
string
|
Azure Active Directory principal ID associated with this Identity.
|