Mengambil indeks dari Logstore yang ditentukan.
Sintaks permintaan
aliyunlog log get_index_config --project_name=<nilai> --logstore_name=<nilai> [--access-id=<nilai>] [--access-key=<nilai>] [--sts-token=<nilai>] [--region-endpoint=<nilai>] [--client-name=<nilai>] [--jmes-filter=<nilai>] [--format-output=<nilai>] [--decode-output=<nilai>]Parameter permintaan
Tabel berikut menjelaskan parameter yang diperlukan dan spesifik untuk perintah get_index_config.
Parameter | Tipe | Diperlukan | Contoh | Deskripsi |
--project_name | String | Ya | aliyun-test-project | Nama dari proyek. |
--logstore_name | String | Ya | logstroe-a | Nama dari Logstore. |
Untuk informasi tentang parameter global dari antarmuka baris perintah (CLI) Layanan Log, lihat Parameter Global.
Contoh
Permintaan Contoh
Gunakan akun default untuk mendapatkan indeks dari Logstore bernama logstore-a.
aliyunlog log get_index_config --project_name="aliyun-test-project" --logstore_name="logstore-a"Untuk menyimpan indeks ke file tertentu, jalankan perintah berikut:
aliyunlog log get_index_config --project_name="aliyun-test-project" --logstore_name="logstore-a" >>export_index_config.jsonTanggapan Contoh
{ "index_mode": "v2", "keys": { "key1": { "caseSensitive": false, "doc_value": true, "token": [ ",", " ", "'", "\"", ";", "=", "(", ")", "[", "]", "{", "}", "?", "@", "&", "<", ">", "/", ":", "\n", "\t" ], "type": "text" }, "key2": { "caseSensitive": false, "doc_value": true, "token": [ ",", " ", "'", "\"", ";", "=", "(", ")", "[", "]", "{", "}", "?", "@", "&", "<", ">", "/", ":", "\n", "\t" ], "type": "text" }, "key3": { "caseSensitive": false, "doc_value": true, "token": [ ",", " ", "'", "\"", ";", "=", "(", ")", "[", "]", "{", "}", "?", "@", "&", "<", ">", "/", ":", "\n", "\t" ], "type": "text" }, "key4": { "caseSensitive": false, "doc_value": true, "token": [ ",", " ", "'", "\"", ";", "=", "(", ")", "[", "]", "{", "}", "?", "@", "&", "<", ">", "/", ":", "\n", "\t" ], "type": "text" } }, "lastModifyTime": 0, "line": { "caseSensitive": false, "chn": false, "token": [ ",", " ", "'", "\"", ";", "=", "(", ")", "[", "]", "{", "}", "?", "@", "&", "<", ">", "/", ":", "\n", "\t" ] }, "storage": "pg", "ttl": 30 }
Kode kesalahan
Jika pesan kesalahan dikembalikan, perbaiki kesalahan berdasarkan kode kesalahan dari operasi API terkait. Untuk informasi lebih lanjut, lihat Kode Kesalahan.