Dela via


Projects - Create

Skapa Cognitive Services-kontots projekt. Project är en underresurs till ett konto som ger AI-utvecklaren en individuell behållare att arbeta med.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}?api-version=2025-06-01

URI-parametrar

Name I Obligatorisk Typ Description
accountName
path True

string

minLength: 2
maxLength: 64
pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$

Namnet på Cognitive Services-kontot.

projectName
path True

string

minLength: 2
maxLength: 64
pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$

Namnet på Cognitive Services-kontots projekt.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

subscriptionId
path True

string

minLength: 1

ID för målprenumerationen.

api-version
query True

string

minLength: 1

Den API-version som ska användas för den här åtgärden.

Begärandetext

Name Typ Description
identity

Identity

Identitet för resursen.

location

string

Den geo-plats där resursen finns

properties

ProjectProperties

Egenskaper för Cognitive Services-projektet.

tags

object

Resursetiketter.

Svar

Name Typ Description
200 OK

Project

Om resursen har skapats eller redan finns ska tjänsten returnera 200 (OK).

201 Created

Project

Om resursen har skapats ska tjänsten returnera 201 (OK).

202 Accepted

Project

HTTP 202 (accepterad) om åtgärden har startats och kommer att slutföras asynkront.

Other Status Codes

ErrorResponse

Felsvar som beskriver varför åtgärden misslyckades

Exempel

Create Project
Create Project Min

Create Project

Exempelbegäran

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"
  }
}

Exempelsvar

{
  "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

Exempelbegäran

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"
  }
}

Exempelsvar

{
  "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"
  }
}

Definitioner

Name Description
createdByType

Den typ av identitet som skapade resursen.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

ErrorDetail

Felinformationen.

ErrorResponse

Felsvar

Identity

Identitet för resursen.

Project

Cognitive Services-projektet är en Azure-resurs som representerar det etablerade kontots projekt, dess typ, plats och SKU.

ProjectProperties

Egenskaper för Cognitive Services-projektet".

ProvisioningState

Hämtar status för cognitive services-kontot när åtgärden anropades.

ResourceIdentityType

Identitetstypen.

systemData

Metadata som rör skapande och senaste ändring av resursen.

UserAssignedIdentity

Användartilldelad hanterad identitet.

createdByType

Den typ av identitet som skapade resursen.

Värde Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

Name Typ Description
info

object

Den ytterligare informationen.

type

string

Typen av ytterligare information.

ErrorDetail

Felinformationen.

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Felet ytterligare information.

code

string

Felkoden.

details

ErrorDetail[]

Information om felet.

message

string

Felmeddelandet.

target

string

Felet riktas.

ErrorResponse

Felsvar

Name Typ Description
error

ErrorDetail

Felet objektet.

Identity

Identitet för resursen.

Name Typ Description
principalId

string

Huvud-ID för resursidentiteten.

tenantId

string

Klientorganisations-ID för resursen.

type

ResourceIdentityType

Identitetstypen.

userAssignedIdentities

<string,  UserAssignedIdentity>

Listan över användartilldelade identiteter som är associerade med resursen. Nyckelreferenserna för användaridentitetsordlistan är ARM-resurs-ID:t i formuläret: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}

Project

Cognitive Services-projektet är en Azure-resurs som representerar det etablerade kontots projekt, dess typ, plats och SKU.

Name Typ Description
etag

string

Resurs-Etag.

id

string

Fullständigt kvalificerat resurs-ID för resursen. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

Identity

Identitet för resursen.

location

string

Den geo-plats där resursen finns

name

string

Namnet på resursen

properties

ProjectProperties

Egenskaper för Cognitive Services-projektet.

systemData

systemData

Metadata som rör skapande och senaste ändring av resursen.

tags

object

Resursetiketter.

type

string

Resurstypen. T.ex. "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts"

ProjectProperties

Egenskaper för Cognitive Services-projektet".

Name Typ Description
description

string

Beskrivningen av Cognitive Services-projektet.

displayName

string

Visningsnamnet för Cognitive Services-projektet.

endpoints

object

Listan över slutpunkter för det här Cognitive Services-projektet.

isDefault

boolean

Anger om projektet är standardprojektet för kontot.

provisioningState

ProvisioningState

Hämtar status för cognitive services-projektet vid den tidpunkt då åtgärden anropades.

ProvisioningState

Hämtar status för cognitive services-kontot när åtgärden anropades.

Värde Description
Accepted
Creating
Deleting
Moving
Failed
Succeeded
ResolvingDNS

ResourceIdentityType

Identitetstypen.

Värde Description
None
SystemAssigned
UserAssigned
SystemAssigned, UserAssigned

systemData

Metadata som rör skapande och senaste ändring av resursen.

Name Typ Description
createdAt

string (date-time)

Tidsstämpeln för att skapa resurser (UTC).

createdBy

string

Identiteten som skapade resursen.

createdByType

createdByType

Den typ av identitet som skapade resursen.

lastModifiedAt

string (date-time)

Tidsstämpeln för senaste ändring av resurs (UTC)

lastModifiedBy

string

Identiteten som senast ändrade resursen.

lastModifiedByType

createdByType

Den typ av identitet som senast ändrade resursen.

UserAssignedIdentity

Användartilldelad hanterad identitet.

Name Typ Description
clientId

string

Klientapp-ID som är associerat med den här identiteten.

principalId

string

Azure Active Directory huvudnamns-ID som är associerat med den här identiteten.