pcluster get-image-log-events - AWS ParallelCluster

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

pcluster get-image-log-events

擷取與映像版本相關聯的事件。

pcluster get-image-log-events [-h] --image-id IMAGE_ID --log-stream-name LOG_STREAM_NAME [--debug] [--end-time END_TIME] [--limit LIMIT] [--next-token NEXT_TOKEN] [--query QUERY] [--region REGION] [--start-from-head START_FROM_HEAD] [--start-time START_TIME]

命名參數

-h, --help

顯示的說明文字pcluster get-image-log-events

--image-id, -i IMAGE_ID

指定影像的 ID。

--log-stream-name LOG_STREAM_NAME

指定記錄資料流的名稱。您可以使用命list-image-log-streams令擷取與一或多個事件相關聯的記錄資料流。

--debug

啟用偵錯記錄。

--end-time END_TIME

指定時間範圍的結束時間,以 ISO 8601 格式表示 (YYYY-MM-DDThh:mm:ssZ例如2021-01-01T20:00:00Z)。不會包含時間戳記等於或晚於此時間的事件。

--limit LIMIT

指定傳回的記錄事件數目上限。如果未指定值,最多可容納 1 MB 的記錄事件數目,最多可容納 10,000 個記錄事件。

--next-token NEXT_TOKEN

指定要用於分頁請求的權杖。

--query QUERY

指定要在輸出上執行的 JMESPath 查詢。

--region, -r REGION

指定 AWS 區域 要使用的。 AWS 區域 必須使用AWS_DEFAULT_REGION環境變數、~/.aws/config檔案[default]區段中的region設定或--region參數來指定。

--start-from-head START_FROM_HEAD

如果值為true,則會先傳回最早的記錄事件。如果值為false,則會先傳回最新的記錄事件。(預設為false。)

--start-time START_TIME

指定時間範圍的開始,以 ISO 8601 格式表示 (YYYY-MM-DDThh:mm:ssZ例如2021-01-01T20:00:00Z)。包含時間戳記等於或晚於此時間的事件。

使用 AWS ParallelCluster 版本 3.1.2 的示例:

$ pcluster get-image-log-events --image-id custom-alinux2-image --region us-east-1 --log-stream-name 3.1.2/1 --limit 3 { "nextToken": "f/36778317771100849897800729464621464113270312017760944178/s", "prevToken": "b/36778317766952911290874033560295820514557716777648586800/s", "events": [ { "message": "ExecuteBash: FINISHED EXECUTION", "timestamp": "2022-04-05T22:13:26.633Z" }, { "message": "Document arn:aws:imagebuilder:us-east-1:123456789012:component/parallelclusterimage-test-1234abcd-56ef-78gh-90ij-abcd1234efgh/3.1.2/1", "timestamp": "2022-04-05T22:13:26.741Z" }, { "message": "TOE has completed execution successfully", "timestamp": "2022-04-05T22:13:26.819Z" } ] }