私はAWS PowerShellでNewAg-ApiKey
コマンドレットを実行しようとしています。私はStageKeys
の形式については不明です。誰かがこれを明確にすることはできますか?NewAg-APIKEYのフォーマットエラー
現在としてNew-AgApiKey
を書く:
New-AGApiKey -CustomerId '11' -Description 'aa' -Enabled $True -GenerateDistinctId $True -Name 'newAPIKey'-StageKeys [{"RestApiId":'yz50sp19a7'},{"StageName":'wh1'}] -Force
と、次のエラー
At C:\Users\sgoswami\Desktop\Scripts\create1.ps1:2 char:132 + ... $True -Name 'newAPIKey'-StageKeys [{"RestApiId":'yz50sp19a7'},{"Stag ... + ~~~~~~~~~~~~~ Unexpected token ':'yz50sp19a7'' in expression or statement. At 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
これは機能します。 。しかし、構文の新しいエラーが発生しています。何らかの理由でこれが起こっている可能性があります。 新AGApiKey -CustomerId '11' -Description 'AA' ... -Enabled $ Trueの-Gener ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:NotSpecified:( :) [新AGApiKey]、TypeInitializationException + FullyQualifiedErrorId:System.TypeInitializationException、Amazon.PowerShell.Cmdlets.AG.NewAGApiKeyCmdlet に向けた新AGApiKey -CustomerId '11' -Description 'AA' -Enabled $ Trueの-GenerateDistinctId $ True -Name 'newAPIKey'-StageKeys $ obj -Force –
こんにちは、なぜ厳密に非推奨機能を使用しようとしていますか? –