本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用自訂精靈在 中執行互動式命令 AWS CLI
AWS Command Line Interface (AWS CLI) 提供對某些命令使用精靈的功能。若要貢獻或檢視可用 AWS CLI 精靈的完整清單,請參閱 上的AWS CLI 精靈資料夾
運作方式
與 AWS 主控台類似, AWS CLI 具有 UI 精靈,可引導您管理 AWS 資源。若要使用精靈,您可以呼叫 wizard
子命令,以及命令中服務名稱後的精靈名稱。命令結構如下所示:
語法:
$
aws <
command
> wizard <wizardName
>
下列範例為呼叫精靈建立新的 dynamodb
資料表。
$
aws dynamodb wizard
new-table
aws configure
是唯一沒有精靈名稱的精靈。在執行精靈時,請依照下面範例示範的方式來執行 aws configure wizard
命令:
$
aws configure wizard
在呼叫精靈之後,系統會顯示 Shell 中的表單。對於各個參數,系統會提供一個選項清單供您選取,或提示您輸入字串。若要從清單中選擇,請使用向上和向下箭頭鍵,然後按 ENTER。若要檢視某個選項的詳細資訊,請按向右鍵。完成參數填寫後,按 ENTER。
$
aws configure wizard
What would you like to configure > Static Credentials Assume Role Process Provider Additional CLI configuration Enter the name of the profile: Enter your Access Key Id: Enter your Secret Access Key:
若要編輯先前的提示,請使用 SHIFT + TAB。對於某些精靈,在填入所有提示之後,您可以預覽 AWS CloudFormation 範本或填入您資訊的 AWS CLI 命令。此預覽模式有助於學習 AWS CLI、 服務APIs,以及建立指令碼的範本。
預覽後或最後一個提示執行最終命令ENTER後,請按 。
$
aws configure wizard
What would you like to configure Enter the name of the profile: testWizard Enter your Access Key Id: AB1C2D3EF4GH5I678J90K Enter your Secret Access Key: ab1c2def34gh5i67j8k90l1mnop2qr3s45tu678v90
<ENTER>