Skip to content

New-AzCognitiveServicesAccountDeployment should flatten its properties #23849

@aelij

Description

@aelij

Description

It's very inconvenient to work with the cmdlet since you have to instantiate the properties manually instead of having them as parameters. There's no completion and you have to rely on hashtables. Compare to az CLI:

  az cognitiveservices account deployment create `
    --name name `
    --resource-group rg  `
    --deployment-name text-embedding-ada-002 `
    --model-name text-embedding-ada-002 `
    --model-version "2"  `
    --model-format OpenAI `
    --sku-capacity "1" `
    --sku-name "Standard"

Note this may also be true for other cmdlets in this module.

Issue script & Debug output

New-AzCognitiveServicesAccountDeployment -ResourceGroupName rg -AccountName name -Name text-embedding-ada-002 `
  -Sku @{ Name = 'Standard'; Capacity = 1 } `
  -Properties @{ Model = @{ Name = 'text-embedding-ada-002'; Version = '2'; Format = 'OpenAI' } }

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version    PreRelease Name                 
---------- -------    ---------- ----                 
Script     2.12.5                Az.Accounts          
Script     1.14.0                Az.CognitiveServices 

Error output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Cognitive ServicesService AttentionThis issue is responsible by Azure service team.feature-requestThis issue requires a new behavior in the product in order be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions