一、描述
日志主题,产品介绍
二、示例
resource "tencentcloud_cls_logset" "example" { logset_name = "tf_example"}resource "tencentcloud_cls_topic" "example" { topic_name = "tf_example" logset_id = tencentcloud_cls_logset.example.id auto_split = false max_split_partitions = 20 partition_count = 1 period = 30 storage_type = "hot" describes = "Test Demo." hot_period = 10}
三、参数说明
| 类型 | 名称 | 数据类型 | 说明 |
| 必填 | region | string | 地域,如:ap-guangzhou,默认使用 provider 中定义的 region 也可以在 resource 中指定地域,覆盖默认设置 |
| 必填 | logset_id | string | 日志集ID 示例值:xxxxxx-xx-xx-xx-xxxxxxxx |
| 必填 | topic_name | string | 日志主题名称示例值:tf_example |
| 可选 | availability_zone | string | 可用区,此参数不需要填写 |
| 可选 | count | int | 资源数量,默认为 1 如果为 0 则不创建资源 |
| 可选 | activity_id | int | 计费活动 ID,保留字段 |
| 可选 | auto_split | boolean | 是否开启自动分裂,默认值为 true |
| 可选 | describes | string | 日志主题描述 示例值:xx部门xx任务topic |
| 可选 | hot_period | int | 0:关闭日志沉降。非0:开启日志沉降后标准存储的天数,HotPeriod 需要大于等于7,且小于 Period。仅在 StorageType 为 hot 时生效。示例值:10 |
| 可选 | max_split_partitions | int | 开启自动分裂后,每个主题能够允许的最大分区数,默认值为50示例值:20 |
| 可选 | partition_count | int | 日志主题分区个数。默认创建1个,最大支持创建10个分区。 示例值:1 |
| 可选 | period | int | 生命周期,单位天,标准存储取值范围1 ~ 3600,低频存储取值范围7~ 3600天。取值为 3640时代表永久保存。不传此值,默认获取该日志主题对应日志集的 Period 值(当获取失败时默认为 30 天)。示例值:30 |
| 可选 | storage_type | enum | 日志主题的存储类型,可选值 hot(标准存储),cold(低频存储);默认为 hot。示例值:hot枚举值:hot:标准存储cold:低频存储 |
| 生成 | id | string | 资源实例 ID |
| 生成 | create_time | string | 资源创建时间 |