我正在尝试NewAg-ApiKey
在 aws powershell 中运行 cmdlet。我不确定StageKeys
. 有人可以澄清一下吗?
目前写New-AgApiKey
为:
New-AGApiKey -CustomerId '11' -Description 'aa' -Enabled $True -GenerateDistinctId $True -Name 'newAPIKey'-StageKeys [{"RestApiId":'yz50sp19a7'},{"StageName":'wh1'}] -Force
并得到以下错误
在 C:\Users\sgoswami\Desktop\Scripts\create1.ps1:2 char:132 + ... $True -Name 'newAPIKey'-StageKeys [{"RestApiId":'yz50sp19a7'},{"Stag ... + ~~~~~~~~~~~~~ 表达式或语句中出现意外的标记 ':'yz50sp19a7''。在 C:\Users\sgoswami\Desktop\Scripts\create1.ps1:2 char:159 + .. . Key'-StageKeys [{"RestApiId":'yz50sp19a7'},{"StageName":'wh1'}] -Forc ... + ~~~~~~ Unexpected token ':'wh1'' in expression or statement . + CategoryInfo : ParserError: (:) [], ParseException + FullyQualifiedErrorId : UnexpectedToken