View a markdown version of this page

取得 命令的協助 - Amazon DCV Session Manager

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

取得 命令的協助

您可以在使用 Amazon DCV Session Manager CLI 時取得任何命令的說明。若要這樣做,只需在命令名稱結尾輸入 --help

範例

例如,下列命令會顯示一般 DCV SM CLI 選項和可用頂層命令的說明。

dcvsm --help

下列範例顯示 CLI 說明的輸出。

Usage: dcvsm [OPTIONS] COMMAND [ARGS]... Amazon DCV Session Manager CLI Options: --conf TEXT Name of the configuration file to read the configuration parameters --broker-url TEXT The URL of the broker --debug Specify to enable the debug mode. By default is disabled --no-verify-ssl Specify to disable the verification of SSL certification. By default is enabled --output-format TEXT Specify the format of the output --ca-bundle TEXT Specifies the path to a custom certificate bundle (a file with a .pem extension) of CA to use when establishing SSL/TLS connections --auth-server TEXT URL of the authentication server used to request the token --version Show the version and exit. -h, --help Show this message and exit. Commands: close-servers Closes one or more Amazon DCV server create-session Creates a new Amazon DCV session delete-session Deletes the specified Amazon DCV session describe-servers Describes one or more Amazon DCV servers describe-sessions Describes one or more Amazon DCV sessions get-session-connection-data Gets connection data for a specific Amazon DCV session. get-session-screenshots Gets screenshots of one or more Amazon DCV sessions. open-servers Opens one or more Amazon DCV servers update-session-permissions Updates the user permissions for a specific Amazon DCV session.

所有命令都會接受 --help 以取得內容說明資訊。例如,下列命令會顯示 create-session 命令的說明。

dcvsm create-session --help

下列範例顯示 create-session --help命令的輸出。

Usage: dcvsm create-session [OPTIONS] Create sessions API Options: --name TEXT The name for the session [required] --owner TEXT The name of the session owner [required] --type TEXT Session type: CONSOLE|VIRTUAL [required] --init-file-path TEXT Supported with virtual sessions on Linux Amazon DCV servers --autorun-file TEXT The path to a file on the host server that is to be run inside the session --autorun-file-arguments TEXT Command-line arguments passed to AutorunFile upon its execution inside the session --max-concurrent-clients INTEGER RANGE The maximum number of concurrent Amazon DCV clients, if provided must be between 1 and 100 [1<=x<=100] --dcv-gl-enabled Indicates whether the virtual session is configured to use hardware-based OpenGL. Specify to enable it, by default is disabled --permissions-file TEXT The Base64-encoded contents of the permissions file --requirements TEXT The requirements that the server must satisfy in order to place the session --storage-root TEXT Specifies the path to the folder used for session storage -h, --help Show this message and exit.

Amazon DCV SM CLI 命令參考也包含所有 Amazon DCV SM CLI 命令的說明內容。Amazon DCV SM CLI 中的所有命令都會對應至對代理APIs提出的請求。每個 API 都有 API 參考,可在 Amazon DCV Session Manager 開發人員指南章節中找到。

參數類型

如果您在格式化特定命令的選項或引數時遇到問題,每個命令的說明會描述其函數和接受的選項。

字串

字串參數可包含字母、數字和空格。包含空格的字串必須用引號括起來。字串可以用單引號、雙引號括住,也可以不使用它們。我們建議您不要使用符號,因為它可能會導致非預期的結果。

清單

以逗號分隔並以引號括住的一個或多個字串。下列範例顯示 的清單--session-ids

dcvsm describe-sessions --session-ids "session123,session456"

Boolean

可開啟或關閉選項的二進位標記。例如,--debug describe-sessions 有一個布林值 --debug 選項,指定時會呼叫啟用偵錯的 API。

dcvsm --debug describe-sessions

如果您未明確指定布林值選項,預設會設為 FALSE。

Integer

一個不帶正負號的整數。

dcvsm describe-sessions --max-results 2