【发布时间】:2018-06-02 11:39:17
【问题描述】:
我正在尝试在 aws powershell 中运行 NewAg-ApiKey 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 ... + ~~~~~~ 表达式或语句中出现意外的标记 ':'wh1''。 + CategoryInfo : ParserError: (:) [], ParseException + FullyQualifiedErrorId : UnexpectedToken
【问题讨论】:
标签: powershell amazon-web-services aws-api-gateway aws-powershell