[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003egdcloud\u003c/code\u003e CLI uses the \u003ccode\u003e--format\u003c/code\u003e flag to customize the output format of resource lists returned by commands.\u003c/p\u003e\n"],["\u003cp\u003eAvailable formats include \u003ccode\u003eyaml\u003c/code\u003e, \u003ccode\u003ejson\u003c/code\u003e, \u003ccode\u003ecsv\u003c/code\u003e, \u003ccode\u003etext\u003c/code\u003e, and \u003ccode\u003etable\u003c/code\u003e, each serving different purposes from human-readable to machine-readable outputs.\u003c/p\u003e\n"],["\u003cp\u003eProjections, defined as \u003ccode\u003e[resource-key[, ...]]\u003c/code\u003e, can be used with \u003ccode\u003ecsv\u003c/code\u003e, \u003ccode\u003etext\u003c/code\u003e, and \u003ccode\u003etable\u003c/code\u003e formats to specify which resource keys to display.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etable\u003c/code\u003e format displays data in aligned columns with capitalized column headings, while the \u003ccode\u003etext\u003c/code\u003e format shows a flattened tree structure of key-value pairs.\u003c/p\u003e\n"],["\u003cp\u003eThe default format can be changed or replaced by utilizing \u003ccode\u003e--format=NAME[PROJECTIONS]\u003c/code\u003e, with \u003ccode\u003eNAME\u003c/code\u003e representing the desired format and projections being optional.\u003c/p\u003e\n"]]],[],null,["# gdcloud topic formats\n\nNAME\n----\n\ngdcloud topic formats - Supplementary help for resource formats.\n\nDESCRIPTION\n-----------\n\nMany `gdcloud` CLI commands return a list of resources on success. By default, they are pretty-printed in the standard output. The `--format=NAME[PROJECTIONS]` flag can be used to format and change the default output to a more meaningful result.\n\nUse the `--format` flag to change the default output format of a command. Resource formats are described in detail later.\n\nUse projections to list a subset of resource keys in a resource.\n\nNote To refer to a list of fields, you can sort and format by each resource. You can run a `list` command with the format set to `yaml`, `json`, `csv`, `text`, or `table`. For example, \n\n gdcloud clusters list --format=yaml\n\nFormats\n-------\n\nA format expression is used to change the default output format of a command. Many output formats are available; some for pretty-printing human-readable output and others for returning machine-readable output. A format expression has two parts\n\n*NAME*\n*name*\n\n*PROJECTIONS*\n*\\[ resource-key \\[, ...\\] \\]*\n\n*NAME* is required and *PROJECTIONS* can be applied to `csv`, `text`, and `table` formats. Unknown values are silently ignored. Each `gdcloud list` command has a default format expression. The `--format` flag can alter or replace the default. For example,\n\n`--format=\"table(clusterref.name,controlPlane.name,controlPlane.image)\"` lists control plane resources in table format.\n\n`--format=json` lists the resource in JSON format.\n\nThe available formats are\n\n## csv \n\n Comma Separated Values (\u003chttps //www.ietf.org/rfc/rfc4180.txt\u003e) with no keys. Use this format with a projection to define values to print.\n\n## json \n\n JSON (\u003chttps //www.json.org\u003e), JavaScript Object Notation.\n\n## table \n\n Aligned left-adjusted columns and column headings are the disambiguated right hand components of the column keys in uppercase. For example, the projection keys `(first.name, last.name)` produce the default column heading `('FIRST.NAME', 'LAST.NAME')`. If the screen reader option is `True`, you might observe flattened list output instead of a table with columns. To turn it off, run `gdcloud config set accessibility/screen_reader false`.\n\n## text \n\n A flattened tree. Each output line contains one `key` `value` pair. Use this format with a projection to define values to print.\n\n## yaml \n\n YAML (\u003chttps //www.yaml.org\u003e), YAML ain't markup language.\n\nEXAMPLES\n--------\n\nList the status of all clusters information in JSON format \n\n gdcloud clusters list --format=json\n\nPrint the cluster reference details of the user cluster \n\n gdcloud clusters describe user-vm-1 --format=\"table(clusterref.name,clusterref.namespace)\""]]