From 73abd197a3fe1354a2b4776528aa17be79f7abfd Mon Sep 17 00:00:00 2001
From: iac-agent
Date: Mon, 20 Jul 2026 16:08:11 +0800
Subject: [PATCH] feat(teo): add tencentcloud_teo_billing_data data source
---
.changelog/4322.txt | 3 +
go.mod | 4 +-
go.sum | 8 +-
.../.openspec.yaml | 2 +
.../design.md | 80 +
.../proposal.md | 41 +
.../specs/teo-billing-data/spec.md | 90 +
.../tasks.md | 27 +
openspec/specs/teo-billing-data/spec.md | 90 +
tencentcloud/provider.go | 1 +
tencentcloud/provider.md | 1 +
.../teo/data_source_tc_teo_billing_data.go | 240 ++
.../teo/data_source_tc_teo_billing_data.md | 18 +
.../data_source_tc_teo_billing_data_test.go | 195 ++
.../tencentcloud/common/http/request.go | 3 +-
.../tencentcloud/cvm/doc.go | 2 -
.../tencentcloud/teo/v20220901/client.go | 952 +++++++-
.../tencentcloud/teo/v20220901/errors.go | 18 +
.../tencentcloud/teo/v20220901/models.go | 1999 +++++++++++++++--
vendor/modules.txt | 5 +-
website/docs/d/teo_billing_data.html.markdown | 61 +
website/tencentcloud.erb | 3 +
22 files changed, 3517 insertions(+), 326 deletions(-)
create mode 100644 .changelog/4322.txt
create mode 100644 openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/.openspec.yaml
create mode 100644 openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/design.md
create mode 100644 openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/proposal.md
create mode 100644 openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/specs/teo-billing-data/spec.md
create mode 100644 openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/tasks.md
create mode 100644 openspec/specs/teo-billing-data/spec.md
create mode 100644 tencentcloud/services/teo/data_source_tc_teo_billing_data.go
create mode 100644 tencentcloud/services/teo/data_source_tc_teo_billing_data.md
create mode 100644 tencentcloud/services/teo/data_source_tc_teo_billing_data_test.go
delete mode 100644 vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/doc.go
create mode 100644 website/docs/d/teo_billing_data.html.markdown
diff --git a/.changelog/4322.txt b/.changelog/4322.txt
new file mode 100644
index 0000000000..99fc2282b0
--- /dev/null
+++ b/.changelog/4322.txt
@@ -0,0 +1,3 @@
+```release-note:new-data-source
+tencentcloud_teo_billing_data
+```
diff --git a/go.mod b/go.mod
index 831ca19dac..18b2ad8f9c 100644
--- a/go.mod
+++ b/go.mod
@@ -46,7 +46,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.3.105
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.1033
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.3.131
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.132
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.136
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/config v1.3.80
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.3.130
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.3.30
@@ -93,7 +93,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdcpg v1.0.533
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.3.113
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.121
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.136
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.3.107
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.1.0
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857
diff --git a/go.sum b/go.sum
index 186e84afbe..cd30ef69a2 100644
--- a/go.sum
+++ b/go.sum
@@ -996,7 +996,6 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.112/go.mod
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.113/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.115/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.118/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.121/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.122/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.123/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.124/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
@@ -1004,8 +1003,9 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.125/go.mod
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.127/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.130/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.131/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.132 h1:42RfJnwzMprfKEJrM9fyhHu1jXyg8xvSJ1A1qb9Qun8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.132/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.136 h1:06MPEiR1oZzRyNux2jshwMh67C0Zp4kRWvRfj46EcYs=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.136/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/config v1.3.80 h1:chnsNBeJn3MieFLki4hpbzoml5NiTvLVzOTqYRVxQho=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/config v1.3.80/go.mod h1:B/ezGtlvDhZlleNM+2QdvZccrUi+J+fN6vMnDDsZnuM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.1.51 h1:pGwrfCBBCt1u+EDHwfNj9NLQpvk5MVKVMcsE7SvwqM4=
@@ -1121,8 +1121,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.3.113 h1:2sulWz
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.3.113/go.mod h1:uCUT6rfNap46k8JHzdPIz3WvYjiQPDkOBZ+b2GrIpUE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578 h1:vBpQhUroO+FAslUmsDWGi8nvczsqZBWVgQwlnyT0Aj8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578/go.mod h1:UlojGQh/9wb7/uXPNi7PvMral1CNAskVDNgqJEV83l0=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.121 h1:SdW1CsEOUSABdz3YHXSw7nESExvD4fR43ZfBFYaD2OQ=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.121/go.mod h1:r8LzDVp59qZs+Pe65TiXnGKZSu05QB7cYd6XpK6XZ0s=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.136 h1:rgjFH09Z/PH6v7C6uum5pqli+d3AxzSH1gdhqLYiw1s=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.136/go.mod h1:hROu6uk1E9l58lfZKQ15BEb9EF/rc3PP8Uxo1M7WdJg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/thpc v1.0.998 h1:f4/n0dVKQTD06xJ84B5asHViNJHrZmGojdAWEPIsITM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/thpc v1.0.998/go.mod h1:fyi/HUwCwVe2NCCCjz8k/C5GwPu3QazCZO+OBJ3MhLk=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.3.107 h1:Yky7eL8FnkO89MvxERN3tniBQjstZzjIX8I91A4la/k=
diff --git a/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/.openspec.yaml b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/.openspec.yaml
new file mode 100644
index 0000000000..29e56d8d3b
--- /dev/null
+++ b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/.openspec.yaml
@@ -0,0 +1,2 @@
+schema: spec-driven
+created: 2026-07-20
diff --git a/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/design.md b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/design.md
new file mode 100644
index 0000000000..c90e089b7b
--- /dev/null
+++ b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/design.md
@@ -0,0 +1,80 @@
+## Context
+
+Terraform Provider for TencentCloud 通过 `tencentcloud-sdk-go` 调用云 API 管理腾讯云资源。EdgeOne (TEO) 服务已存在多个数据源(如 `tencentcloud_teo_zones`、`tencentcloud_teo_plans` 等),均位于 `tencentcloud/services/teo/` 目录下,遵循 `data_source_tc_teo_.go` 命名规范。
+
+当前 TEO 数据源覆盖了站点、套餐、配置组、安全模板等查询场景,但尚未覆盖计费数据查询。云 API `DescribeBillingData`(teo v20220901)提供了按时间范围、站点、指标、时间粒度、过滤条件、分组维度查询计费用的能力,返回数据点列表(`BillingData`),每个数据点包含时间戳、数值、站点 ID、域名、四层代理实例 ID、计费大区 ID 等字段。
+
+本变更新增 `tencentcloud_teo_billing_data` 数据源(RESOURCE_KIND_DATASOURCE),封装该 API 的查询能力。该数据源为只读查询,不涉及任何资源创建/更新/删除操作。
+
+### 云 API 结构(来自 vendor 校验)
+
+- 请求 `DescribeBillingDataRequest`:
+ - `StartTime *string`(起始时间)
+ - `EndTime *string`(结束时间,范围 ≤ 31 天)
+ - `ZoneIds []*string`(站点 ID 集合,必填,最多 100 个;`*` 表示账号级别)
+ - `MetricName *string`(指标名)
+ - `Interval *string`(时间粒度:`5min` / `hour` / `day`)
+ - `Filters []*BillingDataFilter`(过滤条件,每项含 `Type`、`Value`)
+ - `GroupBy []*string`(分组维度:`zone-id` / `host` / `proxy-id` / `region-id`,最多两个)
+- 响应 `DescribeBillingDataResponse`:
+ - `Response.Data []*BillingData`(数据点列表,可能返回 null)
+ - `BillingData` 结构:`Time *string`、`Value *uint64`、`ZoneId *string`、`Host *string`、`ProxyId *string`、`RegionId *string`
+
+该接口为同步接口(无异步轮询需求),无分页字段。
+
+## Goals / Non-Goals
+
+**Goals:**
+- 新增 `tencentcloud_teo_billing_data` 数据源,支持通过 `DescribeBillingData` API 查询 TEO 计费数据。
+- 完整映射入参(StartTime/EndTime/ZoneIds/MetricName/Interval/Filters/GroupBy)与出参(Data 列表展开字段)。
+- 在 `provider.go` 和 `provider.md` 中注册数据源。
+- 提供基于 gomonkey mock 的单元测试(不使用 Terraform 测试套件)。
+- 生成 `.md` 文档样例。
+
+**Non-Goals:**
+- 不实现计费数据的写入、修改或删除(该 API 仅为查询接口)。
+- 不对接其他计费相关 API。
+- 不变更任何现有 TEO 数据源/资源的 schema 或行为。
+- 不处理异步轮询(本接口为同步接口)。
+- 不暴露分页参数(该 API 无分页字段)。
+
+## Decisions
+
+### 决策 1:数据源 ID 生成方式
+
+数据源为纯查询接口,无服务端持久化 ID。采用查询关键参数组合生成确定性 ID,格式为 `metric_name#start_time#end_time`,使用 `tccommon.FIELD_SP`(`#`)作为分隔符。
+
+**理由**:与项目中其他查询型数据源的惯例一致;该组合在单次 `terraform plan/apply` 范围内稳定,满足 Terraform state 标识需求。
+
+**备选方案**:使用 `RequestId`。否决,因为每次查询 RequestId 不同,会导致 state 频繁变更。
+
+### 决策 2:出参 data 列表字段展开
+
+按照代码生成规范要求,`response.Response.Data` 是一个列表,将列表中元素的字段(`time`、`value`、`zone_id`、`host`、`proxy_id`、`region_id`)平铺到 `data` 这个 list 类型的 schema 中,每个元素为一个 object,object 内部包含上述字段。不在 schema 顶层再嵌套一层"列表型数据"包裹结构。
+
+**理由**:遵循项目规范,使每个字段都可被 Terraform 单独 set/read,且与云 API 返回结构直接对应。
+
+### 决策 3:空响应处理
+
+在 Read 方法的 retry 块内,若云 API 返回空(`response == nil` / `response.Response == nil`),不直接 `d.SetId("")`,而是返回 `NonRetryableError`,让外层 retry 继续尝试,并在 retry 失败路径上保留 `log.Printf("[DATASOURCE] read empty, skip SetId")` 提示。
+
+**理由**:遵循 DATASOURCE 资源代码生成规范第 14 条,避免因云 API 短暂波动导致本地 state 中的 id 被清空,造成数据丢失。
+
+### 决策 4:filters 参数结构
+
+`filters` 为 list of object,每个 object 含 `type`(string)和 `value`(string),与云 API `BillingDataFilter` 结构一一对应。设为 Optional。
+
+### 决策 5:retry 与超时
+
+调用 `DescribeBillingData` 时使用 `tccommon.ReadRetryTimeout` 作为超时时间,通过 `helper.Retry()` 包装。失败时使用 `tccommon.RetryError()` 包装错误返回。retry 块内仅执行 API 调用,不执行 set 等操作。
+
+### 决策 6:单元测试方式
+
+使用 gomonkey 对 `DescribeBillingData` 进行 mock,仅测试业务逻辑(参数组装、响应解析、字段 set),不使用 Terraform 测试套件,不依赖真实云环境。使用 `go test -gcflags=all=-l` 运行。
+
+## Risks / Trade-offs
+
+- **[指标名取值范围广]** → `metric_name` 为自由字符串,云 API 会在服务端校验取值。Terraform schema 不做枚举限制,避免与云 API 取值变化不同步;非法值由云 API 返回错误,经 `RetryError` 透传给用户。
+- **[ZoneIds 用 `*` 表示账号级别]** → 保留原样透传,文档中说明该特殊用法。
+- **[Data 可能为 null]** → Read 中对 `Data == nil` 进行判空处理,set 空列表而非报错,保证查询无数据时 Terraform 不报错。
+- **[查询时间范围限制 31 天]** → 由云 API 服务端校验,schema 层不强加校验,错误经 retry 包装透传。
diff --git a/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/proposal.md b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/proposal.md
new file mode 100644
index 0000000000..fdabdaacd0
--- /dev/null
+++ b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/proposal.md
@@ -0,0 +1,41 @@
+## Why
+
+Terraform Provider for TencentCloud 当前不支持查询 EdgeOne (TEO) 的计费数据。用户在以基础设施即代码方式管理 EdgeOne 站点时,无法通过 Terraform 数据源获取流量、带宽、请求数等计费指标数据,导致需要在 Terraform 之外使用额外工具来核对用量。新增 `tencentcloud_teo_billing_data` 数据源可填补这一空白,使用户能在 Terraform 中直接查询计费数据并用于配置编排或对账。
+
+## What Changes
+
+- 新增数据源 `tencentcloud_teo_billing_data`(RESOURCE_KIND_DATASOURCE),通过调用云 API `DescribeBillingData`(teo v20220901)读取计费数据。
+- 新增资源代码文件 `tencentcloud/services/teo/data_source_tc_teo_billing_data.go`,实现数据源 Read 逻辑(仅查询,不涉及创建/更新/删除)。
+- 新增单元测试文件 `tencentcloud/services/teo/data_source_tc_teo_billing_data_test.go`,使用 gomonkey mock 云 API 进行业务逻辑测试。
+- 新增文档样例文件 `tencentcloud/services/teo/data_source_tc_teo_billing_data.md`。
+- 在 `tencentcloud/provider.go` 和 `tencentcloud/provider.md` 中注册该数据源。
+
+### Schema 参数说明
+
+入参(均为查询条件,Optional):
+- `start_time` (string, Required): 起始时间。
+- `end_time` (string, Required): 结束时间,查询范围需 ≤ 31 天。
+- `zone_ids` (list of string, Required): 站点 ID 集合,最多 100 个;用 `*` 表示查询账号级别数据。
+- `metric_name` (string, Required): 计费指标名,如 `acc_flux`、`acc_bandwidth` 等。
+- `interval` (string, Optional): 查询时间粒度,取值 `5min` / `hour` / `day`。
+- `filters` (list of object, Optional): 过滤条件,每项包含 `type` 与 `value`,支持 `host`、`proxy-id`、`region-id`。
+- `group_by` (list of string, Optional): 分组聚合维度,取值 `zone-id`、`host`、`proxy-id`、`region-id`,最多两个维度。
+
+出参:
+- `data` (list of object, Computed): 计费数据点列表,每项包含 `time`、`value`、`zone_id`、`host`、`proxy_id`、`region_id`。
+- `id` (string, Computed): 数据源 ID,由查询参数组合生成,用于 Terraform 状态标识。
+
+## Capabilities
+
+### New Capabilities
+- `teo-billing-data`: 查询 EdgeOne 计费数据的数据源能力,封装 `DescribeBillingData` 云 API,支持按时间范围、站点、指标、时间粒度、过滤条件、分组维度查询用量数据。
+
+### Modified Capabilities
+
+
+## Impact
+
+- 新增代码:`data_source_tc_teo_billing_data.go`、`data_source_tc_teo_billing_data_test.go`、`data_source_tc_teo_billing_data.md`。
+- 修改文件:`tencentcloud/provider.go`(注册数据源)、`tencentcloud/provider.md`(文档注册)。
+- 依赖:使用 vendor 目录下已有的 `github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901` 包,无需新增第三方依赖。
+- 不影响任何现有资源/数据源的 schema 与行为,向后完全兼容。
diff --git a/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/specs/teo-billing-data/spec.md b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/specs/teo-billing-data/spec.md
new file mode 100644
index 0000000000..8948247e04
--- /dev/null
+++ b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/specs/teo-billing-data/spec.md
@@ -0,0 +1,90 @@
+## ADDED Requirements
+
+### Requirement: 数据源注册与声明
+
+系统 SHALL 在 Terraform Provider 中注册名为 `tencentcloud_teo_billing_data` 的数据源,类型为 RESOURCE_KIND_DATASOURCE,并在 `tencentcloud/provider.go` 中通过 `dataProvider` 工厂注册,同时在 `tencentcloud/provider.md` 中声明对应文档条目。
+
+#### Scenario: Provider 中注册数据源
+- **WHEN** 用户在 Terraform 配置中声明 `data "tencentcloud_teo_billing_data" "example"`
+- **THEN** Provider 能识别该数据源类型并调用其 Read 函数
+
+#### Scenario: 文档注册
+- **WHEN** 执行 `make doc` 文档生成
+- **THEN** `provider.md` 中包含 `tencentcloud_teo_billing_data` 数据源条目
+
+### Requirement: 查询计费数据
+
+数据源 SHALL 调用云 API `DescribeBillingData`(teo v20220901)查询 EdgeOne 计费数据,将入参映射到请求字段,将响应 `Data` 列表映射到 `data` 输出参数。
+
+#### Scenario: 带完整参数查询成功
+- **WHEN** 用户配置 `start_time`、`end_time`、`zone_ids`、`metric_name`、`interval`、`filters`、`group_by` 并执行 `terraform plan`
+- **THEN** 数据源将参数组装为 `DescribeBillingDataRequest` 调用云 API,并将响应中 `Data` 列表每项的 `Time`、`Value`、`ZoneId`、`Host`、`ProxyId`、`RegionId` 映射到 `data` 列表输出字段 `time`、`value`、`zone_id`、`host`、`proxy_id`、`region_id`
+
+#### Scenario: 仅必填参数查询成功
+- **WHEN** 用户仅配置 `start_time`、`end_time`、`zone_ids`、`metric_name`
+- **THEN** 数据源以 Optional 参数为空调用云 API,仍能正确返回数据并设置 `data` 输出
+
+#### Scenario: 查询返回空数据
+- **WHEN** 云 API 返回 `Data` 为 null 或空列表
+- **THEN** 数据源将 `data` 设置为空列表,且不报错
+
+### Requirement: 入参 Schema 定义
+
+数据源 SHALL 定义以下入参 schema 字段:
+- `start_time`(string, Required):起始时间。
+- `end_time`(string, Required):结束时间,查询范围 ≤ 31 天。
+- `zone_ids`(list of string, Required):站点 ID 集合,最多 100 个;`*` 表示账号级别。
+- `metric_name`(string, Required):计费指标名。
+- `interval`(string, Optional):查询时间粒度,取值 `5min` / `hour` / `day`。
+- `filters`(list of object, Optional):过滤条件,每项含 `type`(string, Required)、`value`(string, Required)。
+- `group_by`(list of string, Optional):分组聚合维度,取值 `zone-id` / `host` / `proxy-id` / `region-id`,最多两个维度。
+
+#### Scenario: Required 字段缺失
+- **WHEN** 用户配置缺少 `start_time` 或 `metric_name` 等必填字段
+- **THEN** Terraform 在 plan 阶段报错提示字段缺失
+
+#### Scenario: filters 结构
+- **WHEN** 用户配置 `filters` 包含多个 `{ type = "host", value = "test.example.com" }` 项
+- **THEN** 数据源将每个项映射为 `BillingDataFilter`(`Type`、`Value`)并传入请求 `Filters` 字段
+
+### Requirement: 出参 Schema 定义
+
+数据源 SHALL 定义以下出参 schema 字段:
+- `id`(string, Computed):数据源 ID,由查询参数组合生成。
+- `data`(list of object, Computed):计费数据点列表,每个 object 含 `time`(string)、`value`(integer)、`zone_id`(string)、`host`(string)、`proxy_id`(string)、`region_id`(string)。
+
+#### Scenario: id 生成
+- **WHEN** 数据源 Read 成功执行
+- **THEN** `id` 被设置为 `metric_name#start_time#end_time` 格式(使用 `FIELD_SP` 分隔符)
+
+#### Scenario: data 字段展开
+- **WHEN** 云 API 返回 `Data` 列表包含多个 `BillingData` 项
+- **THEN** `data` 输出列表每项对应一个 `BillingData`,且字段 `Time`/`Value`/`ZoneId`/`Host`/`ProxyId`/`RegionId` 分别映射到 `time`/`value`/`zone_id`/`host`/`proxy_id`/`region_id`
+
+### Requirement: 重试与错误处理
+
+数据源 Read 调用 `DescribeBillingData` 时 SHALL 使用 `tccommon.ReadRetryTimeout` 作为超时时间,通过 `helper.Retry()` 包装;失败时使用 `tccommon.RetryError()` 包装错误返回。retry 块内仅执行 API 调用,不执行 set 等操作。
+
+#### Scenario: 云 API 短暂失败重试
+- **WHEN** `DescribeBillingData` 调用返回临时性错误
+- **THEN** 数据源在 `ReadRetryTimeout` 内重试调用,直至成功或超时
+
+### Requirement: 空响应保护
+
+数据源 Read 的 retry 块内 SHALL 检查云 API 返回是否为空(`response == nil` 或 `response.Response == nil`),若为空则返回 `NonRetryableError` 而非直接 `d.SetId("")`,并在 retry 失败路径保留 `log.Printf("[DATASOURCE] read empty, skip SetId")` 提示。
+
+#### Scenario: 云 API 返回 nil 响应
+- **WHEN** `DescribeBillingData` 返回 `response == nil` 或 `response.Response == nil`
+- **THEN** 数据源返回 `NonRetryableError`,不清空 state 中的 id,并在日志中打印 `[DATASOURCE] read empty, skip SetId` 提示
+
+### Requirement: 单元测试
+
+数据源 SHALL 提供单元测试文件 `data_source_tc_teo_billing_data_test.go`,使用 gomonkey mock `DescribeBillingData` 云 API,测试业务逻辑(参数组装、响应解析、字段 set),不使用 Terraform 测试套件,通过 `go test -gcflags=all=-l` 运行。
+
+#### Scenario: mock 云 API 返回数据并验证字段映射
+- **WHEN** 运行单元测试,gomonkey mock `DescribeBillingData` 返回包含多个 `BillingData` 项的响应
+- **THEN** 测试验证 Read 函数正确组装请求参数并将响应字段设置到 `data` 输出
+
+#### Scenario: mock 云 API 返回空数据
+- **WHEN** 运行单元测试,gomonkey mock `DescribeBillingData` 返回 `Data` 为空
+- **THEN** 测试验证 Read 函数将 `data` 设置为空列表且不报错
diff --git a/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/tasks.md b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/tasks.md
new file mode 100644
index 0000000000..ebb15c265f
--- /dev/null
+++ b/openspec/changes/archive/2026-07-20-add-teo-billing-data-datasource/tasks.md
@@ -0,0 +1,27 @@
+## 1. 数据源代码实现
+
+- [x] 1.1 创建 `tencentcloud/services/teo/data_source_tc_teo_billing_data.go`,定义 `tencentcloud_teo_billing_data` 数据源 schema:入参 `start_time`(string,Required)、`end_time`(string,Required)、`zone_ids`(*[]string,Required)、`metric_name`(string,Required)、`interval`(string,Optional)、`filters`(*schema.List,Optional,elem 含 `type`/`value`)、`group_by`(*[]string,Optional);出参 `id`(string,Computed)、`data`(*schema.List,Computed,elem 含 `time`/`value`/`zone_id`/`host`/`proxy_id`/`region_id`)
+- [x] 1.2 实现数据源 Read 函数:在 `helper.Retry()` 块内(使用 `tccommon.ReadRetryTimeout`)调用 `DescribeBillingData`,组装请求参数(StartTime/EndTime/ZoneIds/MetricName/Interval/Filters/GroupBy);retry 块内仅执行 API 调用
+- [x] 1.3 在 Read 的 retry 块内检查空响应(`response == nil` / `response.Response == nil`),若为空返回 `NonRetryableError` 并在失败路径打印 `log.Printf("[DATASOURCE] read empty, skip SetId")`,不直接 `d.SetId("")`
+- [x] 1.4 在 retry 块外解析 `response.Response.Data`,将每个 `BillingData` 的 `Time`/`Value`/`ZoneId`/`Host`/`ProxyId`/`RegionId` 映射到 `data` 列表字段 `time`/`value`/`zone_id`/`host`/`proxy_id`/`region_id`(`Data` 为空时 set 空列表);设置 `d.SetId()` 为 `metric_name#start_time#end_time`(使用 `tccommon.FIELD_SP`);调用失败用 `tccommon.RetryError()` 包装错误;defer `tccommon.LogElapsed()` 与 `tccommon.InconsistentCheck()`
+
+## 2. Provider 注册
+
+- [x] 2.1 在 `tencentcloud/provider.go` 中注册 `tencentcloud_teo_billing_data` 数据源(参考 `tencentcloud_teo_content_quota` 等现有 TEO 数据源注册方式)
+- [x] 2.2 在 `tencentcloud/provider.md` 中添加 `tencentcloud_teo_billing_data` 数据源文档条目
+
+## 3. 文档样例
+
+- [x] 3.1 创建 `tencentcloud/services/teo/data_source_tc_teo_billing_data.md`:一句话描述("Use this data source to query ..." 带 TEO 产品名)、Example Usage(含完整参数示例,filters 使用合理值)、不包含 Argument/Attribute Reference 部分
+
+## 4. 单元测试
+
+- [x] 4.1 创建 `tencentcloud/services/teo/data_source_tc_teo_billing_data_test.go`,使用 gomonkey mock `DescribeBillingData` 云 API,编写测试用例:mock 返回含多个 `BillingData` 的响应,验证 Read 正确组装请求参数并设置 `data` 输出字段
+- [x] 4.2 补充 mock 返回空 `Data` 的测试用例,验证 `data` 设置为空列表且不报错
+- [x] 4.3 使用 `go test -gcflags=all=-l` 运行该测试文件,确保测试通过
+
+## 5. 验证
+
+- [x] 5.1 检查所有函数返回的 error 均被处理(必不出错的用 `_ =` 赋值)
+- [x] 5.2 确认未修改 `website/` 目录下任何文件(文档由 `make doc` 在收尾阶段生成)
+- [x] 5.3 确认未在 `.changelog/` 下新增文件(由收尾阶段处理)
diff --git a/openspec/specs/teo-billing-data/spec.md b/openspec/specs/teo-billing-data/spec.md
new file mode 100644
index 0000000000..8948247e04
--- /dev/null
+++ b/openspec/specs/teo-billing-data/spec.md
@@ -0,0 +1,90 @@
+## ADDED Requirements
+
+### Requirement: 数据源注册与声明
+
+系统 SHALL 在 Terraform Provider 中注册名为 `tencentcloud_teo_billing_data` 的数据源,类型为 RESOURCE_KIND_DATASOURCE,并在 `tencentcloud/provider.go` 中通过 `dataProvider` 工厂注册,同时在 `tencentcloud/provider.md` 中声明对应文档条目。
+
+#### Scenario: Provider 中注册数据源
+- **WHEN** 用户在 Terraform 配置中声明 `data "tencentcloud_teo_billing_data" "example"`
+- **THEN** Provider 能识别该数据源类型并调用其 Read 函数
+
+#### Scenario: 文档注册
+- **WHEN** 执行 `make doc` 文档生成
+- **THEN** `provider.md` 中包含 `tencentcloud_teo_billing_data` 数据源条目
+
+### Requirement: 查询计费数据
+
+数据源 SHALL 调用云 API `DescribeBillingData`(teo v20220901)查询 EdgeOne 计费数据,将入参映射到请求字段,将响应 `Data` 列表映射到 `data` 输出参数。
+
+#### Scenario: 带完整参数查询成功
+- **WHEN** 用户配置 `start_time`、`end_time`、`zone_ids`、`metric_name`、`interval`、`filters`、`group_by` 并执行 `terraform plan`
+- **THEN** 数据源将参数组装为 `DescribeBillingDataRequest` 调用云 API,并将响应中 `Data` 列表每项的 `Time`、`Value`、`ZoneId`、`Host`、`ProxyId`、`RegionId` 映射到 `data` 列表输出字段 `time`、`value`、`zone_id`、`host`、`proxy_id`、`region_id`
+
+#### Scenario: 仅必填参数查询成功
+- **WHEN** 用户仅配置 `start_time`、`end_time`、`zone_ids`、`metric_name`
+- **THEN** 数据源以 Optional 参数为空调用云 API,仍能正确返回数据并设置 `data` 输出
+
+#### Scenario: 查询返回空数据
+- **WHEN** 云 API 返回 `Data` 为 null 或空列表
+- **THEN** 数据源将 `data` 设置为空列表,且不报错
+
+### Requirement: 入参 Schema 定义
+
+数据源 SHALL 定义以下入参 schema 字段:
+- `start_time`(string, Required):起始时间。
+- `end_time`(string, Required):结束时间,查询范围 ≤ 31 天。
+- `zone_ids`(list of string, Required):站点 ID 集合,最多 100 个;`*` 表示账号级别。
+- `metric_name`(string, Required):计费指标名。
+- `interval`(string, Optional):查询时间粒度,取值 `5min` / `hour` / `day`。
+- `filters`(list of object, Optional):过滤条件,每项含 `type`(string, Required)、`value`(string, Required)。
+- `group_by`(list of string, Optional):分组聚合维度,取值 `zone-id` / `host` / `proxy-id` / `region-id`,最多两个维度。
+
+#### Scenario: Required 字段缺失
+- **WHEN** 用户配置缺少 `start_time` 或 `metric_name` 等必填字段
+- **THEN** Terraform 在 plan 阶段报错提示字段缺失
+
+#### Scenario: filters 结构
+- **WHEN** 用户配置 `filters` 包含多个 `{ type = "host", value = "test.example.com" }` 项
+- **THEN** 数据源将每个项映射为 `BillingDataFilter`(`Type`、`Value`)并传入请求 `Filters` 字段
+
+### Requirement: 出参 Schema 定义
+
+数据源 SHALL 定义以下出参 schema 字段:
+- `id`(string, Computed):数据源 ID,由查询参数组合生成。
+- `data`(list of object, Computed):计费数据点列表,每个 object 含 `time`(string)、`value`(integer)、`zone_id`(string)、`host`(string)、`proxy_id`(string)、`region_id`(string)。
+
+#### Scenario: id 生成
+- **WHEN** 数据源 Read 成功执行
+- **THEN** `id` 被设置为 `metric_name#start_time#end_time` 格式(使用 `FIELD_SP` 分隔符)
+
+#### Scenario: data 字段展开
+- **WHEN** 云 API 返回 `Data` 列表包含多个 `BillingData` 项
+- **THEN** `data` 输出列表每项对应一个 `BillingData`,且字段 `Time`/`Value`/`ZoneId`/`Host`/`ProxyId`/`RegionId` 分别映射到 `time`/`value`/`zone_id`/`host`/`proxy_id`/`region_id`
+
+### Requirement: 重试与错误处理
+
+数据源 Read 调用 `DescribeBillingData` 时 SHALL 使用 `tccommon.ReadRetryTimeout` 作为超时时间,通过 `helper.Retry()` 包装;失败时使用 `tccommon.RetryError()` 包装错误返回。retry 块内仅执行 API 调用,不执行 set 等操作。
+
+#### Scenario: 云 API 短暂失败重试
+- **WHEN** `DescribeBillingData` 调用返回临时性错误
+- **THEN** 数据源在 `ReadRetryTimeout` 内重试调用,直至成功或超时
+
+### Requirement: 空响应保护
+
+数据源 Read 的 retry 块内 SHALL 检查云 API 返回是否为空(`response == nil` 或 `response.Response == nil`),若为空则返回 `NonRetryableError` 而非直接 `d.SetId("")`,并在 retry 失败路径保留 `log.Printf("[DATASOURCE] read empty, skip SetId")` 提示。
+
+#### Scenario: 云 API 返回 nil 响应
+- **WHEN** `DescribeBillingData` 返回 `response == nil` 或 `response.Response == nil`
+- **THEN** 数据源返回 `NonRetryableError`,不清空 state 中的 id,并在日志中打印 `[DATASOURCE] read empty, skip SetId` 提示
+
+### Requirement: 单元测试
+
+数据源 SHALL 提供单元测试文件 `data_source_tc_teo_billing_data_test.go`,使用 gomonkey mock `DescribeBillingData` 云 API,测试业务逻辑(参数组装、响应解析、字段 set),不使用 Terraform 测试套件,通过 `go test -gcflags=all=-l` 运行。
+
+#### Scenario: mock 云 API 返回数据并验证字段映射
+- **WHEN** 运行单元测试,gomonkey mock `DescribeBillingData` 返回包含多个 `BillingData` 项的响应
+- **THEN** 测试验证 Read 函数正确组装请求参数并将响应字段设置到 `data` 输出
+
+#### Scenario: mock 云 API 返回空数据
+- **WHEN** 运行单元测试,gomonkey mock `DescribeBillingData` 返回 `Data` 为空
+- **THEN** 测试验证 Read 函数将 `data` 设置为空列表且不报错
diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go
index 75a483b307..299275d7a6 100644
--- a/tencentcloud/provider.go
+++ b/tencentcloud/provider.go
@@ -971,6 +971,7 @@ func Provider() *schema.Provider {
"tencentcloud_teo_security_ip_group_content": teo.DataSourceTencentCloudTeoSecurityIPGroupContent(),
"tencentcloud_teo_web_security_templates": teo.DataSourceTencentCloudTeoWebSecurityTemplates(),
"tencentcloud_teo_content_quota": teo.DataSourceTencentCloudTeoContentQuota(),
+ "tencentcloud_teo_billing_data": teo.DataSourceTencentCloudTeoBillingData(),
"tencentcloud_sts_caller_identity": sts.DataSourceTencentCloudStsCallerIdentity(),
"tencentcloud_dcdb_instances": dcdb.DataSourceTencentCloudDcdbInstances(),
"tencentcloud_dcdb_accounts": dcdb.DataSourceTencentCloudDcdbAccounts(),
diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md
index 9edb9f5258..3446cd5919 100644
--- a/tencentcloud/provider.md
+++ b/tencentcloud/provider.md
@@ -1596,6 +1596,7 @@ tencentcloud_teo_multi_path_gateway_origin_acl
tencentcloud_teo_security_ip_group_content
tencentcloud_teo_web_security_templates
tencentcloud_teo_content_quota
+tencentcloud_teo_billing_data
Resource
tencentcloud_teo_zone
diff --git a/tencentcloud/services/teo/data_source_tc_teo_billing_data.go b/tencentcloud/services/teo/data_source_tc_teo_billing_data.go
new file mode 100644
index 0000000000..4878adda65
--- /dev/null
+++ b/tencentcloud/services/teo/data_source_tc_teo_billing_data.go
@@ -0,0 +1,240 @@
+package teo
+
+import (
+ "context"
+ "log"
+ "strings"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+
+ tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit"
+)
+
+func DataSourceTencentCloudTeoBillingData() *schema.Resource {
+ return &schema.Resource{
+ Read: dataSourceTencentCloudTeoBillingDataRead,
+ Schema: map[string]*schema.Schema{
+ "start_time": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Start time.",
+ },
+
+ "end_time": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "End time. The query time range (`EndTime` - `StartTime`) must be less than or equal to 31 days.",
+ },
+
+ "zone_ids": {
+ Type: schema.TypeList,
+ Required: true,
+ MaxItems: 100,
+ Description: "Site ID collection, up to 100 site IDs. Use `*` to query account-level data of all sites under the current TencentCloud main account.",
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ },
+
+ "metric_name": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Billing metric name, such as `acc_flux`, `acc_bandwidth`, etc.",
+ },
+
+ "interval": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Query time granularity. Valid values: `5min`, `hour`, `day`.",
+ },
+
+ "filters": {
+ Type: schema.TypeList,
+ Optional: true,
+ Description: "Filter conditions. Each item contains `type` and `value`. Valid `type` values: `host`, `proxy-id`, `region-id`.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "type": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Parameter name. Valid values: `host`, `proxy-id`, `region-id`.",
+ },
+ "value": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Parameter value.",
+ },
+ },
+ },
+ },
+
+ "group_by": {
+ Type: schema.TypeList,
+ Optional: true,
+ Description: "Grouping and aggregation dimensions, up to two dimensions. Valid values: `zone-id`, `host`, `proxy-id`, `region-id`.",
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ },
+
+ "data": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Billing data point list.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "time": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Data timestamp.",
+ },
+ "value": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Numeric value.",
+ },
+ "zone_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Site ID to which the data point belongs.",
+ },
+ "host": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Domain name to which the data point belongs.",
+ },
+ "proxy_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Layer 4 proxy instance ID to which the data point belongs.",
+ },
+ "region_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Billing region ID to which the data point belongs.",
+ },
+ },
+ },
+ },
+
+ "result_output_file": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Used to save results.",
+ },
+ },
+ }
+}
+
+func dataSourceTencentCloudTeoBillingDataRead(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("data_source.tencentcloud_teo_billing_data.read")()
+ defer tccommon.InconsistentCheck(d, meta)
+
+ logId := tccommon.GetLogId(nil)
+ ctx := context.WithValue(context.TODO(), tccommon.LogIdKey, logId)
+ client := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseTeoClient()
+
+ request := teo.NewDescribeBillingDataRequest()
+ if v, ok := d.GetOk("start_time"); ok {
+ request.StartTime = helper.String(v.(string))
+ }
+ if v, ok := d.GetOk("end_time"); ok {
+ request.EndTime = helper.String(v.(string))
+ }
+ if v, ok := d.GetOk("zone_ids"); ok {
+ zoneIdsSet := v.([]interface{})
+ request.ZoneIds = helper.InterfacesStringsPoint(zoneIdsSet)
+ }
+ if v, ok := d.GetOk("metric_name"); ok {
+ request.MetricName = helper.String(v.(string))
+ }
+ if v, ok := d.GetOk("interval"); ok {
+ request.Interval = helper.String(v.(string))
+ }
+ if v, ok := d.GetOk("filters"); ok {
+ filtersSet := v.([]interface{})
+ tmpSet := make([]*teo.BillingDataFilter, 0, len(filtersSet))
+ for _, item := range filtersSet {
+ filter := teo.BillingDataFilter{}
+ filterMap := item.(map[string]interface{})
+ if v, ok := filterMap["type"].(string); ok && v != "" {
+ filter.Type = helper.String(v)
+ }
+ if v, ok := filterMap["value"].(string); ok && v != "" {
+ filter.Value = helper.String(v)
+ }
+ tmpSet = append(tmpSet, &filter)
+ }
+ request.Filters = tmpSet
+ }
+ if v, ok := d.GetOk("group_by"); ok {
+ groupBySet := v.([]interface{})
+ request.GroupBy = helper.InterfacesStringsPoint(groupBySet)
+ }
+
+ ratelimit.Check(request.GetAction())
+
+ var response *teo.DescribeBillingDataResponse
+ err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
+ resp, e := client.DescribeBillingDataWithContext(ctx, request)
+ if e != nil {
+ return tccommon.RetryError(e)
+ }
+ response = resp
+ if response == nil || response.Response == nil {
+ log.Printf("[DATASOURCE] read empty, skip SetId")
+ return resource.NonRetryableError(e)
+ }
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read tencentcloud_teo_billing_data failed, reason:%s\n", logId, err.Error())
+ return err
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ dataList := make([]map[string]interface{}, 0)
+ if response.Response.Data != nil {
+ for _, item := range response.Response.Data {
+ dataMap := map[string]interface{}{}
+ if item.Time != nil {
+ dataMap["time"] = item.Time
+ }
+ if item.Value != nil {
+ dataMap["value"] = int(*item.Value)
+ }
+ if item.ZoneId != nil {
+ dataMap["zone_id"] = item.ZoneId
+ }
+ if item.Host != nil {
+ dataMap["host"] = item.Host
+ }
+ if item.ProxyId != nil {
+ dataMap["proxy_id"] = item.ProxyId
+ }
+ if item.RegionId != nil {
+ dataMap["region_id"] = item.RegionId
+ }
+ dataList = append(dataList, dataMap)
+ }
+ }
+ _ = d.Set("data", dataList)
+
+ metricName := d.Get("metric_name").(string)
+ startTime := d.Get("start_time").(string)
+ endTime := d.Get("end_time").(string)
+ d.SetId(strings.Join([]string{metricName, startTime, endTime}, tccommon.FILED_SP))
+
+ output, ok := d.GetOk("result_output_file")
+ if ok && output.(string) != "" {
+ if e := tccommon.WriteToFile(output.(string), dataList); e != nil {
+ return e
+ }
+ }
+
+ return nil
+}
diff --git a/tencentcloud/services/teo/data_source_tc_teo_billing_data.md b/tencentcloud/services/teo/data_source_tc_teo_billing_data.md
new file mode 100644
index 0000000000..d8f6e47ab4
--- /dev/null
+++ b/tencentcloud/services/teo/data_source_tc_teo_billing_data.md
@@ -0,0 +1,18 @@
+Use this data source to query TEO billing data, such as traffic, bandwidth, and request metrics.
+
+Example Usage
+
+```hcl
+data "tencentcloud_teo_billing_data" "example" {
+ start_time = "2025-01-01T00:00:00+08:00"
+ end_time = "2025-01-02T00:00:00+08:00"
+ zone_ids = ["zone-2qtuhspy7cr6"]
+ metric_name = "acc_flux"
+ interval = "hour"
+ filters {
+ type = "host"
+ value = "test.example.com"
+ }
+ group_by = ["zone-id", "host"]
+}
+```
diff --git a/tencentcloud/services/teo/data_source_tc_teo_billing_data_test.go b/tencentcloud/services/teo/data_source_tc_teo_billing_data_test.go
new file mode 100644
index 0000000000..77d89ab310
--- /dev/null
+++ b/tencentcloud/services/teo/data_source_tc_teo_billing_data_test.go
@@ -0,0 +1,195 @@
+package teo_test
+
+import (
+ "context"
+ "testing"
+
+ "github.com/agiledragon/gomonkey/v2"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ "github.com/stretchr/testify/assert"
+ teov20220901 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+
+ tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/teo"
+)
+
+// go test ./tencentcloud/services/teo/ -run "TestTeoBillingDataDataSource" -v -count=1 -gcflags="all=-l"
+
+type mockMetaBillingData struct {
+ client *connectivity.TencentCloudClient
+}
+
+func (m *mockMetaBillingData) GetAPIV3Conn() *connectivity.TencentCloudClient {
+ return m.client
+}
+
+var _ tccommon.ProviderMeta = &mockMetaBillingData{}
+
+func newMockMetaBillingData() *mockMetaBillingData {
+ return &mockMetaBillingData{client: &connectivity.TencentCloudClient{}}
+}
+
+func ptrStringBillingData(s string) *string {
+ return &s
+}
+
+func ptrUint64BillingData(n uint64) *uint64 {
+ return &n
+}
+
+// TestTeoBillingDataDataSource_ReadSuccess tests successful read with billing data
+func TestTeoBillingDataDataSource_ReadSuccess(t *testing.T) {
+ patches := gomonkey.NewPatches()
+ defer patches.Reset()
+
+ teoClient := &teov20220901.Client{}
+ patches.ApplyMethodReturn(newMockMetaBillingData().client, "UseTeoClient", teoClient)
+
+ patches.ApplyMethodFunc(teoClient, "DescribeBillingDataWithContext", func(_ context.Context, request *teov20220901.DescribeBillingDataRequest) (*teov20220901.DescribeBillingDataResponse, error) {
+ assert.Equal(t, "2025-01-01T00:00:00+08:00", *request.StartTime)
+ assert.Equal(t, "2025-01-02T00:00:00+08:00", *request.EndTime)
+ assert.Equal(t, "acc_flux", *request.MetricName)
+ assert.Equal(t, "hour", *request.Interval)
+
+ resp := teov20220901.NewDescribeBillingDataResponse()
+ resp.Response = &teov20220901.DescribeBillingDataResponseParams{
+ Data: []*teov20220901.BillingData{
+ {
+ Time: ptrStringBillingData("2025-01-01T00:00:00+08:00"),
+ Value: ptrUint64BillingData(1024),
+ ZoneId: ptrStringBillingData("zone-2qtuhspy7cr6"),
+ Host: ptrStringBillingData("test.example.com"),
+ ProxyId: ptrStringBillingData("sid-2rugn89bkla9"),
+ RegionId: ptrStringBillingData("CH"),
+ },
+ {
+ Time: ptrStringBillingData("2025-01-01T01:00:00+08:00"),
+ Value: ptrUint64BillingData(2048),
+ ZoneId: ptrStringBillingData("zone-2qtuhspy7cr6"),
+ Host: ptrStringBillingData("test.example.com"),
+ ProxyId: ptrStringBillingData("sid-2rugn89bkla9"),
+ RegionId: ptrStringBillingData("CH"),
+ },
+ },
+ RequestId: ptrStringBillingData("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ meta := newMockMetaBillingData()
+ res := teo.DataSourceTencentCloudTeoBillingData()
+ d := schema.TestResourceDataRaw(t, res.Schema, map[string]interface{}{
+ "start_time": "2025-01-01T00:00:00+08:00",
+ "end_time": "2025-01-02T00:00:00+08:00",
+ "zone_ids": []interface{}{"zone-2qtuhspy7cr6"},
+ "metric_name": "acc_flux",
+ "interval": "hour",
+ })
+
+ err := res.Read(d, meta)
+ assert.NoError(t, err)
+ assert.NotEmpty(t, d.Id())
+ assert.Equal(t, "acc_flux#2025-01-01T00:00:00+08:00#2025-01-02T00:00:00+08:00", d.Id())
+
+ dataList := d.Get("data").([]interface{})
+ assert.Len(t, dataList, 2)
+ dataMap := dataList[0].(map[string]interface{})
+ assert.Equal(t, "2025-01-01T00:00:00+08:00", dataMap["time"])
+ assert.Equal(t, int(1024), dataMap["value"])
+ assert.Equal(t, "zone-2qtuhspy7cr6", dataMap["zone_id"])
+ assert.Equal(t, "test.example.com", dataMap["host"])
+ assert.Equal(t, "sid-2rugn89bkla9", dataMap["proxy_id"])
+ assert.Equal(t, "CH", dataMap["region_id"])
+
+ dataMap2 := dataList[1].(map[string]interface{})
+ assert.Equal(t, int(2048), dataMap2["value"])
+}
+
+// TestTeoBillingDataDataSource_ReadEmptyData tests read when API returns empty Data list
+func TestTeoBillingDataDataSource_ReadEmptyData(t *testing.T) {
+ patches := gomonkey.NewPatches()
+ defer patches.Reset()
+
+ teoClient := &teov20220901.Client{}
+ patches.ApplyMethodReturn(newMockMetaBillingData().client, "UseTeoClient", teoClient)
+
+ patches.ApplyMethodFunc(teoClient, "DescribeBillingDataWithContext", func(_ context.Context, request *teov20220901.DescribeBillingDataRequest) (*teov20220901.DescribeBillingDataResponse, error) {
+ resp := teov20220901.NewDescribeBillingDataResponse()
+ resp.Response = &teov20220901.DescribeBillingDataResponseParams{
+ Data: nil,
+ RequestId: ptrStringBillingData("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ meta := newMockMetaBillingData()
+ res := teo.DataSourceTencentCloudTeoBillingData()
+ d := schema.TestResourceDataRaw(t, res.Schema, map[string]interface{}{
+ "start_time": "2025-01-01T00:00:00+08:00",
+ "end_time": "2025-01-02T00:00:00+08:00",
+ "zone_ids": []interface{}{"zone-2qtuhspy7cr6"},
+ "metric_name": "acc_flux",
+ })
+
+ err := res.Read(d, meta)
+ assert.NoError(t, err)
+ assert.NotEmpty(t, d.Id())
+
+ dataList := d.Get("data").([]interface{})
+ assert.Len(t, dataList, 0)
+}
+
+// TestTeoBillingDataDataSource_Schema validates schema definition
+func TestTeoBillingDataDataSource_Schema(t *testing.T) {
+ res := teo.DataSourceTencentCloudTeoBillingData()
+
+ assert.NotNil(t, res)
+ assert.NotNil(t, res.Read)
+
+ assert.Contains(t, res.Schema, "start_time")
+ assert.Contains(t, res.Schema, "end_time")
+ assert.Contains(t, res.Schema, "zone_ids")
+ assert.Contains(t, res.Schema, "metric_name")
+ assert.Contains(t, res.Schema, "interval")
+ assert.Contains(t, res.Schema, "filters")
+ assert.Contains(t, res.Schema, "group_by")
+ assert.Contains(t, res.Schema, "data")
+ assert.Contains(t, res.Schema, "result_output_file")
+
+ startTime := res.Schema["start_time"]
+ assert.Equal(t, schema.TypeString, startTime.Type)
+ assert.True(t, startTime.Required)
+
+ endTime := res.Schema["end_time"]
+ assert.Equal(t, schema.TypeString, endTime.Type)
+ assert.True(t, endTime.Required)
+
+ zoneIds := res.Schema["zone_ids"]
+ assert.Equal(t, schema.TypeList, zoneIds.Type)
+ assert.True(t, zoneIds.Required)
+
+ metricName := res.Schema["metric_name"]
+ assert.Equal(t, schema.TypeString, metricName.Type)
+ assert.True(t, metricName.Required)
+
+ interval := res.Schema["interval"]
+ assert.Equal(t, schema.TypeString, interval.Type)
+ assert.True(t, interval.Optional)
+
+ filters := res.Schema["filters"]
+ assert.Equal(t, schema.TypeList, filters.Type)
+ assert.True(t, filters.Optional)
+
+ groupBy := res.Schema["group_by"]
+ assert.Equal(t, schema.TypeList, groupBy.Type)
+ assert.True(t, groupBy.Optional)
+
+ data := res.Schema["data"]
+ assert.Equal(t, schema.TypeList, data.Type)
+ assert.True(t, data.Computed)
+
+ outputFile := res.Schema["result_output_file"]
+ assert.Equal(t, schema.TypeString, outputFile.Type)
+ assert.True(t, outputFile.Optional)
+}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go
index 06ef2177be..2cb0c861f1 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go
@@ -3,7 +3,6 @@ package common
import (
"context"
"io"
-
//"log"
"math/rand"
"net/url"
@@ -266,7 +265,7 @@ func CompleteCommonParams(request Request, region string, requestClient string)
params["Action"] = request.GetAction()
params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10)
params["Nonce"] = strconv.Itoa(rand.Int())
- params["RequestClient"] = "SDK_GO_1.3.132"
+ params["RequestClient"] = "SDK_GO_1.3.136"
if requestClient != "" {
params["RequestClient"] += ": " + requestClient
}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/doc.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/doc.go
deleted file mode 100644
index 67693c9381..0000000000
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/doc.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package doc
-package doc
\ No newline at end of file
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go
index 4187b36832..48f9f247d9 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go
@@ -1645,6 +1645,118 @@ func (c *Client) CreateFunctionRuleWithContext(ctx context.Context, request *Cre
return
}
+func NewCreateInferenceAPITokenRequest() (request *CreateInferenceAPITokenRequest) {
+ request = &CreateInferenceAPITokenRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateInferenceAPIToken")
+
+
+ return
+}
+
+func NewCreateInferenceAPITokenResponse() (response *CreateInferenceAPITokenResponse) {
+ response = &CreateInferenceAPITokenResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateInferenceAPIToken
+// 创建推理 API Token,用于访问推理服务时进行鉴权,Token 内容仅在创建时返回一次,每个站点最多创建 100 个。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// LIMITEXCEEDED = "LimitExceeded"
+func (c *Client) CreateInferenceAPIToken(request *CreateInferenceAPITokenRequest) (response *CreateInferenceAPITokenResponse, err error) {
+ return c.CreateInferenceAPITokenWithContext(context.Background(), request)
+}
+
+// CreateInferenceAPIToken
+// 创建推理 API Token,用于访问推理服务时进行鉴权,Token 内容仅在创建时返回一次,每个站点最多创建 100 个。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// LIMITEXCEEDED = "LimitExceeded"
+func (c *Client) CreateInferenceAPITokenWithContext(ctx context.Context, request *CreateInferenceAPITokenRequest) (response *CreateInferenceAPITokenResponse, err error) {
+ if request == nil {
+ request = NewCreateInferenceAPITokenRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "CreateInferenceAPIToken")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateInferenceAPIToken require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateInferenceAPITokenResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewCreateInferenceServiceRequest() (request *CreateInferenceServiceRequest) {
+ request = &CreateInferenceServiceRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateInferenceService")
+
+
+ return
+}
+
+func NewCreateInferenceServiceResponse() (response *CreateInferenceServiceResponse) {
+ response = &CreateInferenceServiceResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateInferenceService
+// 创建推理服务,支持设置服务名称、监听端口、容器镜像配置和资源配置,创建成功后提供推理访问地址。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERVALUE_INFERENCESERVICENAME = "InvalidParameterValue.InferenceServiceName"
+// INVALIDPARAMETERVALUE_INFERENCESERVICENAMEDUPLICATE = "InvalidParameterValue.InferenceServiceNameDuplicate"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// LIMITEXCEEDED_INFERENCESERVICE = "LimitExceeded.InferenceService"
+// OPERATIONDENIED = "OperationDenied"
+func (c *Client) CreateInferenceService(request *CreateInferenceServiceRequest) (response *CreateInferenceServiceResponse, err error) {
+ return c.CreateInferenceServiceWithContext(context.Background(), request)
+}
+
+// CreateInferenceService
+// 创建推理服务,支持设置服务名称、监听端口、容器镜像配置和资源配置,创建成功后提供推理访问地址。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERVALUE_INFERENCESERVICENAME = "InvalidParameterValue.InferenceServiceName"
+// INVALIDPARAMETERVALUE_INFERENCESERVICENAMEDUPLICATE = "InvalidParameterValue.InferenceServiceNameDuplicate"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// LIMITEXCEEDED_INFERENCESERVICE = "LimitExceeded.InferenceService"
+// OPERATIONDENIED = "OperationDenied"
+func (c *Client) CreateInferenceServiceWithContext(ctx context.Context, request *CreateInferenceServiceRequest) (response *CreateInferenceServiceResponse, err error) {
+ if request == nil {
+ request = NewCreateInferenceServiceRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "CreateInferenceService")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateInferenceService require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateInferenceServiceResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewCreateJustInTimeTranscodeTemplateRequest() (request *CreateJustInTimeTranscodeTemplateRequest) {
request = &CreateJustInTimeTranscodeTemplateRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -2191,6 +2303,80 @@ func (c *Client) CreateLoadBalancerWithContext(ctx context.Context, request *Cre
return
}
+func NewCreateLogAnalysisDownloadTaskRequest() (request *CreateLogAnalysisDownloadTaskRequest) {
+ request = &CreateLogAnalysisDownloadTaskRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateLogAnalysisDownloadTask")
+
+
+ return
+}
+
+func NewCreateLogAnalysisDownloadTaskResponse() (response *CreateLogAnalysisDownloadTaskResponse) {
+ response = &CreateLogAnalysisDownloadTaskResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateLogAnalysisDownloadTask
+// 本接口用以创建日志分析下载任务,创建完成后可通过 DescribeLogAnalysisDownloadTasks 接口查询下载任务。
+//
+// 注意:
+//
+// 1.单次最多支持下载 5000万条日志。
+//
+// 2.日志文件将保留 3 天。
+//
+// 3.同时存在多个任务时将按照任务创建时间依次处理。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER_LOADBALANCERBINDORIGINGROUPINVALID = "InvalidParameter.LoadBalancerBindOriginGroupInvalid"
+// INVALIDPARAMETER_LOADBALANCERNAMEREPEATED = "InvalidParameter.LoadBalancerNameRepeated"
+// INVALIDPARAMETER_ORIGINGROUPTYPECANNOTMATCHLBTYPE = "InvalidParameter.OriginGroupTypeCanNotMatchLBType"
+// INVALIDPARAMETER_SOMEORIGINGROUPNOTEXIST = "InvalidParameter.SomeOriginGroupNotExist"
+// LIMITEXCEEDED_LOADBALANCINGCOUNTLIMITEXCEEDED = "LimitExceeded.LoadBalancingCountLimitExceeded"
+func (c *Client) CreateLogAnalysisDownloadTask(request *CreateLogAnalysisDownloadTaskRequest) (response *CreateLogAnalysisDownloadTaskResponse, err error) {
+ return c.CreateLogAnalysisDownloadTaskWithContext(context.Background(), request)
+}
+
+// CreateLogAnalysisDownloadTask
+// 本接口用以创建日志分析下载任务,创建完成后可通过 DescribeLogAnalysisDownloadTasks 接口查询下载任务。
+//
+// 注意:
+//
+// 1.单次最多支持下载 5000万条日志。
+//
+// 2.日志文件将保留 3 天。
+//
+// 3.同时存在多个任务时将按照任务创建时间依次处理。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER_LOADBALANCERBINDORIGINGROUPINVALID = "InvalidParameter.LoadBalancerBindOriginGroupInvalid"
+// INVALIDPARAMETER_LOADBALANCERNAMEREPEATED = "InvalidParameter.LoadBalancerNameRepeated"
+// INVALIDPARAMETER_ORIGINGROUPTYPECANNOTMATCHLBTYPE = "InvalidParameter.OriginGroupTypeCanNotMatchLBType"
+// INVALIDPARAMETER_SOMEORIGINGROUPNOTEXIST = "InvalidParameter.SomeOriginGroupNotExist"
+// LIMITEXCEEDED_LOADBALANCINGCOUNTLIMITEXCEEDED = "LimitExceeded.LoadBalancingCountLimitExceeded"
+func (c *Client) CreateLogAnalysisDownloadTaskWithContext(ctx context.Context, request *CreateLogAnalysisDownloadTaskRequest) (response *CreateLogAnalysisDownloadTaskResponse, err error) {
+ if request == nil {
+ request = NewCreateLogAnalysisDownloadTaskRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "CreateLogAnalysisDownloadTask")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateLogAnalysisDownloadTask require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateLogAnalysisDownloadTaskResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewCreateMultiPathGatewayRequest() (request *CreateMultiPathGatewayRequest) {
request = &CreateMultiPathGatewayRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -4765,6 +4951,58 @@ func (c *Client) DeleteFunctionRulesWithContext(ctx context.Context, request *De
return
}
+func NewDeleteInferenceAPITokenRequest() (request *DeleteInferenceAPITokenRequest) {
+ request = &DeleteInferenceAPITokenRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DeleteInferenceAPIToken")
+
+
+ return
+}
+
+func NewDeleteInferenceAPITokenResponse() (response *DeleteInferenceAPITokenResponse) {
+ response = &DeleteInferenceAPITokenResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DeleteInferenceAPIToken
+// 删除推理 API Token,删除后该 Token 立即失效,使用其访问推理服务的请求将无法通过鉴权。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DeleteInferenceAPIToken(request *DeleteInferenceAPITokenRequest) (response *DeleteInferenceAPITokenResponse, err error) {
+ return c.DeleteInferenceAPITokenWithContext(context.Background(), request)
+}
+
+// DeleteInferenceAPIToken
+// 删除推理 API Token,删除后该 Token 立即失效,使用其访问推理服务的请求将无法通过鉴权。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DeleteInferenceAPITokenWithContext(ctx context.Context, request *DeleteInferenceAPITokenRequest) (response *DeleteInferenceAPITokenResponse, err error) {
+ if request == nil {
+ request = NewDeleteInferenceAPITokenRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DeleteInferenceAPIToken")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DeleteInferenceAPIToken require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDeleteInferenceAPITokenResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDeleteJustInTimeTranscodeTemplatesRequest() (request *DeleteJustInTimeTranscodeTemplatesRequest) {
request = &DeleteJustInTimeTranscodeTemplatesRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -7355,202 +7593,530 @@ func (c *Client) DescribeFunctions(request *DescribeFunctionsRequest) (response
return c.DescribeFunctionsWithContext(context.Background(), request)
}
-// DescribeFunctions
-// 查询边缘函数列表,支持函数 ID、函数名称、描述等条件的过滤。
+// DescribeFunctions
+// 查询边缘函数列表,支持函数 ID、函数名称、描述等条件的过滤。
+//
+// 可能返回的错误码:
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
+// INVALIDPARAMETER_INVALIDFILTERNAME = "InvalidParameter.InvalidFilterName"
+// INVALIDPARAMETER_LENGTHEXCEEDSLIMIT = "InvalidParameter.LengthExceedsLimit"
+// INVALIDPARAMETER_TOOMANYFILTERVALUES = "InvalidParameter.TooManyFilterValues"
+// INVALIDPARAMETER_TOOMANYFILTERS = "InvalidParameter.TooManyFilters"
+// RESOURCEUNAVAILABLE_FUNCTIONNOTFOUND = "ResourceUnavailable.FunctionNotFound"
+// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
+func (c *Client) DescribeFunctionsWithContext(ctx context.Context, request *DescribeFunctionsRequest) (response *DescribeFunctionsResponse, err error) {
+ if request == nil {
+ request = NewDescribeFunctionsRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeFunctions")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeFunctions require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeFunctionsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeHostsSettingRequest() (request *DescribeHostsSettingRequest) {
+ request = &DescribeHostsSettingRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeHostsSetting")
+
+
+ return
+}
+
+func NewDescribeHostsSettingResponse() (response *DescribeHostsSettingResponse) {
+ response = &DescribeHostsSettingResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeHostsSetting
+// 本接口为旧版,EdgeOne 已对规则引擎相关接口全面升级,可通过 [DescribeL7AccSetting](https://cloud.tencent.com/document/product/1552/115819) 和 [DescribeL7AccRules](https://cloud.tencent.com/document/product/1552/115820) 来获取域名的详细配置。
+//
+// 可能返回的错误码:
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INVALIDPARAMETER = "InvalidParameter"
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
+func (c *Client) DescribeHostsSetting(request *DescribeHostsSettingRequest) (response *DescribeHostsSettingResponse, err error) {
+ return c.DescribeHostsSettingWithContext(context.Background(), request)
+}
+
+// DescribeHostsSetting
+// 本接口为旧版,EdgeOne 已对规则引擎相关接口全面升级,可通过 [DescribeL7AccSetting](https://cloud.tencent.com/document/product/1552/115819) 和 [DescribeL7AccRules](https://cloud.tencent.com/document/product/1552/115820) 来获取域名的详细配置。
+//
+// 可能返回的错误码:
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INVALIDPARAMETER = "InvalidParameter"
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
+func (c *Client) DescribeHostsSettingWithContext(ctx context.Context, request *DescribeHostsSettingRequest) (response *DescribeHostsSettingResponse, err error) {
+ if request == nil {
+ request = NewDescribeHostsSettingRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeHostsSetting")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeHostsSetting require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeHostsSettingResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeIPRegionRequest() (request *DescribeIPRegionRequest) {
+ request = &DescribeIPRegionRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeIPRegion")
+
+
+ return
+}
+
+func NewDescribeIPRegionResponse() (response *DescribeIPRegionResponse) {
+ response = &DescribeIPRegionResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeIPRegion
+// 该接口可用于查询 IP 是否为 EdgeOne IP。
+//
+// 可能返回的错误码:
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+func (c *Client) DescribeIPRegion(request *DescribeIPRegionRequest) (response *DescribeIPRegionResponse, err error) {
+ return c.DescribeIPRegionWithContext(context.Background(), request)
+}
+
+// DescribeIPRegion
+// 该接口可用于查询 IP 是否为 EdgeOne IP。
+//
+// 可能返回的错误码:
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+func (c *Client) DescribeIPRegionWithContext(ctx context.Context, request *DescribeIPRegionRequest) (response *DescribeIPRegionResponse, err error) {
+ if request == nil {
+ request = NewDescribeIPRegionRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeIPRegion")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeIPRegion require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeIPRegionResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeIdentificationsRequest() (request *DescribeIdentificationsRequest) {
+ request = &DescribeIdentificationsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeIdentifications")
+
+
+ return
+}
+
+func NewDescribeIdentificationsResponse() (response *DescribeIdentificationsResponse) {
+ response = &DescribeIdentificationsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeIdentifications
+// 查询站点的验证信息。
+//
+// 可能返回的错误码:
+// OPERATIONDENIED_DOMAININSHARECNAMEGROUP = "OperationDenied.DomainInShareCnameGroup"
+// OPERATIONDENIED_ERRZONEISALREADYPAUSED = "OperationDenied.ErrZoneIsAlreadyPaused"
+// OPERATIONDENIED_RESOURCELOCKEDTEMPORARY = "OperationDenied.ResourceLockedTemporary"
+// RESOURCENOTFOUND = "ResourceNotFound"
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
+func (c *Client) DescribeIdentifications(request *DescribeIdentificationsRequest) (response *DescribeIdentificationsResponse, err error) {
+ return c.DescribeIdentificationsWithContext(context.Background(), request)
+}
+
+// DescribeIdentifications
+// 查询站点的验证信息。
+//
+// 可能返回的错误码:
+// OPERATIONDENIED_DOMAININSHARECNAMEGROUP = "OperationDenied.DomainInShareCnameGroup"
+// OPERATIONDENIED_ERRZONEISALREADYPAUSED = "OperationDenied.ErrZoneIsAlreadyPaused"
+// OPERATIONDENIED_RESOURCELOCKEDTEMPORARY = "OperationDenied.ResourceLockedTemporary"
+// RESOURCENOTFOUND = "ResourceNotFound"
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
+func (c *Client) DescribeIdentificationsWithContext(ctx context.Context, request *DescribeIdentificationsRequest) (response *DescribeIdentificationsResponse, err error) {
+ if request == nil {
+ request = NewDescribeIdentificationsRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeIdentifications")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeIdentifications require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeIdentificationsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeInferenceAPITokensRequest() (request *DescribeInferenceAPITokensRequest) {
+ request = &DescribeInferenceAPITokensRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeInferenceAPITokens")
+
+
+ return
+}
+
+func NewDescribeInferenceAPITokensResponse() (response *DescribeInferenceAPITokensResponse) {
+ response = &DescribeInferenceAPITokensResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeInferenceAPITokens
+// 查询推理 API Token 列表,返回 Token 的 ID、名称、内容和创建时间,支持分页查询。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceAPITokens(request *DescribeInferenceAPITokensRequest) (response *DescribeInferenceAPITokensResponse, err error) {
+ return c.DescribeInferenceAPITokensWithContext(context.Background(), request)
+}
+
+// DescribeInferenceAPITokens
+// 查询推理 API Token 列表,返回 Token 的 ID、名称、内容和创建时间,支持分页查询。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceAPITokensWithContext(ctx context.Context, request *DescribeInferenceAPITokensRequest) (response *DescribeInferenceAPITokensResponse, err error) {
+ if request == nil {
+ request = NewDescribeInferenceAPITokensRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeInferenceAPITokens")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeInferenceAPITokens require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeInferenceAPITokensResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeInferenceHardwareSpecificationsRequest() (request *DescribeInferenceHardwareSpecificationsRequest) {
+ request = &DescribeInferenceHardwareSpecificationsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeInferenceHardwareSpecifications")
+
+
+ return
+}
+
+func NewDescribeInferenceHardwareSpecificationsResponse() (response *DescribeInferenceHardwareSpecificationsResponse) {
+ response = &DescribeInferenceHardwareSpecificationsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeInferenceHardwareSpecifications
+// 查询推理硬件规格列表,返回各规格的 CPU、内存、GPU 和显存等配置,创建服务时可从中选择所需规格。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceHardwareSpecifications(request *DescribeInferenceHardwareSpecificationsRequest) (response *DescribeInferenceHardwareSpecificationsResponse, err error) {
+ return c.DescribeInferenceHardwareSpecificationsWithContext(context.Background(), request)
+}
+
+// DescribeInferenceHardwareSpecifications
+// 查询推理硬件规格列表,返回各规格的 CPU、内存、GPU 和显存等配置,创建服务时可从中选择所需规格。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceHardwareSpecificationsWithContext(ctx context.Context, request *DescribeInferenceHardwareSpecificationsRequest) (response *DescribeInferenceHardwareSpecificationsResponse, err error) {
+ if request == nil {
+ request = NewDescribeInferenceHardwareSpecificationsRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeInferenceHardwareSpecifications")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeInferenceHardwareSpecifications require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeInferenceHardwareSpecificationsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeInferenceServiceDeploymentLogsRequest() (request *DescribeInferenceServiceDeploymentLogsRequest) {
+ request = &DescribeInferenceServiceDeploymentLogsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeInferenceServiceDeploymentLogs")
+
+
+ return
+}
+
+func NewDescribeInferenceServiceDeploymentLogsResponse() (response *DescribeInferenceServiceDeploymentLogsResponse) {
+ response = &DescribeInferenceServiceDeploymentLogsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeInferenceServiceDeploymentLogs
+// 查询推理服务指定一次部署的日志,返回日志内容和产生时间,支持按时间范围检索、分页和排序。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceServiceDeploymentLogs(request *DescribeInferenceServiceDeploymentLogsRequest) (response *DescribeInferenceServiceDeploymentLogsResponse, err error) {
+ return c.DescribeInferenceServiceDeploymentLogsWithContext(context.Background(), request)
+}
+
+// DescribeInferenceServiceDeploymentLogs
+// 查询推理服务指定一次部署的日志,返回日志内容和产生时间,支持按时间范围检索、分页和排序。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
-// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
-// INVALIDPARAMETER_INVALIDFILTERNAME = "InvalidParameter.InvalidFilterName"
-// INVALIDPARAMETER_LENGTHEXCEEDSLIMIT = "InvalidParameter.LengthExceedsLimit"
-// INVALIDPARAMETER_TOOMANYFILTERVALUES = "InvalidParameter.TooManyFilterValues"
-// INVALIDPARAMETER_TOOMANYFILTERS = "InvalidParameter.TooManyFilters"
-// RESOURCEUNAVAILABLE_FUNCTIONNOTFOUND = "ResourceUnavailable.FunctionNotFound"
-// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
-func (c *Client) DescribeFunctionsWithContext(ctx context.Context, request *DescribeFunctionsRequest) (response *DescribeFunctionsResponse, err error) {
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceServiceDeploymentLogsWithContext(ctx context.Context, request *DescribeInferenceServiceDeploymentLogsRequest) (response *DescribeInferenceServiceDeploymentLogsResponse, err error) {
if request == nil {
- request = NewDescribeFunctionsRequest()
+ request = NewDescribeInferenceServiceDeploymentLogsRequest()
}
- c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeFunctions")
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeInferenceServiceDeploymentLogs")
if c.GetCredential() == nil {
- return nil, errors.New("DescribeFunctions require credential")
+ return nil, errors.New("DescribeInferenceServiceDeploymentLogs require credential")
}
request.SetContext(ctx)
- response = NewDescribeFunctionsResponse()
+ response = NewDescribeInferenceServiceDeploymentLogsResponse()
err = c.Send(request, response)
return
}
-func NewDescribeHostsSettingRequest() (request *DescribeHostsSettingRequest) {
- request = &DescribeHostsSettingRequest{
+func NewDescribeInferenceServiceDeploymentRecordsRequest() (request *DescribeInferenceServiceDeploymentRecordsRequest) {
+ request = &DescribeInferenceServiceDeploymentRecordsRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeHostsSetting")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeInferenceServiceDeploymentRecords")
return
}
-func NewDescribeHostsSettingResponse() (response *DescribeHostsSettingResponse) {
- response = &DescribeHostsSettingResponse{
+func NewDescribeInferenceServiceDeploymentRecordsResponse() (response *DescribeInferenceServiceDeploymentRecordsResponse) {
+ response = &DescribeInferenceServiceDeploymentRecordsResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeHostsSetting
-// 本接口为旧版,EdgeOne 已对规则引擎相关接口全面升级,可通过 [DescribeL7AccSetting](https://cloud.tencent.com/document/product/1552/115819) 和 [DescribeL7AccRules](https://cloud.tencent.com/document/product/1552/115820) 来获取域名的详细配置。
+// DescribeInferenceServiceDeploymentRecords
+// 查询推理服务部署历史列表,返回每次部署的操作类型、状态、耗时、配置快照和是否为当前生效配置,支持分页和排序。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
-// OPERATIONDENIED = "OperationDenied"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
-func (c *Client) DescribeHostsSetting(request *DescribeHostsSettingRequest) (response *DescribeHostsSettingResponse, err error) {
- return c.DescribeHostsSettingWithContext(context.Background(), request)
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// RESOURCENOTFOUND = "ResourceNotFound"
+func (c *Client) DescribeInferenceServiceDeploymentRecords(request *DescribeInferenceServiceDeploymentRecordsRequest) (response *DescribeInferenceServiceDeploymentRecordsResponse, err error) {
+ return c.DescribeInferenceServiceDeploymentRecordsWithContext(context.Background(), request)
}
-// DescribeHostsSetting
-// 本接口为旧版,EdgeOne 已对规则引擎相关接口全面升级,可通过 [DescribeL7AccSetting](https://cloud.tencent.com/document/product/1552/115819) 和 [DescribeL7AccRules](https://cloud.tencent.com/document/product/1552/115820) 来获取域名的详细配置。
+// DescribeInferenceServiceDeploymentRecords
+// 查询推理服务部署历史列表,返回每次部署的操作类型、状态、耗时、配置快照和是否为当前生效配置,支持分页和排序。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
-// OPERATIONDENIED = "OperationDenied"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
-func (c *Client) DescribeHostsSettingWithContext(ctx context.Context, request *DescribeHostsSettingRequest) (response *DescribeHostsSettingResponse, err error) {
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// RESOURCENOTFOUND = "ResourceNotFound"
+func (c *Client) DescribeInferenceServiceDeploymentRecordsWithContext(ctx context.Context, request *DescribeInferenceServiceDeploymentRecordsRequest) (response *DescribeInferenceServiceDeploymentRecordsResponse, err error) {
if request == nil {
- request = NewDescribeHostsSettingRequest()
+ request = NewDescribeInferenceServiceDeploymentRecordsRequest()
}
- c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeHostsSetting")
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeInferenceServiceDeploymentRecords")
if c.GetCredential() == nil {
- return nil, errors.New("DescribeHostsSetting require credential")
+ return nil, errors.New("DescribeInferenceServiceDeploymentRecords require credential")
}
request.SetContext(ctx)
- response = NewDescribeHostsSettingResponse()
+ response = NewDescribeInferenceServiceDeploymentRecordsResponse()
err = c.Send(request, response)
return
}
-func NewDescribeIPRegionRequest() (request *DescribeIPRegionRequest) {
- request = &DescribeIPRegionRequest{
+func NewDescribeInferenceServiceMonitorDataRequest() (request *DescribeInferenceServiceMonitorDataRequest) {
+ request = &DescribeInferenceServiceMonitorDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeIPRegion")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeInferenceServiceMonitorData")
return
}
-func NewDescribeIPRegionResponse() (response *DescribeIPRegionResponse) {
- response = &DescribeIPRegionResponse{
+func NewDescribeInferenceServiceMonitorDataResponse() (response *DescribeInferenceServiceMonitorDataResponse) {
+ response = &DescribeInferenceServiceMonitorDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeIPRegion
-// 该接口可用于查询 IP 是否为 EdgeOne IP。
+// DescribeInferenceServiceMonitorData
+// 查询推理服务监控数据,支持 CPU、内存、GPU、显存使用率和实例数量等指标,可指定时间范围和聚合粒度,最多查询最近 30 天的数据。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-func (c *Client) DescribeIPRegion(request *DescribeIPRegionRequest) (response *DescribeIPRegionResponse, err error) {
- return c.DescribeIPRegionWithContext(context.Background(), request)
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceServiceMonitorData(request *DescribeInferenceServiceMonitorDataRequest) (response *DescribeInferenceServiceMonitorDataResponse, err error) {
+ return c.DescribeInferenceServiceMonitorDataWithContext(context.Background(), request)
}
-// DescribeIPRegion
-// 该接口可用于查询 IP 是否为 EdgeOne IP。
+// DescribeInferenceServiceMonitorData
+// 查询推理服务监控数据,支持 CPU、内存、GPU、显存使用率和实例数量等指标,可指定时间范围和聚合粒度,最多查询最近 30 天的数据。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-func (c *Client) DescribeIPRegionWithContext(ctx context.Context, request *DescribeIPRegionRequest) (response *DescribeIPRegionResponse, err error) {
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceServiceMonitorDataWithContext(ctx context.Context, request *DescribeInferenceServiceMonitorDataRequest) (response *DescribeInferenceServiceMonitorDataResponse, err error) {
if request == nil {
- request = NewDescribeIPRegionRequest()
+ request = NewDescribeInferenceServiceMonitorDataRequest()
}
- c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeIPRegion")
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeInferenceServiceMonitorData")
if c.GetCredential() == nil {
- return nil, errors.New("DescribeIPRegion require credential")
+ return nil, errors.New("DescribeInferenceServiceMonitorData require credential")
}
request.SetContext(ctx)
- response = NewDescribeIPRegionResponse()
+ response = NewDescribeInferenceServiceMonitorDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeIdentificationsRequest() (request *DescribeIdentificationsRequest) {
- request = &DescribeIdentificationsRequest{
+func NewDescribeInferenceServicesRequest() (request *DescribeInferenceServicesRequest) {
+ request = &DescribeInferenceServicesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeIdentifications")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeInferenceServices")
return
}
-func NewDescribeIdentificationsResponse() (response *DescribeIdentificationsResponse) {
- response = &DescribeIdentificationsResponse{
+func NewDescribeInferenceServicesResponse() (response *DescribeInferenceServicesResponse) {
+ response = &DescribeInferenceServicesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeIdentifications
-// 查询站点的验证信息。
+// DescribeInferenceServices
+// 查询推理服务列表,支持按服务名称、服务 ID、状态过滤,返回服务的配置、运行状态、实例数和推理访问地址等信息。
//
// 可能返回的错误码:
-// OPERATIONDENIED_DOMAININSHARECNAMEGROUP = "OperationDenied.DomainInShareCnameGroup"
-// OPERATIONDENIED_ERRZONEISALREADYPAUSED = "OperationDenied.ErrZoneIsAlreadyPaused"
-// OPERATIONDENIED_RESOURCELOCKEDTEMPORARY = "OperationDenied.ResourceLockedTemporary"
-// RESOURCENOTFOUND = "ResourceNotFound"
-// RESOURCEUNAVAILABLE = "ResourceUnavailable"
-func (c *Client) DescribeIdentifications(request *DescribeIdentificationsRequest) (response *DescribeIdentificationsResponse, err error) {
- return c.DescribeIdentificationsWithContext(context.Background(), request)
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceServices(request *DescribeInferenceServicesRequest) (response *DescribeInferenceServicesResponse, err error) {
+ return c.DescribeInferenceServicesWithContext(context.Background(), request)
}
-// DescribeIdentifications
-// 查询站点的验证信息。
+// DescribeInferenceServices
+// 查询推理服务列表,支持按服务名称、服务 ID、状态过滤,返回服务的配置、运行状态、实例数和推理访问地址等信息。
//
// 可能返回的错误码:
-// OPERATIONDENIED_DOMAININSHARECNAMEGROUP = "OperationDenied.DomainInShareCnameGroup"
-// OPERATIONDENIED_ERRZONEISALREADYPAUSED = "OperationDenied.ErrZoneIsAlreadyPaused"
-// OPERATIONDENIED_RESOURCELOCKEDTEMPORARY = "OperationDenied.ResourceLockedTemporary"
-// RESOURCENOTFOUND = "ResourceNotFound"
-// RESOURCEUNAVAILABLE = "ResourceUnavailable"
-func (c *Client) DescribeIdentificationsWithContext(ctx context.Context, request *DescribeIdentificationsRequest) (response *DescribeIdentificationsResponse, err error) {
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+func (c *Client) DescribeInferenceServicesWithContext(ctx context.Context, request *DescribeInferenceServicesRequest) (response *DescribeInferenceServicesResponse, err error) {
if request == nil {
- request = NewDescribeIdentificationsRequest()
+ request = NewDescribeInferenceServicesRequest()
}
- c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeIdentifications")
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeInferenceServices")
if c.GetCredential() == nil {
- return nil, errors.New("DescribeIdentifications require credential")
+ return nil, errors.New("DescribeInferenceServices require credential")
}
request.SetContext(ctx)
- response = NewDescribeIdentificationsResponse()
+ response = NewDescribeInferenceServicesResponse()
err = c.Send(request, response)
return
}
@@ -7901,6 +8467,108 @@ func (c *Client) DescribeLoadBalancerListWithContext(ctx context.Context, reques
return
}
+func NewDescribeLogAnalysisDetailRequest() (request *DescribeLogAnalysisDetailRequest) {
+ request = &DescribeLogAnalysisDetailRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeLogAnalysisDetail")
+
+
+ return
+}
+
+func NewDescribeLogAnalysisDetailResponse() (response *DescribeLogAnalysisDetailResponse) {
+ response = &DescribeLogAnalysisDetailResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeLogAnalysisDetail
+// 本接口用以查询日志分析日志详情,数据来自站点下实时日志推送任务目的地为 "log-analysis" 的任务推送的日志数据。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeLogAnalysisDetail(request *DescribeLogAnalysisDetailRequest) (response *DescribeLogAnalysisDetailResponse, err error) {
+ return c.DescribeLogAnalysisDetailWithContext(context.Background(), request)
+}
+
+// DescribeLogAnalysisDetail
+// 本接口用以查询日志分析日志详情,数据来自站点下实时日志推送任务目的地为 "log-analysis" 的任务推送的日志数据。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeLogAnalysisDetailWithContext(ctx context.Context, request *DescribeLogAnalysisDetailRequest) (response *DescribeLogAnalysisDetailResponse, err error) {
+ if request == nil {
+ request = NewDescribeLogAnalysisDetailRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeLogAnalysisDetail")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeLogAnalysisDetail require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeLogAnalysisDetailResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeLogAnalysisDownloadTasksRequest() (request *DescribeLogAnalysisDownloadTasksRequest) {
+ request = &DescribeLogAnalysisDownloadTasksRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeLogAnalysisDownloadTasks")
+
+
+ return
+}
+
+func NewDescribeLogAnalysisDownloadTasksResponse() (response *DescribeLogAnalysisDownloadTasksResponse) {
+ response = &DescribeLogAnalysisDownloadTasksResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeLogAnalysisDownloadTasks
+// 本接口用以查询日志分析日志下载任务列表。注意:只保留最近三天的下载任务记录。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION_REALTIMELOGLOGANALYSISNOTSUPPORT = "FailedOperation.RealtimeLogLogAnalysisNotSupport"
+// INVALIDPARAMETER_INVALIDLOGANALYSISCONDITION = "InvalidParameter.InvalidLogAnalysisCondition"
+func (c *Client) DescribeLogAnalysisDownloadTasks(request *DescribeLogAnalysisDownloadTasksRequest) (response *DescribeLogAnalysisDownloadTasksResponse, err error) {
+ return c.DescribeLogAnalysisDownloadTasksWithContext(context.Background(), request)
+}
+
+// DescribeLogAnalysisDownloadTasks
+// 本接口用以查询日志分析日志下载任务列表。注意:只保留最近三天的下载任务记录。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION_REALTIMELOGLOGANALYSISNOTSUPPORT = "FailedOperation.RealtimeLogLogAnalysisNotSupport"
+// INVALIDPARAMETER_INVALIDLOGANALYSISCONDITION = "InvalidParameter.InvalidLogAnalysisCondition"
+func (c *Client) DescribeLogAnalysisDownloadTasksWithContext(ctx context.Context, request *DescribeLogAnalysisDownloadTasksRequest) (response *DescribeLogAnalysisDownloadTasksResponse, err error) {
+ if request == nil {
+ request = NewDescribeLogAnalysisDownloadTasksRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeLogAnalysisDownloadTasks")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeLogAnalysisDownloadTasks require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeLogAnalysisDownloadTasksResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDescribeMultiPathGatewayRequest() (request *DescribeMultiPathGatewayRequest) {
request = &DescribeMultiPathGatewayRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -12421,6 +13089,60 @@ func (c *Client) ModifyHostsCertificateWithContext(ctx context.Context, request
return
}
+func NewModifyInferenceServiceRequest() (request *ModifyInferenceServiceRequest) {
+ request = &ModifyInferenceServiceRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "ModifyInferenceService")
+
+
+ return
+}
+
+func NewModifyInferenceServiceResponse() (response *ModifyInferenceServiceResponse) {
+ response = &ModifyInferenceServiceResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyInferenceService
+// 修改推理服务,支持更新监听端口、请求路径、容器镜像、资源配置和描述信息,仅传入的参数会被修改,未传入的参数保持不变。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// RESOURCENOTFOUND_INFERENCESERVICE = "ResourceNotFound.InferenceService"
+func (c *Client) ModifyInferenceService(request *ModifyInferenceServiceRequest) (response *ModifyInferenceServiceResponse, err error) {
+ return c.ModifyInferenceServiceWithContext(context.Background(), request)
+}
+
+// ModifyInferenceService
+// 修改推理服务,支持更新监听端口、请求路径、容器镜像、资源配置和描述信息,仅传入的参数会被修改,未传入的参数保持不变。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// RESOURCENOTFOUND_INFERENCESERVICE = "ResourceNotFound.InferenceService"
+func (c *Client) ModifyInferenceServiceWithContext(ctx context.Context, request *ModifyInferenceServiceRequest) (response *ModifyInferenceServiceResponse, err error) {
+ if request == nil {
+ request = NewModifyInferenceServiceRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "ModifyInferenceService")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyInferenceService require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyInferenceServiceResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewModifyL4ProxyRequest() (request *ModifyL4ProxyRequest) {
request = &ModifyL4ProxyRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -15493,6 +16215,60 @@ func (c *Client) ModifyZoneWorkModeWithContext(ctx context.Context, request *Mod
return
}
+func NewOperateInferenceServiceRequest() (request *OperateInferenceServiceRequest) {
+ request = &OperateInferenceServiceRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "OperateInferenceService")
+
+
+ return
+}
+
+func NewOperateInferenceServiceResponse() (response *OperateInferenceServiceResponse) {
+ response = &OperateInferenceServiceResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// OperateInferenceService
+// 操作推理服务,支持停止、启动和删除推理服务,删除后资源不可恢复。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// RESOURCENOTFOUND_INFERENCESERVICE = "ResourceNotFound.InferenceService"
+func (c *Client) OperateInferenceService(request *OperateInferenceServiceRequest) (response *OperateInferenceServiceResponse, err error) {
+ return c.OperateInferenceServiceWithContext(context.Background(), request)
+}
+
+// OperateInferenceService
+// 操作推理服务,支持停止、启动和删除推理服务,删除后资源不可恢复。
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETERVALUE_ZONENOTFOUND = "InvalidParameterValue.ZoneNotFound"
+// RESOURCENOTFOUND_INFERENCESERVICE = "ResourceNotFound.InferenceService"
+func (c *Client) OperateInferenceServiceWithContext(ctx context.Context, request *OperateInferenceServiceRequest) (response *OperateInferenceServiceResponse, err error) {
+ if request == nil {
+ request = NewOperateInferenceServiceRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "OperateInferenceService")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("OperateInferenceService require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewOperateInferenceServiceResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewRefreshMultiPathGatewaySecretKeyRequest() (request *RefreshMultiPathGatewaySecretKeyRequest) {
request = &RefreshMultiPathGatewaySecretKeyRequest{
BaseRequest: &tchttp.BaseRequest{},
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/errors.go
index c77de25956..133d2d7d56 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/errors.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/errors.go
@@ -116,6 +116,9 @@ const (
// 实时日志认证失败
FAILEDOPERATION_REALTIMELOGAUTHFAILURE = "FailedOperation.RealtimeLogAuthFailure"
+ // 当前不支持创建 EdgeOne 日志分析类型的实时日志推送任务。
+ FAILEDOPERATION_REALTIMELOGLOGANALYSISNOTSUPPORT = "FailedOperation.RealtimeLogLogAnalysisNotSupport"
+
// 实时日志推送任务不存在
FAILEDOPERATION_REALTIMELOGNOTFOUND = "FailedOperation.RealtimeLogNotFound"
@@ -506,6 +509,9 @@ const (
// 无效的Ipv6开关配置。
INVALIDPARAMETER_INVALIDIPV6SWITCH = "InvalidParameter.InvalidIpv6Switch"
+ // 无效的日志分析匹配条件,查询语句解析失败。
+ INVALIDPARAMETER_INVALIDLOGANALYSISCONDITION = "InvalidParameter.InvalidLogAnalysisCondition"
+
// 日志输出格式的字段分隔符不正确
INVALIDPARAMETER_INVALIDLOGFORMATFIELDDELIMITER = "InvalidParameter.InvalidLogFormatFieldDelimiter"
@@ -971,6 +977,12 @@ const (
// 包含无效的值。
INVALIDPARAMETERVALUE_INCLUDEINVALIDVALUE = "InvalidParameterValue.IncludeInvalidValue"
+ // 推理服务名称格式错误。
+ INVALIDPARAMETERVALUE_INFERENCESERVICENAME = "InvalidParameterValue.InferenceServiceName"
+
+ // 推理服务名称重复。
+ INVALIDPARAMETERVALUE_INFERENCESERVICENAMEDUPLICATE = "InvalidParameterValue.InferenceServiceNameDuplicate"
+
// 别称域名名称不合法,别称域名应该由数字、英文字母、连词符组成,且连词符不能位于开头和结尾处。
INVALIDPARAMETERVALUE_INVALIDALIASDOMAINNAME = "InvalidParameterValue.InvalidAliasDomainName"
@@ -1100,6 +1112,9 @@ const (
// 函数数量达到限制。
LIMITEXCEEDED_FUNCTIONLIMITEXCEEDED = "LimitExceeded.FunctionLimitExceeded"
+ // 推理服务数量超限。
+ LIMITEXCEEDED_INFERENCESERVICE = "LimitExceeded.InferenceService"
+
// 负载均衡数量超过限制。
LIMITEXCEEDED_LOADBALANCINGCOUNTLIMITEXCEEDED = "LimitExceeded.LoadBalancingCountLimitExceeded"
@@ -1499,6 +1514,9 @@ const (
// DNSPod 未正常接入该域名,请在 DNSPod 接入后重试。
RESOURCENOTFOUND_DNSPODDOMAINNOTINACCOUNT = "ResourceNotFound.DNSPodDomainNotInAccount"
+ // 推理服务不存在。
+ RESOURCENOTFOUND_INFERENCESERVICE = "ResourceNotFound.InferenceService"
+
// 最大上传大小额度未配置
RESOURCENOTFOUND_POSTMAXSIZEQUOTANOTFOUND = "ResourceNotFound.PostMaxSizeQuotaNotFound"
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go
index beeb341b35..f8646682b3 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go
@@ -3505,6 +3505,172 @@ func (r *CreateFunctionRuleResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+// Predefined struct for user
+type CreateInferenceAPITokenRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理 API Token 的名称,长度限制不超过 30 个字符。
+ Name *string `json:"Name,omitnil,omitempty" name:"Name"`
+}
+
+type CreateInferenceAPITokenRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理 API Token 的名称,长度限制不超过 30 个字符。
+ Name *string `json:"Name,omitnil,omitempty" name:"Name"`
+}
+
+func (r *CreateInferenceAPITokenRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *CreateInferenceAPITokenRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Name")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateInferenceAPITokenRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateInferenceAPITokenResponseParams struct {
+ // 推理 API Token ID。
+ TokenId *string `json:"TokenId,omitnil,omitempty" name:"TokenId"`
+
+ // 推理 API Token 内容。
+ Content *string `json:"Content,omitnil,omitempty" name:"Content"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type CreateInferenceAPITokenResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateInferenceAPITokenResponseParams `json:"Response"`
+}
+
+func (r *CreateInferenceAPITokenResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *CreateInferenceAPITokenResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateInferenceServiceRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务的名称。长度限制不超过 30 个字符,仅支持小写字母、数字、连字符,以字母开头,数字或字母结尾,不支持重复。
+ Name *string `json:"Name,omitnil,omitempty" name:"Name"`
+
+ // 模型服务需要监听的端口。仅支持 1-65535 之间的整数。
+ ListenPort *int64 `json:"ListenPort,omitnil,omitempty" name:"ListenPort"`
+
+ // 推理服务的容器配置。当前仅支持设置 1 个容器。
+ Containers []*InferenceContainerConfig `json:"Containers,omitnil,omitempty" name:"Containers"`
+
+ // 推理服务的资源配置。
+ ResourceConfig *InferenceResourceConfig `json:"ResourceConfig,omitnil,omitempty" name:"ResourceConfig"`
+
+ // 推理服务的请求路径列表。最多支持 20 个路径。
+ RequestPaths []*string `json:"RequestPaths,omitnil,omitempty" name:"RequestPaths"`
+
+ // 描述信息。长度限制不超过 60 个字符。
+ Description *string `json:"Description,omitnil,omitempty" name:"Description"`
+}
+
+type CreateInferenceServiceRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务的名称。长度限制不超过 30 个字符,仅支持小写字母、数字、连字符,以字母开头,数字或字母结尾,不支持重复。
+ Name *string `json:"Name,omitnil,omitempty" name:"Name"`
+
+ // 模型服务需要监听的端口。仅支持 1-65535 之间的整数。
+ ListenPort *int64 `json:"ListenPort,omitnil,omitempty" name:"ListenPort"`
+
+ // 推理服务的容器配置。当前仅支持设置 1 个容器。
+ Containers []*InferenceContainerConfig `json:"Containers,omitnil,omitempty" name:"Containers"`
+
+ // 推理服务的资源配置。
+ ResourceConfig *InferenceResourceConfig `json:"ResourceConfig,omitnil,omitempty" name:"ResourceConfig"`
+
+ // 推理服务的请求路径列表。最多支持 20 个路径。
+ RequestPaths []*string `json:"RequestPaths,omitnil,omitempty" name:"RequestPaths"`
+
+ // 描述信息。长度限制不超过 60 个字符。
+ Description *string `json:"Description,omitnil,omitempty" name:"Description"`
+}
+
+func (r *CreateInferenceServiceRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *CreateInferenceServiceRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Name")
+ delete(f, "ListenPort")
+ delete(f, "Containers")
+ delete(f, "ResourceConfig")
+ delete(f, "RequestPaths")
+ delete(f, "Description")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateInferenceServiceRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateInferenceServiceResponseParams struct {
+ // 服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type CreateInferenceServiceResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateInferenceServiceResponseParams `json:"Response"`
+}
+
+func (r *CreateInferenceServiceResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *CreateInferenceServiceResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
// Predefined struct for user
type CreateJustInTimeTranscodeTemplateRequestParams struct {
// 站点ID。
@@ -3979,6 +4145,112 @@ func (r *CreateLoadBalancerResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+// Predefined struct for user
+type CreateLogAnalysisDownloadTaskRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 数据归属地区,可选值:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
注意:若站点服务区域为“全球可用区”,获取全部数据需要分别查询 mainland 和 overseas 的数据。
+ Area *string `json:"Area,omitnil,omitempty" name:"Area"`
+
+ // 开始时间,示例值:2020-04-29T00:00:00Z。套餐版本不同,支持的可查询开始时间至今的最大时间跨度不同,详情请见 套餐选型对比。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 结束时间,示例值:2020-04-30T00:00:00Z。单次查询的开始时间到结束时间跨度最大为 31 天。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 日志类型,可选值:
- l7-access-logs:七层访问日志;
- web-attack:托管规则日志。
默认为 l7-access-logs 。
+ LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
+
+ // 日志匹配条件,最大长度 12KB。
+ Condition *string `json:"Condition,omitnil,omitempty" name:"Condition"`
+
+ // 文件格式,可选值:
默认为 csv。
+ Format *string `json:"Format,omitnil,omitempty" name:"Format"`
+
+ // 原始日志的时间排序,可选值:
默认为 desc。
+ Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"`
+}
+
+type CreateLogAnalysisDownloadTaskRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 数据归属地区,可选值:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
注意:若站点服务区域为“全球可用区”,获取全部数据需要分别查询 mainland 和 overseas 的数据。
+ Area *string `json:"Area,omitnil,omitempty" name:"Area"`
+
+ // 开始时间,示例值:2020-04-29T00:00:00Z。套餐版本不同,支持的可查询开始时间至今的最大时间跨度不同,详情请见 套餐选型对比。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 结束时间,示例值:2020-04-30T00:00:00Z。单次查询的开始时间到结束时间跨度最大为 31 天。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 日志类型,可选值:
- l7-access-logs:七层访问日志;
- web-attack:托管规则日志。
默认为 l7-access-logs 。
+ LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
+
+ // 日志匹配条件,最大长度 12KB。
+ Condition *string `json:"Condition,omitnil,omitempty" name:"Condition"`
+
+ // 文件格式,可选值:
默认为 csv。
+ Format *string `json:"Format,omitnil,omitempty" name:"Format"`
+
+ // 原始日志的时间排序,可选值:
默认为 desc。
+ Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"`
+}
+
+func (r *CreateLogAnalysisDownloadTaskRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *CreateLogAnalysisDownloadTaskRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Area")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "LogType")
+ delete(f, "Condition")
+ delete(f, "Format")
+ delete(f, "Sort")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLogAnalysisDownloadTaskRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateLogAnalysisDownloadTaskResponseParams struct {
+ // 日志分析下载任务 ID。
+ TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type CreateLogAnalysisDownloadTaskResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateLogAnalysisDownloadTaskResponseParams `json:"Response"`
+}
+
+func (r *CreateLogAnalysisDownloadTaskResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *CreateLogAnalysisDownloadTaskResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
// Predefined struct for user
type CreateMultiPathGatewayLineRequestParams struct {
// 站点 ID 。
@@ -4744,92 +5016,92 @@ func (r *CreatePurgeTaskResponse) FromJsonString(s string) error {
// Predefined struct for user
type CreateRealtimeLogDeliveryTaskRequestParams struct {
- // 站点 ID。
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
- // 数据投递区域,可选值:- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
+ // 数据投递区域,可选值:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
Area *string `json:"Area,omitnil,omitempty" name:"Area"`
- // 数据投递类型,可选值:- domain:站点加速日志;
- application:四层代理日志;
- function:边缘函数运行日志;
- web-rateLiming:速率限制和 CC 攻击防护日志;
- web-attack:托管规则日志;
- web-rule:自定义规则日志;
- web-bot:Bot管理日志。
+ // 数据投递类型,可选值:
- l7-access-logs:七层访问日志;
- application:四层代理日志;
- function:边缘函数运行日志;
- web-attack:托管规则日志;
以下类型日志合并入 l7-access-logs,不再支持新增:- domain:站点加速日志;
- web-rateLiming:速率限制和 CC 攻击防护日志;
- web-rule:自定义规则日志;
- web-bot:Bot 管理日志。
LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
- // 实时日志投递任务的名称,格式为数字、英文、-和_组合,最多 200 个字符。
+ // 实时日志投递任务的名称,格式为数字、英文、-和_组合,最多 200 个字符。
TaskName *string `json:"TaskName,omitnil,omitempty" name:"TaskName"`
- // 实时日志投递任务类型,取值有:- cls: 推送到腾讯云 CLS;
- custom_endpoint:推送到自定义 HTTP(S) 地址;
- s3:推送到 AWS S3 兼容存储桶地址;
- log_analysis:推送到 EdgeOne 日志分析,仅当 LogType = domain 或 web-attack 时支持。
+ // 实时日志投递任务类型,取值有:
- cls: 推送到腾讯云 CLS;
- custom_endpoint:推送到自定义 HTTP(S) 地址;
- s3:推送到 AWS S3 兼容存储桶地址;
- log_analysis:推送到 EdgeOne 日志分析,仅当 LogType = l7-access-logs 或 web-attack 时支持。
TaskType *string `json:"TaskType,omitnil,omitempty" name:"TaskType"`
- // 实时日志投递任务对应的实体列表。取值示例如下:- 七层域名:domain.example.com
- 四层代理实例:sid-2s69eb5wcms7
- 边缘函数实例:test-zone-2mxigizoh9l9-1257626257
+ // 实时日志投递任务对应的实体列表。取值示例如下:
- 七层域名:domain.example.com
- 四层代理实例:sid-2s69eb5wcms7
- 边缘函数实例:test-zone-2mxigizoh9l9-1257626257
取值参考:DescribeL4Proxy
EntityList []*string `json:"EntityList,omitnil,omitempty" name:"EntityList"`
- // 投递的预设字段列表。取值参考:- [站点加速日志(七层访问日志)](https://cloud.tencent.com/document/product/1552/105791)
- [四层代理日志](https://cloud.tencent.com/document/product/1552/105792)
- [边缘函数运行日志](https://cloud.tencent.com/document/product/1552/115585)
+ // 投递的预设字段列表。取值参考:
取值参考:DescribeLogFields
Fields []*string `json:"Fields,omitnil,omitempty" name:"Fields"`
- // 投递的自定义字段列表,支持在 HTTP 请求头、响应头、Cookie、请求正文中提取指定内容。自定义字段名称不能重复,且最多不能超过 200 个字段。单个实时日志推送任务最多添加 5 个请求正文类型的自定义字段。目前仅站点加速日志(LogType=domain)支持添加自定义字段。
+ // 投递的自定义字段列表,支持在 HTTP 请求头、响应头、Cookie、请求正文中提取指定内容。
自定义字段名称不能重复,仅七层访问日志(LogType= l7-access-logs 或 domain)支持添加自定义字段。
允许配置的自定义字段个数有配额限制,如遇配额不足请 [联系我们](https://cloud.tencent.com/online-service?from=sales&source=PRESALE)。
CustomFields []*CustomField `json:"CustomFields,omitnil,omitempty" name:"CustomFields"`
- // 日志投递的过滤条件,不填表示投递全量日志。
+ // 日志投递的过滤条件,不填表示投递全量日志。
DeliveryConditions []*DeliveryCondition `json:"DeliveryConditions,omitnil,omitempty" name:"DeliveryConditions"`
- // 采样比例,采用千分制,取值范围为1-1000,例如:填写 605 表示采样比例为 60.5%。不填表示采样比例为 100%。
+ // 采样比例,采用千分制,取值范围为1-1000,例如:填写 605 表示采样比例为 60.5%。不填表示采样比例为 100%。
Sample *uint64 `json:"Sample,omitnil,omitempty" name:"Sample"`
- // 日志投递的输出格式。不填表示为默认格式,默认格式逻辑如下:- 当 TaskType 取值为 custom_endpoint 时,默认格式为多个 JSON 对象组成的数组,每个 JSON 对象为一条日志;
- 当 TaskType 取值为 s3 时,默认格式为 JSON Lines;
特别地,当 TaskType 取值为 cls 或 log_analysis 时,LogFormat.FormatType 的值只能为 json,且 LogFormat 中其他参数将被忽略,建议不传 LogFormat。
+ // 日志投递的输出格式,使用详情见 自定义日志输出格式。不填表示为默认格式,默认格式逻辑如下:
- 当 TaskType 取值为 custom_endpoint 时,默认格式为多个 JSON 对象组成的数组,每个 JSON 对象为一条日志;
- 当 TaskType 取值为 s3 时,默认格式为 JSON Lines;
特别地,当 TaskType 取值为 cls 或 log_analysis 时,LogFormat.FormatType 的值只能为 json,且 LogFormat 中其他参数将被忽略,建议不传 LogFormat。
LogFormat *LogFormat `json:"LogFormat,omitnil,omitempty" name:"LogFormat"`
- // CLS 的配置信息。当 TaskType 取值为 cls 时,该参数必填。
+ // CLS 的配置信息。当 TaskType 取值为 cls 时,该参数必填。
CLS *CLSTopic `json:"CLS,omitnil,omitempty" name:"CLS"`
- // 自定义 HTTP 服务的配置信息。当 TaskType 取值为 custom_endpoint 时,该参数必填。
+ // 自定义 HTTP 服务的配置信息。当 TaskType 取值为 custom_endpoint 时,该参数必填。
CustomEndpoint *CustomEndpoint `json:"CustomEndpoint,omitnil,omitempty" name:"CustomEndpoint"`
- // AWS S3 兼容存储桶的配置信息。当 TaskType 取值为 s3 时,该参数必填。
+ // AWS S3 兼容存储桶的配置信息。当 TaskType 取值为 s3 时,该参数必填。
S3 *S3 `json:"S3,omitnil,omitempty" name:"S3"`
}
type CreateRealtimeLogDeliveryTaskRequest struct {
*tchttp.BaseRequest
- // 站点 ID。
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
- // 数据投递区域,可选值:- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
+ // 数据投递区域,可选值:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
Area *string `json:"Area,omitnil,omitempty" name:"Area"`
- // 数据投递类型,可选值:- domain:站点加速日志;
- application:四层代理日志;
- function:边缘函数运行日志;
- web-rateLiming:速率限制和 CC 攻击防护日志;
- web-attack:托管规则日志;
- web-rule:自定义规则日志;
- web-bot:Bot管理日志。
+ // 数据投递类型,可选值:
- l7-access-logs:七层访问日志;
- application:四层代理日志;
- function:边缘函数运行日志;
- web-attack:托管规则日志;
以下类型日志合并入 l7-access-logs,不再支持新增:- domain:站点加速日志;
- web-rateLiming:速率限制和 CC 攻击防护日志;
- web-rule:自定义规则日志;
- web-bot:Bot 管理日志。
LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
- // 实时日志投递任务的名称,格式为数字、英文、-和_组合,最多 200 个字符。
+ // 实时日志投递任务的名称,格式为数字、英文、-和_组合,最多 200 个字符。
TaskName *string `json:"TaskName,omitnil,omitempty" name:"TaskName"`
- // 实时日志投递任务类型,取值有:- cls: 推送到腾讯云 CLS;
- custom_endpoint:推送到自定义 HTTP(S) 地址;
- s3:推送到 AWS S3 兼容存储桶地址;
- log_analysis:推送到 EdgeOne 日志分析,仅当 LogType = domain 或 web-attack 时支持。
+ // 实时日志投递任务类型,取值有:
- cls: 推送到腾讯云 CLS;
- custom_endpoint:推送到自定义 HTTP(S) 地址;
- s3:推送到 AWS S3 兼容存储桶地址;
- log_analysis:推送到 EdgeOne 日志分析,仅当 LogType = l7-access-logs 或 web-attack 时支持。
TaskType *string `json:"TaskType,omitnil,omitempty" name:"TaskType"`
- // 实时日志投递任务对应的实体列表。取值示例如下:- 七层域名:domain.example.com
- 四层代理实例:sid-2s69eb5wcms7
- 边缘函数实例:test-zone-2mxigizoh9l9-1257626257
+ // 实时日志投递任务对应的实体列表。取值示例如下:
- 七层域名:domain.example.com
- 四层代理实例:sid-2s69eb5wcms7
- 边缘函数实例:test-zone-2mxigizoh9l9-1257626257
取值参考:DescribeL4Proxy
EntityList []*string `json:"EntityList,omitnil,omitempty" name:"EntityList"`
- // 投递的预设字段列表。取值参考:- [站点加速日志(七层访问日志)](https://cloud.tencent.com/document/product/1552/105791)
- [四层代理日志](https://cloud.tencent.com/document/product/1552/105792)
- [边缘函数运行日志](https://cloud.tencent.com/document/product/1552/115585)
+ // 投递的预设字段列表。取值参考:
取值参考:DescribeLogFields
Fields []*string `json:"Fields,omitnil,omitempty" name:"Fields"`
- // 投递的自定义字段列表,支持在 HTTP 请求头、响应头、Cookie、请求正文中提取指定内容。自定义字段名称不能重复,且最多不能超过 200 个字段。单个实时日志推送任务最多添加 5 个请求正文类型的自定义字段。目前仅站点加速日志(LogType=domain)支持添加自定义字段。
+ // 投递的自定义字段列表,支持在 HTTP 请求头、响应头、Cookie、请求正文中提取指定内容。
自定义字段名称不能重复,仅七层访问日志(LogType= l7-access-logs 或 domain)支持添加自定义字段。
允许配置的自定义字段个数有配额限制,如遇配额不足请 [联系我们](https://cloud.tencent.com/online-service?from=sales&source=PRESALE)。
CustomFields []*CustomField `json:"CustomFields,omitnil,omitempty" name:"CustomFields"`
- // 日志投递的过滤条件,不填表示投递全量日志。
+ // 日志投递的过滤条件,不填表示投递全量日志。
DeliveryConditions []*DeliveryCondition `json:"DeliveryConditions,omitnil,omitempty" name:"DeliveryConditions"`
- // 采样比例,采用千分制,取值范围为1-1000,例如:填写 605 表示采样比例为 60.5%。不填表示采样比例为 100%。
+ // 采样比例,采用千分制,取值范围为1-1000,例如:填写 605 表示采样比例为 60.5%。不填表示采样比例为 100%。
Sample *uint64 `json:"Sample,omitnil,omitempty" name:"Sample"`
- // 日志投递的输出格式。不填表示为默认格式,默认格式逻辑如下:- 当 TaskType 取值为 custom_endpoint 时,默认格式为多个 JSON 对象组成的数组,每个 JSON 对象为一条日志;
- 当 TaskType 取值为 s3 时,默认格式为 JSON Lines;
特别地,当 TaskType 取值为 cls 或 log_analysis 时,LogFormat.FormatType 的值只能为 json,且 LogFormat 中其他参数将被忽略,建议不传 LogFormat。
+ // 日志投递的输出格式,使用详情见 自定义日志输出格式。不填表示为默认格式,默认格式逻辑如下:
- 当 TaskType 取值为 custom_endpoint 时,默认格式为多个 JSON 对象组成的数组,每个 JSON 对象为一条日志;
- 当 TaskType 取值为 s3 时,默认格式为 JSON Lines;
特别地,当 TaskType 取值为 cls 或 log_analysis 时,LogFormat.FormatType 的值只能为 json,且 LogFormat 中其他参数将被忽略,建议不传 LogFormat。
LogFormat *LogFormat `json:"LogFormat,omitnil,omitempty" name:"LogFormat"`
- // CLS 的配置信息。当 TaskType 取值为 cls 时,该参数必填。
+ // CLS 的配置信息。当 TaskType 取值为 cls 时,该参数必填。
CLS *CLSTopic `json:"CLS,omitnil,omitempty" name:"CLS"`
- // 自定义 HTTP 服务的配置信息。当 TaskType 取值为 custom_endpoint 时,该参数必填。
+ // 自定义 HTTP 服务的配置信息。当 TaskType 取值为 custom_endpoint 时,该参数必填。
CustomEndpoint *CustomEndpoint `json:"CustomEndpoint,omitnil,omitempty" name:"CustomEndpoint"`
- // AWS S3 兼容存储桶的配置信息。当 TaskType 取值为 s3 时,该参数必填。
+ // AWS S3 兼容存储桶的配置信息。当 TaskType 取值为 s3 时,该参数必填。
S3 *S3 `json:"S3,omitnil,omitempty" name:"S3"`
}
@@ -4867,7 +5139,7 @@ func (r *CreateRealtimeLogDeliveryTaskRequest) FromJsonString(s string) error {
// Predefined struct for user
type CreateRealtimeLogDeliveryTaskResponseParams struct {
- // 创建成功的任务ID。
+ // 创建成功的任务ID。
TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
// 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -6563,6 +6835,67 @@ func (r *DeleteFunctionRulesResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+// Predefined struct for user
+type DeleteInferenceAPITokenRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理 API Token 的 ID。
+ TokenId *string `json:"TokenId,omitnil,omitempty" name:"TokenId"`
+}
+
+type DeleteInferenceAPITokenRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理 API Token 的 ID。
+ TokenId *string `json:"TokenId,omitnil,omitempty" name:"TokenId"`
+}
+
+func (r *DeleteInferenceAPITokenRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DeleteInferenceAPITokenRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "TokenId")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteInferenceAPITokenRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DeleteInferenceAPITokenResponseParams struct {
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DeleteInferenceAPITokenResponse struct {
+ *tchttp.BaseResponse
+ Response *DeleteInferenceAPITokenResponseParams `json:"Response"`
+}
+
+func (r *DeleteInferenceAPITokenResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DeleteInferenceAPITokenResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
// Predefined struct for user
type DeleteJustInTimeTranscodeTemplatesRequestParams struct {
// 站点ID。
@@ -10198,39 +10531,571 @@ func (r *DescribeIdentificationsResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type DescribeJustInTimeTranscodeTemplatesRequestParams struct {
- // 站点ID。
+type DescribeInferenceAPITokensRequestParams struct {
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
- // 过滤条件,Filters 的上限为 20,Filters.Values 的上限为 20。该参数不填写时,默认返回当前 ZoneId 下有权限的即时转码模板。详细的过滤条件如下:template-name:按照模板名批量进行过滤。例如:mytemplate;template-type:按照模板类型批量进行过滤。例如:preset 或 custom。template-id:按照模板 ID 批量进行过滤。例如:C1LZ7982VgTpYhJ7M。默认为空。
- Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"`
-
- // 排序字段,取值有:createTime:模板创建时间。默认值为:createTime。
- SortBy *string `json:"SortBy,omitnil,omitempty" name:"SortBy"`
-
- // 排序方式,取值有:asc:升序方式;desc:降序方式。默认值为:desc。
- SortOrder *string `json:"SortOrder,omitnil,omitempty" name:"SortOrder"`
-
- // 分页偏移量,默认值:0。
+ // 分页查询偏移量。默认值:0。
Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
- // 返回记录条数,默认值:20,最大值:1000。
+ // 分页查询限制数目。默认值:20,最大值:100。
Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
}
-type DescribeJustInTimeTranscodeTemplatesRequest struct {
+type DescribeInferenceAPITokensRequest struct {
*tchttp.BaseRequest
- // 站点ID。
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
- // 过滤条件,Filters 的上限为 20,Filters.Values 的上限为 20。该参数不填写时,默认返回当前 ZoneId 下有权限的即时转码模板。详细的过滤条件如下:template-name:按照模板名批量进行过滤。例如:mytemplate;template-type:按照模板类型批量进行过滤。例如:preset 或 custom。template-id:按照模板 ID 批量进行过滤。例如:C1LZ7982VgTpYhJ7M。默认为空。
- Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"`
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
- // 排序字段,取值有:createTime:模板创建时间。默认值为:createTime。
- SortBy *string `json:"SortBy,omitnil,omitempty" name:"SortBy"`
+ // 分页查询限制数目。默认值:20,最大值:100。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+}
- // 排序方式,取值有:asc:升序方式;desc:降序方式。默认值为:desc。
+func (r *DescribeInferenceAPITokensRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceAPITokensRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInferenceAPITokensRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceAPITokensResponseParams struct {
+ // Token 的总数。
+ TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
+
+ // Token 列表。
+ Tokens []*InferenceAPIToken `json:"Tokens,omitnil,omitempty" name:"Tokens"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DescribeInferenceAPITokensResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeInferenceAPITokensResponseParams `json:"Response"`
+}
+
+func (r *DescribeInferenceAPITokensResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceAPITokensResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceHardwareSpecificationsRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+}
+
+type DescribeInferenceHardwareSpecificationsRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+}
+
+func (r *DescribeInferenceHardwareSpecificationsRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceHardwareSpecificationsRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInferenceHardwareSpecificationsRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceHardwareSpecificationsResponseParams struct {
+ // 硬件规格列表。
+ HardwareSpecifications []*InferenceHardwareSpecification `json:"HardwareSpecifications,omitnil,omitempty" name:"HardwareSpecifications"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DescribeInferenceHardwareSpecificationsResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeInferenceHardwareSpecificationsResponseParams `json:"Response"`
+}
+
+func (r *DescribeInferenceHardwareSpecificationsResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceHardwareSpecificationsResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceServiceDeploymentLogsRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 部署记录 ID。
+ RecordId *string `json:"RecordId,omitnil,omitempty" name:"RecordId"`
+
+ // 需检索日志的开始时间。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 需检索日志的结束时间。默认查询时间范围(EndTime - StartTime)为最近 7 天。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 排序字段,取值有:timestamp:日志生成时间。默认值为:timestamp。
+ SortBy *string `json:"SortBy,omitnil,omitempty" name:"SortBy"`
+
+ // 排序方式,取值有:asc:升序方式;desc:降序方式。默认值为:desc。
+ SortOrder *string `json:"SortOrder,omitnil,omitempty" name:"SortOrder"`
+
+ // 分页偏移量,默认值:0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 返回记录条数,默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+}
+
+type DescribeInferenceServiceDeploymentLogsRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 部署记录 ID。
+ RecordId *string `json:"RecordId,omitnil,omitempty" name:"RecordId"`
+
+ // 需检索日志的开始时间。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 需检索日志的结束时间。默认查询时间范围(EndTime - StartTime)为最近 7 天。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 排序字段,取值有:timestamp:日志生成时间。默认值为:timestamp。
+ SortBy *string `json:"SortBy,omitnil,omitempty" name:"SortBy"`
+
+ // 排序方式,取值有:asc:升序方式;desc:降序方式。默认值为:desc。
+ SortOrder *string `json:"SortOrder,omitnil,omitempty" name:"SortOrder"`
+
+ // 分页偏移量,默认值:0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 返回记录条数,默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+}
+
+func (r *DescribeInferenceServiceDeploymentLogsRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceServiceDeploymentLogsRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "ServiceId")
+ delete(f, "RecordId")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "SortBy")
+ delete(f, "SortOrder")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInferenceServiceDeploymentLogsRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceServiceDeploymentLogsResponseParams struct {
+ // 符合条件的部署日志总数。
+ TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
+
+ // 部署日志列表。
+ DeploymentLogInfoSet []*InferenceServiceDeploymentLogInfo `json:"DeploymentLogInfoSet,omitnil,omitempty" name:"DeploymentLogInfoSet"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DescribeInferenceServiceDeploymentLogsResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeInferenceServiceDeploymentLogsResponseParams `json:"Response"`
+}
+
+func (r *DescribeInferenceServiceDeploymentLogsResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceServiceDeploymentLogsResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceServiceDeploymentRecordsRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 排序字段,取值有:
create-time:部署创建时间。默认值为:create-time。
+ SortBy *string `json:"SortBy,omitnil,omitempty" name:"SortBy"`
+
+ // 排序方式,取值有:
asc:升序方式;desc:降序方式。默认值为:desc。
+ SortOrder *string `json:"SortOrder,omitnil,omitempty" name:"SortOrder"`
+
+ // 分页偏移量,默认值:0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 返回记录条数,默认值:20,最大值:100。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+}
+
+type DescribeInferenceServiceDeploymentRecordsRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 排序字段,取值有:
create-time:部署创建时间。默认值为:create-time。
+ SortBy *string `json:"SortBy,omitnil,omitempty" name:"SortBy"`
+
+ // 排序方式,取值有:
asc:升序方式;desc:降序方式。默认值为:desc。
+ SortOrder *string `json:"SortOrder,omitnil,omitempty" name:"SortOrder"`
+
+ // 分页偏移量,默认值:0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 返回记录条数,默认值:20,最大值:100。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+}
+
+func (r *DescribeInferenceServiceDeploymentRecordsRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceServiceDeploymentRecordsRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "ServiceId")
+ delete(f, "SortBy")
+ delete(f, "SortOrder")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInferenceServiceDeploymentRecordsRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceServiceDeploymentRecordsResponseParams struct {
+ // 部署历史总数。
+ TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
+
+ // 推理服务部署历史列表。
+ RecordSet []*InferenceServiceDeploymentRecord `json:"RecordSet,omitnil,omitempty" name:"RecordSet"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DescribeInferenceServiceDeploymentRecordsResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeInferenceServiceDeploymentRecordsResponseParams `json:"Response"`
+}
+
+func (r *DescribeInferenceServiceDeploymentRecordsResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceServiceDeploymentRecordsResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceServiceMonitorDataRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。最多传入10个推理服务 ID。
+ ServiceIds []*string `json:"ServiceIds,omitnil,omitempty" name:"ServiceIds"`
+
+ // 指标列表,最多支持 10 个指标。取值有:
cpu_usage_average: CPU 平均使用率,单位:%,指标类型:Float;cpu_usage_max: CPU 最大使用率,单位:%,指标类型:Float;gpu_usage_average: GPU 平均使用率,单位:%,指标类型:Float;gpu_usage_max: GPU 最大使用率,单位:%,指标类型:Float;instance_num_average: 实例平均数量,单位:个,指标类型:Float;instance_num_max: 实例最大数量,单位:个,指标类型:Float;gpu_memory_usage_max: 显存最大使用率,单位:%,指标类型:Float;memory_usage_average: 内存平均使用率,单位:%,指标类型:Float;memory_usage_max: 内存最大使用率,单位:%,指标类型:Float;
+ MetricNames []*string `json:"MetricNames,omitnil,omitempty" name:"MetricNames"`
+
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 结束时间。查询时间范围(EndTime - StartTime)需小于等于 30 天。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 查询时间粒度,取值有:
min: 1分钟,支持1天范围内的查询;5min: 5分钟,支持7天范围内的查询;hour: 1小时,支持30天范围内的查询;day: 1天,支持30天范围内的查询;不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:2小时范围内以 min 粒度查询,2天范围内以 5min 粒度查询,7天范围内以 hour 粒度查询,超过7天以 day 粒度查询。
+ Interval *string `json:"Interval,omitnil,omitempty" name:"Interval"`
+}
+
+type DescribeInferenceServiceMonitorDataRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。最多传入10个推理服务 ID。
+ ServiceIds []*string `json:"ServiceIds,omitnil,omitempty" name:"ServiceIds"`
+
+ // 指标列表,最多支持 10 个指标。取值有:
cpu_usage_average: CPU 平均使用率,单位:%,指标类型:Float;cpu_usage_max: CPU 最大使用率,单位:%,指标类型:Float;gpu_usage_average: GPU 平均使用率,单位:%,指标类型:Float;gpu_usage_max: GPU 最大使用率,单位:%,指标类型:Float;instance_num_average: 实例平均数量,单位:个,指标类型:Float;instance_num_max: 实例最大数量,单位:个,指标类型:Float;gpu_memory_usage_max: 显存最大使用率,单位:%,指标类型:Float;memory_usage_average: 内存平均使用率,单位:%,指标类型:Float;memory_usage_max: 内存最大使用率,单位:%,指标类型:Float;
+ MetricNames []*string `json:"MetricNames,omitnil,omitempty" name:"MetricNames"`
+
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 结束时间。查询时间范围(EndTime - StartTime)需小于等于 30 天。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 查询时间粒度,取值有:
min: 1分钟,支持1天范围内的查询;5min: 5分钟,支持7天范围内的查询;hour: 1小时,支持30天范围内的查询;day: 1天,支持30天范围内的查询;不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:2小时范围内以 min 粒度查询,2天范围内以 5min 粒度查询,7天范围内以 hour 粒度查询,超过7天以 day 粒度查询。
+ Interval *string `json:"Interval,omitnil,omitempty" name:"Interval"`
+}
+
+func (r *DescribeInferenceServiceMonitorDataRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceServiceMonitorDataRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "ServiceIds")
+ delete(f, "MetricNames")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "Interval")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInferenceServiceMonitorDataRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceServiceMonitorDataResponseParams struct {
+ // 查询结果的总条数。
+ TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
+
+ // 推理服务监控数据。
+ InferenceServiceMonitorRecords []*InferenceServiceMonitorRecord `json:"InferenceServiceMonitorRecords,omitnil,omitempty" name:"InferenceServiceMonitorRecords"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DescribeInferenceServiceMonitorDataResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeInferenceServiceMonitorDataResponseParams `json:"Response"`
+}
+
+func (r *DescribeInferenceServiceMonitorDataResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceServiceMonitorDataResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceServicesRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 过滤条件,上限 20 个,多个条件为且关系,Filters.Values 的上限为 20。详细的过滤条件如下:
service-name:按照服务名称进行过滤;service-id:按照服务 ID 过滤;status:按照服务状态过滤。模糊查询时仅支持过滤字段名为 service-name。
+ Filters []*AdvancedFilter `json:"Filters,omitnil,omitempty" name:"Filters"`
+
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:200。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+
+ // 可根据该字段对返回结果进行排序,取值有:
create-time:创建时间。不填写时默认按照 create-time 排序。
+ Order *string `json:"Order,omitnil,omitempty" name:"Order"`
+
+ // 排序方向,如果是字段值为数字,则根据数字大小排序;如果字段值为文本,则根据 ASCII 码的大小排序。取值有:
asc:从小到大排序;desc:从大到小排序。不填写使用默认值 desc。
+ Direction *string `json:"Direction,omitnil,omitempty" name:"Direction"`
+}
+
+type DescribeInferenceServicesRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 过滤条件,上限 20 个,多个条件为且关系,Filters.Values 的上限为 20。详细的过滤条件如下:
service-name:按照服务名称进行过滤;service-id:按照服务 ID 过滤;status:按照服务状态过滤。模糊查询时仅支持过滤字段名为 service-name。
+ Filters []*AdvancedFilter `json:"Filters,omitnil,omitempty" name:"Filters"`
+
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:200。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+
+ // 可根据该字段对返回结果进行排序,取值有:
create-time:创建时间。不填写时默认按照 create-time 排序。
+ Order *string `json:"Order,omitnil,omitempty" name:"Order"`
+
+ // 排序方向,如果是字段值为数字,则根据数字大小排序;如果字段值为文本,则根据 ASCII 码的大小排序。取值有:
asc:从小到大排序;desc:从大到小排序。不填写使用默认值 desc。
+ Direction *string `json:"Direction,omitnil,omitempty" name:"Direction"`
+}
+
+func (r *DescribeInferenceServicesRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceServicesRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Filters")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ delete(f, "Order")
+ delete(f, "Direction")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInferenceServicesRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeInferenceServicesResponseParams struct {
+ // 满足条件的服务总数。
+ TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
+
+ // 推理服务列表。
+ Services []*InferenceService `json:"Services,omitnil,omitempty" name:"Services"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DescribeInferenceServicesResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeInferenceServicesResponseParams `json:"Response"`
+}
+
+func (r *DescribeInferenceServicesResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeInferenceServicesResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeJustInTimeTranscodeTemplatesRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 过滤条件,Filters 的上限为 20,Filters.Values 的上限为 20。该参数不填写时,默认返回当前 ZoneId 下有权限的即时转码模板。详细的过滤条件如下:template-name:按照模板名批量进行过滤。例如:mytemplate;template-type:按照模板类型批量进行过滤。例如:preset 或 custom。template-id:按照模板 ID 批量进行过滤。例如:C1LZ7982VgTpYhJ7M。默认为空。
+ Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"`
+
+ // 排序字段,取值有:createTime:模板创建时间。默认值为:createTime。
+ SortBy *string `json:"SortBy,omitnil,omitempty" name:"SortBy"`
+
+ // 排序方式,取值有:asc:升序方式;desc:降序方式。默认值为:desc。
+ SortOrder *string `json:"SortOrder,omitnil,omitempty" name:"SortOrder"`
+
+ // 分页偏移量,默认值:0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 返回记录条数,默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+}
+
+type DescribeJustInTimeTranscodeTemplatesRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 过滤条件,Filters 的上限为 20,Filters.Values 的上限为 20。该参数不填写时,默认返回当前 ZoneId 下有权限的即时转码模板。详细的过滤条件如下:template-name:按照模板名批量进行过滤。例如:mytemplate;template-type:按照模板类型批量进行过滤。例如:preset 或 custom。template-id:按照模板 ID 批量进行过滤。例如:C1LZ7982VgTpYhJ7M。默认为空。
+ Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"`
+
+ // 排序字段,取值有:createTime:模板创建时间。默认值为:createTime。
+ SortBy *string `json:"SortBy,omitnil,omitempty" name:"SortBy"`
+
+ // 排序方式,取值有:asc:升序方式;desc:降序方式。默认值为:desc。
SortOrder *string `json:"SortOrder,omitnil,omitempty" name:"SortOrder"`
// 分页偏移量,默认值:0。
@@ -10557,140 +11422,351 @@ type DescribeL7AccSettingRequestParams struct {
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
}
-type DescribeL7AccSettingRequest struct {
+type DescribeL7AccSettingRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+}
+
+func (r *DescribeL7AccSettingRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeL7AccSettingRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeL7AccSettingRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeL7AccSettingResponseParams struct {
+ // 站点加速全局配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ZoneSetting *ZoneConfigParameters `json:"ZoneSetting,omitnil,omitempty" name:"ZoneSetting"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DescribeL7AccSettingResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeL7AccSettingResponseParams `json:"Response"`
+}
+
+func (r *DescribeL7AccSettingResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeL7AccSettingResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeLoadBalancerListRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 分页查询限制数目,默认值:20,最大值:100。
+ Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+
+ // 过滤条件,Filters.Values 的上限为 20。该参数不填写时,返回当前 zone-id 下所有负载均衡实例信息。详细的过滤条件如下:
+ // InstanceName:按照负载均衡实例名称进行过滤;
+ // InstanceId:按照负载均衡实例 ID 进行过滤。
+ Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"`
+}
+
+type DescribeLoadBalancerListRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 分页查询限制数目,默认值:20,最大值:100。
+ Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+
+ // 过滤条件,Filters.Values 的上限为 20。该参数不填写时,返回当前 zone-id 下所有负载均衡实例信息。详细的过滤条件如下:
+ // InstanceName:按照负载均衡实例名称进行过滤;
+ // InstanceId:按照负载均衡实例 ID 进行过滤。
+ Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"`
+}
+
+func (r *DescribeLoadBalancerListRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeLoadBalancerListRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ delete(f, "Filters")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLoadBalancerListRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeLoadBalancerListResponseParams struct {
+ // 负载均衡实例总数。
+ TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
+
+ // 负载均衡实例列表。
+ LoadBalancerList []*LoadBalancer `json:"LoadBalancerList,omitnil,omitempty" name:"LoadBalancerList"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type DescribeLoadBalancerListResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeLoadBalancerListResponseParams `json:"Response"`
+}
+
+func (r *DescribeLoadBalancerListResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeLoadBalancerListResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeLogAnalysisDetailRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 数据归属地区,可选值:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
注意:若站点服务区域为“全球可用区”,获取全部数据需要分别查询 mainland 和 overseas 的数据。
+ Area *string `json:"Area,omitnil,omitempty" name:"Area"`
+
+ // 开始时间,示例值:2020-04-29T00:00:00Z。套餐版本不同,支持的可查询开始时间至今的最大时间跨度不同,详情请见 套餐选型对比。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 结束时间,示例值:2020-04-30T00:00:00Z。单次查询的开始时间到结束时间跨度最大为 31 天。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 日志类型,可选值:
- l7-access-logs:七层访问日志;
- web-attack:托管规则日志。
默认为 l7-access-logs 。
+ LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
+
+ // 日志匹配条件,最大长度 12KB。
+ Condition *string `json:"Condition,omitnil,omitempty" name:"Condition"`
+
+ // 分页查询限制数目,默认值:20,最大值 100。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 原始日志是否按时间排序返回;可选值:
默认为 desc。
+ Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"`
+}
+
+type DescribeLogAnalysisDetailRequest struct {
*tchttp.BaseRequest
- // 站点 ID。
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 数据归属地区,可选值:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
注意:若站点服务区域为“全球可用区”,获取全部数据需要分别查询 mainland 和 overseas 的数据。
+ Area *string `json:"Area,omitnil,omitempty" name:"Area"`
+
+ // 开始时间,示例值:2020-04-29T00:00:00Z。套餐版本不同,支持的可查询开始时间至今的最大时间跨度不同,详情请见 套餐选型对比。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 结束时间,示例值:2020-04-30T00:00:00Z。单次查询的开始时间到结束时间跨度最大为 31 天。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 日志类型,可选值:
- l7-access-logs:七层访问日志;
- web-attack:托管规则日志。
默认为 l7-access-logs 。
+ LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
+
+ // 日志匹配条件,最大长度 12KB。
+ Condition *string `json:"Condition,omitnil,omitempty" name:"Condition"`
+
+ // 分页查询限制数目,默认值:20,最大值 100。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+
+ // 原始日志是否按时间排序返回;可选值:
默认为 desc。
+ Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"`
}
-func (r *DescribeL7AccSettingRequest) ToJsonString() string {
+func (r *DescribeLogAnalysisDetailRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
-func (r *DescribeL7AccSettingRequest) FromJsonString(s string) error {
+func (r *DescribeLogAnalysisDetailRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "ZoneId")
+ delete(f, "Area")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "LogType")
+ delete(f, "Condition")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ delete(f, "Sort")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeL7AccSettingRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLogAnalysisDetailRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeL7AccSettingResponseParams struct {
- // 站点加速全局配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- ZoneSetting *ZoneConfigParameters `json:"ZoneSetting,omitnil,omitempty" name:"ZoneSetting"`
+type DescribeLogAnalysisDetailResponseParams struct {
+ // 符合日志匹配条件的日志详情列表。
+ LogDetail []*LogItem `json:"LogDetail,omitnil,omitempty" name:"LogDetail"`
+
+ // 符合日志匹配条件的日志总数。
+ TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
// 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}
-type DescribeL7AccSettingResponse struct {
+type DescribeLogAnalysisDetailResponse struct {
*tchttp.BaseResponse
- Response *DescribeL7AccSettingResponseParams `json:"Response"`
+ Response *DescribeLogAnalysisDetailResponseParams `json:"Response"`
}
-func (r *DescribeL7AccSettingResponse) ToJsonString() string {
+func (r *DescribeLogAnalysisDetailResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
-func (r *DescribeL7AccSettingResponse) FromJsonString(s string) error {
+func (r *DescribeLogAnalysisDetailResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeLoadBalancerListRequestParams struct {
- // 站点 ID。
+type DescribeLogAnalysisDownloadTasksRequestParams struct {
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
- // 分页查询偏移量,默认为 0。
- Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+ // 数据归属地区,可选值:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
注意:若站点服务区域为“全球可用区”,获取全部数据需要分别查询 mainland 和 overseas 的数据。
+ Area *string `json:"Area,omitnil,omitempty" name:"Area"`
- // 分页查询限制数目,默认值:20,最大值:100。
- Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+ // 日志类型,可选值:
- l7-access-logs:七层访问日志;
- web-attack:托管规则日志。
默认为 l7-access-logs 。
+ LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
- // 过滤条件,Filters.Values 的上限为 20。该参数不填写时,返回当前 zone-id 下所有负载均衡实例信息。详细的过滤条件如下:
- // InstanceName:按照负载均衡实例名称进行过滤;
- // InstanceId:按照负载均衡实例 ID 进行过滤。
- Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"`
+ // 过滤条件,Filters.Values 的上限为 20。详细的过滤条件如下:
- task-id:按照日志下载任务 ID进行过滤,可选值参考 CreateLogAnalysisDownloadTask 接口返回的 TaskId。
取值参考:CreateLogAnalysisDownloadTask
+ Filters []*AdvancedFilter `json:"Filters,omitnil,omitempty" name:"Filters"`
+
+ // 分页查询限制数目,默认值:20,最大值 100。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
}
-type DescribeLoadBalancerListRequest struct {
+type DescribeLogAnalysisDownloadTasksRequest struct {
*tchttp.BaseRequest
- // 站点 ID。
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
- // 分页查询偏移量,默认为 0。
- Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"`
+ // 数据归属地区,可选值:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
注意:若站点服务区域为“全球可用区”,获取全部数据需要分别查询 mainland 和 overseas 的数据。
+ Area *string `json:"Area,omitnil,omitempty" name:"Area"`
- // 分页查询限制数目,默认值:20,最大值:100。
- Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+ // 日志类型,可选值:
- l7-access-logs:七层访问日志;
- web-attack:托管规则日志。
默认为 l7-access-logs 。
+ LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
- // 过滤条件,Filters.Values 的上限为 20。该参数不填写时,返回当前 zone-id 下所有负载均衡实例信息。详细的过滤条件如下:
- // InstanceName:按照负载均衡实例名称进行过滤;
- // InstanceId:按照负载均衡实例 ID 进行过滤。
- Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"`
+ // 过滤条件,Filters.Values 的上限为 20。详细的过滤条件如下:
- task-id:按照日志下载任务 ID进行过滤,可选值参考 CreateLogAnalysisDownloadTask 接口返回的 TaskId。
取值参考:CreateLogAnalysisDownloadTask
+ Filters []*AdvancedFilter `json:"Filters,omitnil,omitempty" name:"Filters"`
+
+ // 分页查询限制数目,默认值:20,最大值 100。
+ Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
}
-func (r *DescribeLoadBalancerListRequest) ToJsonString() string {
+func (r *DescribeLogAnalysisDownloadTasksRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
-func (r *DescribeLoadBalancerListRequest) FromJsonString(s string) error {
+func (r *DescribeLogAnalysisDownloadTasksRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "ZoneId")
- delete(f, "Offset")
- delete(f, "Limit")
+ delete(f, "Area")
+ delete(f, "LogType")
delete(f, "Filters")
+ delete(f, "Limit")
+ delete(f, "Offset")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLoadBalancerListRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLogAnalysisDownloadTasksRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeLoadBalancerListResponseParams struct {
- // 负载均衡实例总数。
- TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
+type DescribeLogAnalysisDownloadTasksResponseParams struct {
+ // 符合日志匹配条件的日志分析下载任务总条数。
+ TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
- // 负载均衡实例列表。
- LoadBalancerList []*LoadBalancer `json:"LoadBalancerList,omitnil,omitempty" name:"LoadBalancerList"`
+ // 符合日志匹配条件的日志分析下载任务列表。
+ Tasks []*LogAnalysisDownloadTask `json:"Tasks,omitnil,omitempty" name:"Tasks"`
// 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}
-type DescribeLoadBalancerListResponse struct {
+type DescribeLogAnalysisDownloadTasksResponse struct {
*tchttp.BaseResponse
- Response *DescribeLoadBalancerListResponseParams `json:"Response"`
+ Response *DescribeLogAnalysisDownloadTasksResponseParams `json:"Response"`
}
-func (r *DescribeLoadBalancerListResponse) ToJsonString() string {
+func (r *DescribeLogAnalysisDownloadTasksResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
-func (r *DescribeLoadBalancerListResponse) FromJsonString(s string) error {
+func (r *DescribeLogAnalysisDownloadTasksResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
@@ -13071,78 +14147,50 @@ func (r *DescribeTimingL4DataResponse) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTimingL7AnalysisDataRequestParams struct {
- // 开始时间。
+ // 开始时间。
StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
- // 结束时间。查询时间范围(`EndTime` - `StartTime`)需小于等于 31 天。
+ // 结束时间。查询时间范围(EndTime - StartTime)需小于等于 31 天。
EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
- // 指标列表,取值有:
- // l7Flow_outFlux: L7 EdgeOne 响应流量,单位:Byte;
- // l7Flow_inFlux: L7 客户端请求流量,单位:Byte;
- // l7Flow_flux: L7 访问总流量(EdgeOne 响应+客户端请求),单位:Byte;
- // l7Flow_outBandwidth: L7 EdgeOne 响应带宽,单位:bps;
- // l7Flow_inBandwidth:L7 客户端请求带宽,单位:bps;
- // l7Flow_bandwidth:L7 访问总带宽(EdgeOne 响应+客户端请求),单位:bps;
- // l7Flow_request: L7 访问请求数,单位:次;
- // l7Flow_avgResponseTime: L7 访问平均响应耗时,单位:ms;
- // l7Flow_avgFirstByteResponseTime: L7 访问平均首字节响应耗时,单位:ms。
+ // 指标列表,取值有:
l7Flow_outFlux: L7 EdgeOne 响应流量,单位:Byte;l7Flow_inFlux: L7 客户端请求流量,单位:Byte;l7Flow_flux: L7 访问总流量(EdgeOne 响应+客户端请求),单位:Byte;l7Flow_outBandwidth: L7 EdgeOne 响应带宽,单位:bps;l7Flow_inBandwidth:L7 客户端请求带宽,单位:bps;l7Flow_bandwidth:L7 访问总带宽(EdgeOne 响应+客户端请求),单位:bps;l7Flow_request: L7 访问请求数,单位:次; l7Flow_avgResponseTime: L7 访问平均响应耗时,单位:ms; l7Flow_avgFirstByteResponseTime: L7 访问平均首字节响应耗时,单位:ms;l7Flow_requestRate: L7 访问请求速率,单位:qps。
MetricNames []*string `json:"MetricNames,omitnil,omitempty" name:"MetricNames"`
- // 站点 ID 集合,此参数将于2024年05月30日后由可选改为必填,详见公告:[【腾讯云 EdgeOne】云 API 变更通知](https://cloud.tencent.com/document/product/1552/104902)。最多传入 100 个站点 ID。若需查询腾讯云主账号下所有站点数据,请用 `*` 代替,查询账号级别数据需具备本接口全部站点资源权限。
+ // 站点 ID 集合,此参数将于2024年05月30日后由可选改为必填,详见公告:【腾讯云 EdgeOne】云 API 变更通知。最多传入 100 个站点 ID。若需查询腾讯云主账号下所有站点数据,请用 * 代替,查询账号级别数据需具备本接口全部站点资源权限。
ZoneIds []*string `json:"ZoneIds,omitnil,omitempty" name:"ZoneIds"`
- // 查询时间粒度,取值有:
- // min: 1分钟;
- // 5min: 5分钟;
- // hour: 1小时;
- // day: 1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:2 小时范围内以 min 粒度查询,2 天范围内以 5min 粒度查询,7 天范围内以 hour 粒度查询,超过 7 天以 day 粒度查询。
+ // 查询时间粒度。
枚举值:
- min: 1分钟
- 5min: 5分钟
- hour: 1小时
- day: 1天
不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:2 小时范围内以 min 粒度查询,2 天范围内以 5min 粒度查询,7 天范围内以 hour 粒度查询,超过 7 天以 day 粒度查询。
Interval *string `json:"Interval,omitnil,omitempty" name:"Interval"`
- // 筛选数据时使用的过滤条件,取值参考 [指标分析筛选条件说明](https://cloud.tencent.com/document/product/1552/98219#1aaf1150-55a4-4b4d-b103-3a8317ac7945) 中针对 L7 访问流量、带宽、请求数的可用筛选项。
- // 如需限定站点或内容标识符,请在 `ZoneIds.N` 参数中另行传入对应的值。
+ // 筛选数据时使用的过滤条件,取值参考 指标分析筛选条件说明 中针对 L7 访问流量、带宽、请求数的可用筛选项。
如需限定站点或内容标识符,请在 ZoneIds.N 参数中另行传入对应的值。
Filters []*QueryCondition `json:"Filters,omitnil,omitempty" name:"Filters"`
- // 数据归属地区。该参数已废弃。请在 `Filters.country` 中按客户端地域过滤数据。
+ // 数据归属地区。该参数已废弃。请在 Filters.country 中按客户端地域过滤数据。
Area *string `json:"Area,omitnil,omitempty" name:"Area"`
}
type DescribeTimingL7AnalysisDataRequest struct {
*tchttp.BaseRequest
- // 开始时间。
+ // 开始时间。
StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
- // 结束时间。查询时间范围(`EndTime` - `StartTime`)需小于等于 31 天。
+ // 结束时间。查询时间范围(EndTime - StartTime)需小于等于 31 天。
EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
- // 指标列表,取值有:
- // l7Flow_outFlux: L7 EdgeOne 响应流量,单位:Byte;
- // l7Flow_inFlux: L7 客户端请求流量,单位:Byte;
- // l7Flow_flux: L7 访问总流量(EdgeOne 响应+客户端请求),单位:Byte;
- // l7Flow_outBandwidth: L7 EdgeOne 响应带宽,单位:bps;
- // l7Flow_inBandwidth:L7 客户端请求带宽,单位:bps;
- // l7Flow_bandwidth:L7 访问总带宽(EdgeOne 响应+客户端请求),单位:bps;
- // l7Flow_request: L7 访问请求数,单位:次;
- // l7Flow_avgResponseTime: L7 访问平均响应耗时,单位:ms;
- // l7Flow_avgFirstByteResponseTime: L7 访问平均首字节响应耗时,单位:ms。
+ // 指标列表,取值有:
l7Flow_outFlux: L7 EdgeOne 响应流量,单位:Byte;l7Flow_inFlux: L7 客户端请求流量,单位:Byte;l7Flow_flux: L7 访问总流量(EdgeOne 响应+客户端请求),单位:Byte;l7Flow_outBandwidth: L7 EdgeOne 响应带宽,单位:bps;l7Flow_inBandwidth:L7 客户端请求带宽,单位:bps;l7Flow_bandwidth:L7 访问总带宽(EdgeOne 响应+客户端请求),单位:bps;l7Flow_request: L7 访问请求数,单位:次; l7Flow_avgResponseTime: L7 访问平均响应耗时,单位:ms; l7Flow_avgFirstByteResponseTime: L7 访问平均首字节响应耗时,单位:ms;l7Flow_requestRate: L7 访问请求速率,单位:qps。
MetricNames []*string `json:"MetricNames,omitnil,omitempty" name:"MetricNames"`
- // 站点 ID 集合,此参数将于2024年05月30日后由可选改为必填,详见公告:[【腾讯云 EdgeOne】云 API 变更通知](https://cloud.tencent.com/document/product/1552/104902)。最多传入 100 个站点 ID。若需查询腾讯云主账号下所有站点数据,请用 `*` 代替,查询账号级别数据需具备本接口全部站点资源权限。
+ // 站点 ID 集合,此参数将于2024年05月30日后由可选改为必填,详见公告:【腾讯云 EdgeOne】云 API 变更通知。最多传入 100 个站点 ID。若需查询腾讯云主账号下所有站点数据,请用 * 代替,查询账号级别数据需具备本接口全部站点资源权限。
ZoneIds []*string `json:"ZoneIds,omitnil,omitempty" name:"ZoneIds"`
- // 查询时间粒度,取值有:
- // min: 1分钟;
- // 5min: 5分钟;
- // hour: 1小时;
- // day: 1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:2 小时范围内以 min 粒度查询,2 天范围内以 5min 粒度查询,7 天范围内以 hour 粒度查询,超过 7 天以 day 粒度查询。
+ // 查询时间粒度。
枚举值:
- min: 1分钟
- 5min: 5分钟
- hour: 1小时
- day: 1天
不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:2 小时范围内以 min 粒度查询,2 天范围内以 5min 粒度查询,7 天范围内以 hour 粒度查询,超过 7 天以 day 粒度查询。
Interval *string `json:"Interval,omitnil,omitempty" name:"Interval"`
- // 筛选数据时使用的过滤条件,取值参考 [指标分析筛选条件说明](https://cloud.tencent.com/document/product/1552/98219#1aaf1150-55a4-4b4d-b103-3a8317ac7945) 中针对 L7 访问流量、带宽、请求数的可用筛选项。
- // 如需限定站点或内容标识符,请在 `ZoneIds.N` 参数中另行传入对应的值。
+ // 筛选数据时使用的过滤条件,取值参考 指标分析筛选条件说明 中针对 L7 访问流量、带宽、请求数的可用筛选项。
如需限定站点或内容标识符,请在 ZoneIds.N 参数中另行传入对应的值。
Filters []*QueryCondition `json:"Filters,omitnil,omitempty" name:"Filters"`
- // 数据归属地区。该参数已废弃。请在 `Filters.country` 中按客户端地域过滤数据。
+ // 数据归属地区。该参数已废弃。请在 Filters.country 中按客户端地域过滤数据。
Area *string `json:"Area,omitnil,omitempty" name:"Area"`
}
@@ -13173,10 +14221,10 @@ func (r *DescribeTimingL7AnalysisDataRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTimingL7AnalysisDataResponseParams struct {
- // 查询结果的总条数。
+ // 查询结果的总条数。
TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
- // 时序流量数据列表。
+ // 七层时序流量数据列表。
对于不同的查询指标,根据指标值类型的不同,会从不同的参数返回时序数据。
目前存在的值类型有以下两种:
- Integer:
Integer 值类型的指标将从 Data.N.TypeValue 返回对应时序数据。
对应的查询指标 MetricName 有: l7Flow_outFlux:L7 EdgeOne 响应流量,单位:Byte; l7Flow_inFlux:L7 客户端请求流量,单位:Byte; l7Flow_flux:L7 访问总流量(EdgeOne 响应+客户端请求),单位:Byte; l7Flow_outBandwidth:L7 EdgeOne 响应带宽,单位:bps; l7Flow_inBandwidth:L7 客户端请求带宽,单位:bps; l7Flow_bandwidth:L7 访问总带宽(EdgeOne 响应+客户端请求),单位:bps; l7Flow_request:L7 访问请求数,单位:次; l7Flow_avgResponseTime:L7 访问平均响应耗时,单位:ms; l7Flow_avgFirstByteResponseTime:L7 访问平均首字节响应耗时,单位:ms。
- Float:
Float 值类型的指标将从 Data.N.FloatTypeValue 返回对应时序数据。
对应的查询指标 MetricName 有: l7Flow_requestRate:L7 访问请求速率,单位:qps。
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*TimingDataRecord `json:"Data,omitnil,omitempty" name:"Data"`
@@ -16178,100 +17226,390 @@ func (r *ImportZoneConfigRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
-// Predefined struct for user
-type ImportZoneConfigResponseParams struct {
- // 表示该次导入配置的任务 Id,通过查询站点配置导入结果接口(DescribeZoneConfigImportResult)获取本次导入任务执行的结果。注意:导入任务 Id 仅支持查询最近 7 天的导入任务。
- TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
+// Predefined struct for user
+type ImportZoneConfigResponseParams struct {
+ // 表示该次导入配置的任务 Id,通过查询站点配置导入结果接口(DescribeZoneConfigImportResult)获取本次导入任务执行的结果。注意:导入任务 Id 仅支持查询最近 7 天的导入任务。
+ TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type ImportZoneConfigResponse struct {
+ *tchttp.BaseResponse
+ Response *ImportZoneConfigResponseParams `json:"Response"`
+}
+
+func (r *ImportZoneConfigResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *ImportZoneConfigResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type IncreasePlanQuotaRequestParams struct {
+ // 套餐 ID, 形如 edgeone-2unuvzjmmn2q。
+ PlanId *string `json:"PlanId,omitnil,omitempty" name:"PlanId"`
+
+ // 新增的套餐配额类型,取值有: site:站点数; precise_access_control_rule:Web 防护 - 自定义规则 - 精准匹配策略的规则配额; rate_limiting_rule:Web 防护 - 速率限制 - 精准速率限制模块的规则配额。
+ QuotaType *string `json:"QuotaType,omitnil,omitempty" name:"QuotaType"`
+
+ // 新增的配额个数。单次新增的配额个数上限为 100。
+ QuotaNumber *int64 `json:"QuotaNumber,omitnil,omitempty" name:"QuotaNumber"`
+}
+
+type IncreasePlanQuotaRequest struct {
+ *tchttp.BaseRequest
+
+ // 套餐 ID, 形如 edgeone-2unuvzjmmn2q。
+ PlanId *string `json:"PlanId,omitnil,omitempty" name:"PlanId"`
+
+ // 新增的套餐配额类型,取值有: site:站点数; precise_access_control_rule:Web 防护 - 自定义规则 - 精准匹配策略的规则配额; rate_limiting_rule:Web 防护 - 速率限制 - 精准速率限制模块的规则配额。
+ QuotaType *string `json:"QuotaType,omitnil,omitempty" name:"QuotaType"`
+
+ // 新增的配额个数。单次新增的配额个数上限为 100。
+ QuotaNumber *int64 `json:"QuotaNumber,omitnil,omitempty" name:"QuotaNumber"`
+}
+
+func (r *IncreasePlanQuotaRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *IncreasePlanQuotaRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "PlanId")
+ delete(f, "QuotaType")
+ delete(f, "QuotaNumber")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "IncreasePlanQuotaRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type IncreasePlanQuotaResponseParams struct {
+ // 订单号。
+ DealName *string `json:"DealName,omitnil,omitempty" name:"DealName"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type IncreasePlanQuotaResponse struct {
+ *tchttp.BaseResponse
+ Response *IncreasePlanQuotaResponseParams `json:"Response"`
+}
+
+func (r *IncreasePlanQuotaResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *IncreasePlanQuotaResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+type InferenceAPIToken struct {
+ // 推理 API Token ID。
+ TokenId *string `json:"TokenId,omitnil,omitempty" name:"TokenId"`
+
+ // 推理 API Token 名称。
+ Name *string `json:"Name,omitnil,omitempty" name:"Name"`
+
+ // 推理 API Token 内容。
+ Content *string `json:"Content,omitnil,omitempty" name:"Content"`
+
+ // 创建时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
+ CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"`
+}
+
+type InferenceAutoScalingConfig struct {
+ // 最小实例数量。当配置了伸缩策略并且策略处于有效期时,将不会生效。
+ MinInstanceCount *int64 `json:"MinInstanceCount,omitnil,omitempty" name:"MinInstanceCount"`
+
+ // 伸缩策略列表。最多支持 5 个策略。
+ ScalingPolicies []*InferenceScalingPolicy `json:"ScalingPolicies,omitnil,omitempty" name:"ScalingPolicies"`
+}
+
+type InferenceContainerConfig struct {
+ // 镜像类型。取值有:TCR:腾讯云容器镜像服务的镜像。
+ ImageType *string `json:"ImageType,omitnil,omitempty" name:"ImageType"`
+
+ // TCR 镜像仓库信息。当 ImageType 为 TCR 时必填。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ TcrRepositoryConfig *InferenceTCRRepositoryConfig `json:"TcrRepositoryConfig,omitnil,omitempty" name:"TcrRepositoryConfig"`
+
+ // 容器启动时执行的命令,未填写时默认使用镜像的 Entrypoint/CMD。最长支持 1024 字符。
+ StartupCommand *string `json:"StartupCommand,omitnil,omitempty" name:"StartupCommand"`
+
+ // 容器运行时的环境变量。最多支持 10 个变量。
+ EnvironmentVariables []*InferenceEnvironmentVariable `json:"EnvironmentVariables,omitnil,omitempty" name:"EnvironmentVariables"`
+}
+
+type InferenceContainerConfigForModify struct {
+ // 镜像类型。取值有:TCR:腾讯云容器镜像服务的镜像。
+ ImageType *string `json:"ImageType,omitnil,omitempty" name:"ImageType"`
+
+ // TCR 镜像仓库信息。当 ImageType 为 TCR 时必填。
+ TcrRepositoryConfig *InferenceTCRRepositoryConfig `json:"TcrRepositoryConfig,omitnil,omitempty" name:"TcrRepositoryConfig"`
+
+ // 容器启动时执行的命令,未填写时默认使用镜像的 Entrypoint/CMD。最长支持 1024 字符。
+ StartupCommand *string `json:"StartupCommand,omitnil,omitempty" name:"StartupCommand"`
+
+ // 容器运行时的环境变量。最多支持 10 个变量。
+ EnvironmentVariables []*InferenceEnvironmentVariable `json:"EnvironmentVariables,omitnil,omitempty" name:"EnvironmentVariables"`
+}
+
+type InferenceEnvironmentVariable struct {
+ // 变量名。仅允许包含大小写字母、数字、下划线,且必须以字母或下划线开头。长度限制不超过 64 个字符。
+ Key *string `json:"Key,omitnil,omitempty" name:"Key"`
+
+ // 变量值。支持任意可见字符如字母、数字、符号等。长度限制不超过 2048 个字符。
+ Value *string `json:"Value,omitnil,omitempty" name:"Value"`
+}
+
+type InferenceHardwareSpecification struct {
+ // 规格标识。
+ Spec *string `json:"Spec,omitnil,omitempty" name:"Spec"`
+
+ // 规格名称。
+ Name *string `json:"Name,omitnil,omitempty" name:"Name"`
+
+ // CPU 核数。
+ CPUNum *float64 `json:"CPUNum,omitnil,omitempty" name:"CPUNum"`
+
+ // 内存大小。单位为 MB。
+ MemSize *int64 `json:"MemSize,omitnil,omitempty" name:"MemSize"`
+
+ // GPU 卡数。
+ GPUNum *float64 `json:"GPUNum,omitnil,omitempty" name:"GPUNum"`
+
+ // 显存大小。单位为 MB。
+ GPUMemSize *int64 `json:"GPUMemSize,omitnil,omitempty" name:"GPUMemSize"`
+}
+
+type InferenceManualInstanceConfig struct {
+ // 固定实例数量。
+ FixedInstanceCount *int64 `json:"FixedInstanceCount,omitnil,omitempty" name:"FixedInstanceCount"`
+}
+
+type InferenceResourceConfig struct {
+ // 扩容缩容的方式。取值有:Auto:根据请求量自动调整实例数量;Manual:人工设置固定的实例数量。
+ ScalingMode *string `json:"ScalingMode,omitnil,omitempty" name:"ScalingMode"`
+
+ // 硬件规格。
+ HardwareSpec *string `json:"HardwareSpec,omitnil,omitempty" name:"HardwareSpec"`
+
+ // 推理服务自动伸缩配置。当 ScalingMode 为 Auto 时必填。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ AutoScalingConfig *InferenceAutoScalingConfig `json:"AutoScalingConfig,omitnil,omitempty" name:"AutoScalingConfig"`
+
+ // 推理服务人工设置实例配置。当 ScalingMode 为 Manual 时必填。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ManualInstanceConfig *InferenceManualInstanceConfig `json:"ManualInstanceConfig,omitnil,omitempty" name:"ManualInstanceConfig"`
+
+ // 单实例的并发数。默认值为 1。
+ Concurrency *int64 `json:"Concurrency,omitnil,omitempty" name:"Concurrency"`
+}
+
+type InferenceResourceConfigForModify struct {
+ // 扩容缩容的方式。取值有:Auto:根据请求量自动调整实例数量;Manual:人工设置固定的实例数量。
+ ScalingMode *string `json:"ScalingMode,omitnil,omitempty" name:"ScalingMode"`
+
+ // 推理服务自动伸缩配置。当 ScalingMode 为 Auto 时必填。
+ AutoScalingConfig *InferenceAutoScalingConfig `json:"AutoScalingConfig,omitnil,omitempty" name:"AutoScalingConfig"`
- // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
- RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+ // 推理服务人工设置实例配置。当 ScalingMode 为 Manual 时必填。
+ ManualInstanceConfig *InferenceManualInstanceConfig `json:"ManualInstanceConfig,omitnil,omitempty" name:"ManualInstanceConfig"`
+
+ // 单实例的并发数。默认值为 1。
+ Concurrency *int64 `json:"Concurrency,omitnil,omitempty" name:"Concurrency"`
}
-type ImportZoneConfigResponse struct {
- *tchttp.BaseResponse
- Response *ImportZoneConfigResponseParams `json:"Response"`
+type InferenceScalingPolicy struct {
+ // 策略名称。长度限制为 1~30 个字符。同一服务内策略名称需唯一。
+ PolicyName *string `json:"PolicyName,omitnil,omitempty" name:"PolicyName"`
+
+ // 策略类型,创建后不可修改。取值:ScheduledScaling:定时伸缩。
+ PolicyType *string `json:"PolicyType,omitnil,omitempty" name:"PolicyType"`
+
+ // 定时伸缩配置。当 PolicyType 取值为 ScheduledScaling 时,该字段必填。
+ ScheduledScalingPolicy *InferenceScheduledScalingPolicy `json:"ScheduledScalingPolicy,omitnil,omitempty" name:"ScheduledScalingPolicy"`
}
-func (r *ImportZoneConfigResponse) ToJsonString() string {
- b, _ := json.Marshal(r)
- return string(b)
+type InferenceScheduledScalingAction struct {
+ // Cron 表达式,用于描述定时伸缩动作的触发时间。采用 5 字段标准 Cron 格式:分钟 小时 日期 月份 星期。不支持秒字段和年份字段。
+ CronExpression *string `json:"CronExpression,omitnil,omitempty" name:"CronExpression"`
+
+ // 命中该定时伸缩动作后,推理服务需要调整到的最小实例数。若同一评估窗口内多个定时伸缩动作同时命中,则使用其中最大的 MinInstanceCount。
+ MinInstanceCount *int64 `json:"MinInstanceCount,omitnil,omitempty" name:"MinInstanceCount"`
}
-// FromJsonString It is highly **NOT** recommended to use this function
-// because it has no param check, nor strict type check
-func (r *ImportZoneConfigResponse) FromJsonString(s string) error {
- return json.Unmarshal([]byte(s), &r)
+type InferenceScheduledScalingEffectiveRange struct {
+ // 有效期类型。取值有:
LongTerm:长期有效;Custom:自定义起止日期。
+ EffectiveType *string `json:"EffectiveType,omitnil,omitempty" name:"EffectiveType"`
+
+ // 有效期起始日期。当 EffectiveType 为 Custom 时必填;当 EffectiveType 为 LongTerm 时不传该字段。
+ StartDate *string `json:"StartDate,omitnil,omitempty" name:"StartDate"`
+
+ // 有效期终止日期。当 EffectiveType 为 Custom 时必填,且不得早于 StartDate;当 EffectiveType 为 LongTerm 时不传该字段。
+ EndDate *string `json:"EndDate,omitnil,omitempty" name:"EndDate"`
}
-// Predefined struct for user
-type IncreasePlanQuotaRequestParams struct {
- // 套餐 ID, 形如 edgeone-2unuvzjmmn2q。
- PlanId *string `json:"PlanId,omitnil,omitempty" name:"PlanId"`
+type InferenceScheduledScalingPolicy struct {
+ // 定时伸缩动作列表。至少填写 1 个,最多支持 10 个。
+ ScheduledActions []*InferenceScheduledScalingAction `json:"ScheduledActions,omitnil,omitempty" name:"ScheduledActions"`
- // 新增的套餐配额类型,取值有: site:站点数; precise_access_control_rule:Web 防护 - 自定义规则 - 精准匹配策略的规则配额; rate_limiting_rule:Web 防护 - 速率限制 - 精准速率限制模块的规则配额。
- QuotaType *string `json:"QuotaType,omitnil,omitempty" name:"QuotaType"`
+ // 有效期范围,用于描述该定时伸缩策略长期有效或仅在指定日期范围内有效。
+ EffectiveRange *InferenceScheduledScalingEffectiveRange `json:"EffectiveRange,omitnil,omitempty" name:"EffectiveRange"`
- // 新增的配额个数。单次新增的配额个数上限为 100。
- QuotaNumber *int64 `json:"QuotaNumber,omitnil,omitempty" name:"QuotaNumber"`
+ // 时区,使用 [IANA 时区](https://www.iana.org/time-zones) 标识 ScheduledActions 中的触发时间,例如 UTC、Asia/Shanghai、America/New_York、Europe/London、Asia/Kolkata。不传时默认使用 UTC。
+ //
+ //
+ //
+ //
+ TimeZone *string `json:"TimeZone,omitnil,omitempty" name:"TimeZone"`
}
-type IncreasePlanQuotaRequest struct {
- *tchttp.BaseRequest
-
- // 套餐 ID, 形如 edgeone-2unuvzjmmn2q。
- PlanId *string `json:"PlanId,omitnil,omitempty" name:"PlanId"`
+type InferenceService struct {
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
- // 新增的套餐配额类型,取值有: site:站点数; precise_access_control_rule:Web 防护 - 自定义规则 - 精准匹配策略的规则配额; rate_limiting_rule:Web 防护 - 速率限制 - 精准速率限制模块的规则配额。
- QuotaType *string `json:"QuotaType,omitnil,omitempty" name:"QuotaType"`
+ // 推理服务的名称。
+ Name *string `json:"Name,omitnil,omitempty" name:"Name"`
- // 新增的配额个数。单次新增的配额个数上限为 100。
- QuotaNumber *int64 `json:"QuotaNumber,omitnil,omitempty" name:"QuotaNumber"`
+ // 描述信息。
+ Description *string `json:"Description,omitnil,omitempty" name:"Description"`
+
+ // 模型服务需要监听的端口。仅支持 1-65535 之间的整数。
+ ListenPort *int64 `json:"ListenPort,omitnil,omitempty" name:"ListenPort"`
+
+ // 推理服务的请求路径列表。最多支持 20 个路径。
+ RequestPaths []*string `json:"RequestPaths,omitnil,omitempty" name:"RequestPaths"`
+
+ // 推理服务的容器配置。
+ Containers []*InferenceContainerConfig `json:"Containers,omitnil,omitempty" name:"Containers"`
+
+ // 推理服务的资源配置。
+ ResourceConfig *InferenceResourceConfig `json:"ResourceConfig,omitnil,omitempty" name:"ResourceConfig"`
+
+ // 推理服务状态,包含以下几种状态:Deploying:部署中;Running:运行中;Stopping:停止中;Stopped:已停止;Exception:异常;Banned:被封禁。
+ Status *string `json:"Status,omitnil,omitempty" name:"Status"`
+
+ // 伸缩状态。取值有:Normal:稳定运行,无进行中的伸缩操作;ScalingOut:扩容中;ScalingIn:缩容中。
+ ScalingStatus *string `json:"ScalingStatus,omitnil,omitempty" name:"ScalingStatus"`
+
+ // 当前运行中的实例数量。
+ CurrentInstanceCount *int64 `json:"CurrentInstanceCount,omitnil,omitempty" name:"CurrentInstanceCount"`
+
+ // 推理访问地址,可通过链接访问底层模型进行推理。
+ InferenceURL *string `json:"InferenceURL,omitnil,omitempty" name:"InferenceURL"`
+
+ // 创建时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
+ CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"`
+
+ // 最后修改时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
+ UpdateTime *string `json:"UpdateTime,omitnil,omitempty" name:"UpdateTime"`
}
-func (r *IncreasePlanQuotaRequest) ToJsonString() string {
- b, _ := json.Marshal(r)
- return string(b)
+type InferenceServiceConfig struct {
+ // 模型服务需要监听的端口。
+ ListenPort *int64 `json:"ListenPort,omitnil,omitempty" name:"ListenPort"`
+
+ // 推理服务的请求路径列表。
+ RequestPaths []*string `json:"RequestPaths,omitnil,omitempty" name:"RequestPaths"`
+
+ // 推理服务的容器配置。
+ Containers []*InferenceContainerConfig `json:"Containers,omitnil,omitempty" name:"Containers"`
+
+ // 推理服务的资源配置。
+ ResourceConfig *InferenceResourceConfig `json:"ResourceConfig,omitnil,omitempty" name:"ResourceConfig"`
}
-// FromJsonString It is highly **NOT** recommended to use this function
-// because it has no param check, nor strict type check
-func (r *IncreasePlanQuotaRequest) FromJsonString(s string) error {
- f := make(map[string]interface{})
- if err := json.Unmarshal([]byte(s), &f); err != nil {
- return err
- }
- delete(f, "PlanId")
- delete(f, "QuotaType")
- delete(f, "QuotaNumber")
- if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "IncreasePlanQuotaRequest has unknown keys!", "")
- }
- return json.Unmarshal([]byte(s), &r)
+type InferenceServiceDeploymentLogInfo struct {
+ // 日志消息内容。
+ LogMessage *string `json:"LogMessage,omitnil,omitempty" name:"LogMessage"`
+
+ // 日志产生时间。
+ Timestamp *string `json:"Timestamp,omitnil,omitempty" name:"Timestamp"`
}
-// Predefined struct for user
-type IncreasePlanQuotaResponseParams struct {
- // 订单号。
- DealName *string `json:"DealName,omitnil,omitempty" name:"DealName"`
+type InferenceServiceDeploymentRecord struct {
+ // 部署记录 ID。
+ RecordId *string `json:"RecordId,omitnil,omitempty" name:"RecordId"`
- // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
- RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+ // 部署操作类型,取值:
+ // create:创建;
+ // update:更新;
+ // resume:启用;
+ // stop:停用。
+ Operation *string `json:"Operation,omitnil,omitempty" name:"Operation"`
+
+ // 部署状态,取值:
+ // processing:部署中;
+ // succeeded:部署成功;
+ // failed:部署失败。
+ Status *string `json:"Status,omitnil,omitempty" name:"Status"`
+
+ // 部署时长,单位:秒。
+ Duration *int64 `json:"Duration,omitnil,omitempty" name:"Duration"`
+
+ // 本次推理服务部署的配置。
+ InferenceServiceConfig *InferenceServiceConfig `json:"InferenceServiceConfig,omitnil,omitempty" name:"InferenceServiceConfig"`
+
+ // 部署发起时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
+ CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"`
+
+ // 该部署配置是否是当前生效配置,取值:
+ // active:当前生效配置;
+ // inactive:历史版本或异常版本配置。
+ ActiveStatus *string `json:"ActiveStatus,omitnil,omitempty" name:"ActiveStatus"`
}
-type IncreasePlanQuotaResponse struct {
- *tchttp.BaseResponse
- Response *IncreasePlanQuotaResponseParams `json:"Response"`
+type InferenceServiceMonitorItem struct {
+ // 监控数据对应时间点。
+ Timestamp *string `json:"Timestamp,omitnil,omitempty" name:"Timestamp"`
+
+ // 具体数值。
+ Value *float64 `json:"Value,omitnil,omitempty" name:"Value"`
}
-func (r *IncreasePlanQuotaResponse) ToJsonString() string {
- b, _ := json.Marshal(r)
- return string(b)
+type InferenceServiceMonitorRecord struct {
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 指标名称。
+ MetricName *string `json:"MetricName,omitnil,omitempty" name:"MetricName"`
+
+ // 详细推理服务监控数据。
+ InferenceServiceMonitorItems []*InferenceServiceMonitorItem `json:"InferenceServiceMonitorItems,omitnil,omitempty" name:"InferenceServiceMonitorItems"`
}
-// FromJsonString It is highly **NOT** recommended to use this function
-// because it has no param check, nor strict type check
-func (r *IncreasePlanQuotaResponse) FromJsonString(s string) error {
- return json.Unmarshal([]byte(s), &r)
+type InferenceTCRRepositoryConfig struct {
+ // TCR 服务类型。取值有:
Personal:个人版;Enterprise:企业版。
+ TCRType *string `json:"TCRType,omitnil,omitempty" name:"TCRType"`
+
+ // 镜像地址。
+ Image *string `json:"Image,omitnil,omitempty" name:"Image"`
+
+ // 镜像仓库实例 ID。当 TCRType = Enterprise 时必填。
+ RegistryId *string `json:"RegistryId,omitnil,omitempty" name:"RegistryId"`
+
+ // 地域名称。
+ RegionName *string `json:"RegionName,omitnil,omitempty" name:"RegionName"`
}
type IntelligenceRule struct {
@@ -16729,6 +18067,47 @@ type LoadBalancer struct {
References []*OriginGroupReference `json:"References,omitnil,omitempty" name:"References"`
}
+type LogAnalysisDownloadTask struct {
+ // 任务 ID。
+ TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 数据归属地区,取值有:
- mainland:中国大陆境内;
- overseas:全球(不含中国大陆)。
+ Area *string `json:"Area,omitnil,omitempty" name:"Area"`
+
+ // 开始时间,示例值:2020-04-29T00:00:00Z。
+ StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"`
+
+ // 结束时间,示例值:2020-04-30T00:00:00Z。
+ EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"`
+
+ // 日志类型,取值有:
- l7-access-logs:七层访问日志;
- web-attack:托管规则日志。
+ LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
+
+ // 日志匹配条件,长度上限 12KB。
+ Condition *string `json:"Condition,omitnil,omitempty" name:"Condition"`
+
+ // 文件格式,取值有:
+ Format *string `json:"Format,omitnil,omitempty" name:"Format"`
+
+ // 原始日志是否按时间排序返回,取值有:
+ Sort *string `json:"Sort,omitnil,omitempty" name:"Sort"`
+
+ // 任务状态,取值有:
- loading:处理中,等待生成下载链接;
- failed: 处理失败,当前任务无法下载;
- completed:已完成打包,可以下载。
+ Status *string `json:"Status,omitnil,omitempty" name:"Status"`
+
+ // 任务创建时间,任务创建成功后将保留3天。
+ CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"`
+
+ // 下载地址,仅当 Status = completed 时有返回值。
+ Url *string `json:"Url,omitnil,omitempty" name:"Url"`
+
+ // 下载任务过期时间,过期后下载地址将不可用,请通过本接口获取新的下载地址。
+ ExpireTime *string `json:"ExpireTime,omitnil,omitempty" name:"ExpireTime"`
+}
+
type LogFormat struct {
// 日志投递的预设输出格式类型,取值有:
// json:使用预设日志输出格式 JSON Lines,单条日志中的字段以键值对方式呈现;
@@ -16760,6 +18139,14 @@ type LogFormat struct {
FieldDelimiter *string `json:"FieldDelimiter,omitnil,omitempty" name:"FieldDelimiter"`
}
+type LogItem struct {
+ // 日志产生的时间点,采用 unix 毫秒级时间戳。
+ Timestamp *int64 `json:"Timestamp,omitnil,omitempty" name:"Timestamp"`
+
+ // 日志的具体内容,采用JSON字符串格式。
+ LogJson *string `json:"LogJson,omitnil,omitempty" name:"LogJson"`
+}
+
type ManagedRuleAction struct {
// 托管规则组下的具体项,用于改写此单条规则项配置的内容,具体参考产品文档。
RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"`
@@ -18596,6 +19983,102 @@ func (r *ModifyHostsCertificateResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+// Predefined struct for user
+type ModifyInferenceServiceRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 模型服务需要监听的端口。仅支持 1-65535 之间的整数。
+ ListenPort *int64 `json:"ListenPort,omitnil,omitempty" name:"ListenPort"`
+
+ // 推理服务的请求路径列表。最多支持 20 个路径。
+ RequestPaths []*string `json:"RequestPaths,omitnil,omitempty" name:"RequestPaths"`
+
+ // 推理服务的容器配置。当前仅支持设置 1 个容器。
+ Containers []*InferenceContainerConfigForModify `json:"Containers,omitnil,omitempty" name:"Containers"`
+
+ // 推理服务的资源配置。
+ ResourceConfig *InferenceResourceConfigForModify `json:"ResourceConfig,omitnil,omitempty" name:"ResourceConfig"`
+
+ // 描述信息。长度限制不超过 60 个字符。
+ Description *string `json:"Description,omitnil,omitempty" name:"Description"`
+}
+
+type ModifyInferenceServiceRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 模型服务需要监听的端口。仅支持 1-65535 之间的整数。
+ ListenPort *int64 `json:"ListenPort,omitnil,omitempty" name:"ListenPort"`
+
+ // 推理服务的请求路径列表。最多支持 20 个路径。
+ RequestPaths []*string `json:"RequestPaths,omitnil,omitempty" name:"RequestPaths"`
+
+ // 推理服务的容器配置。当前仅支持设置 1 个容器。
+ Containers []*InferenceContainerConfigForModify `json:"Containers,omitnil,omitempty" name:"Containers"`
+
+ // 推理服务的资源配置。
+ ResourceConfig *InferenceResourceConfigForModify `json:"ResourceConfig,omitnil,omitempty" name:"ResourceConfig"`
+
+ // 描述信息。长度限制不超过 60 个字符。
+ Description *string `json:"Description,omitnil,omitempty" name:"Description"`
+}
+
+func (r *ModifyInferenceServiceRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *ModifyInferenceServiceRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "ServiceId")
+ delete(f, "ListenPort")
+ delete(f, "RequestPaths")
+ delete(f, "Containers")
+ delete(f, "ResourceConfig")
+ delete(f, "Description")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInferenceServiceRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type ModifyInferenceServiceResponseParams struct {
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type ModifyInferenceServiceResponse struct {
+ *tchttp.BaseResponse
+ Response *ModifyInferenceServiceResponseParams `json:"Response"`
+}
+
+func (r *ModifyInferenceServiceResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *ModifyInferenceServiceResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
// Predefined struct for user
type ModifyL4ProxyRequestParams struct {
// 站点 ID。
@@ -21358,6 +22841,74 @@ type OfflineCacheParameters struct {
Switch *string `json:"Switch,omitnil,omitempty" name:"Switch"`
}
+// Predefined struct for user
+type OperateInferenceServiceRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 操作类型,包含以下几种:Stop:停止;Resume:启动;Delete:删除。
+ Operation *string `json:"Operation,omitnil,omitempty" name:"Operation"`
+}
+
+type OperateInferenceServiceRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
+
+ // 推理服务 ID。
+ ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`
+
+ // 操作类型,包含以下几种:Stop:停止;Resume:启动;Delete:删除。
+ Operation *string `json:"Operation,omitnil,omitempty" name:"Operation"`
+}
+
+func (r *OperateInferenceServiceRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *OperateInferenceServiceRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "ServiceId")
+ delete(f, "Operation")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "OperateInferenceServiceRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type OperateInferenceServiceResponseParams struct {
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type OperateInferenceServiceResponse struct {
+ *tchttp.BaseResponse
+ Response *OperateInferenceServiceResponseParams `json:"Response"`
+}
+
+func (r *OperateInferenceServiceResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *OperateInferenceServiceResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
type Origin struct {
// 主源站列表。
Origins []*string `json:"Origins,omitnil,omitempty" name:"Origins"`
@@ -22243,61 +23794,59 @@ type RateLimitingRules struct {
}
type RealtimeLogDeliveryTask struct {
- // 实时日志投递任务 ID。
+ // 实时日志投递任务 ID。
TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
- // 实时日志投递任务的名称。
+ // 实时日志投递任务的名称。
TaskName *string `json:"TaskName,omitnil,omitempty" name:"TaskName"`
- // 实时日志投递任务的状态,取值有: enabled: 已启用; disabled: 已停用;deleted: 异常删除状态,请检查目的地腾讯云 CLS 日志集/日志主题是否已被删除。
+ // 实时日志投递任务的状态,取值有:
enabled: 已启用; disabled: 已停用;deleted: 异常删除状态,请检查目的地腾讯云 CLS 日志集/日志主题是否已被删除。
DeliveryStatus *string `json:"DeliveryStatus,omitnil,omitempty" name:"DeliveryStatus"`
- // 实时日志投递任务类型,取值有: cls: 推送到腾讯云 CLS; custom_endpoint:推送到自定义 HTTP(S) 地址; s3:推送到 AWS S3 兼容存储桶地址;log_analysis:推送到 EdgeOne 日志分析。
+ // 实时日志投递任务类型,取值有:
cls: 推送到腾讯云 CLS; custom_endpoint:推送到自定义 HTTP(S) 地址; s3:推送到 AWS S3 兼容存储桶地址;log_analysis:推送到 EdgeOne 日志分析。
TaskType *string `json:"TaskType,omitnil,omitempty" name:"TaskType"`
- // 实时日志投递任务对应的实体(七层域名或者四层代理实例)列表。取值示例如下: 七层域名:domain.example.com; 四层代理实例:sid-2s69eb5wcms7。
+ // 实时日志投递任务对应的实体(七层域名或者四层代理实例)列表。取值示例如下:
七层域名:domain.example.com; 四层代理实例:sid-2s69eb5wcms7。
EntityList []*string `json:"EntityList,omitnil,omitempty" name:"EntityList"`
- // 数据投递类型,取值有: domain:站点加速日志; application:四层代理日志; web-rateLiming:速率限制和 CC 攻击防护日志; web-attack:托管规则日志; web-rule:自定义规则日志; web-bot:Bot管理日志。
+ // 数据投递类型,取值有:
l7-access-logs:七层访问日志;application:四层代理日志; function:边缘函数运行日志; web-attack:托管规则日志; domain:站点加速日志; web-rateLiming:速率限制和 CC 攻击防护日志;web-rule:自定义规则日志; web-bot:Bot 管理日志。
LogType *string `json:"LogType,omitnil,omitempty" name:"LogType"`
- // 数据投递区域,取值有: mainland:中国大陆境内; overseas:全球(不含中国大陆)。
+ // 数据投递区域,取值有:
mainland:中国大陆境内; overseas:全球(不含中国大陆)。
Area *string `json:"Area,omitnil,omitempty" name:"Area"`
- // 投递的预设字段列表。
+ // 投递的预设字段列表。
Fields []*string `json:"Fields,omitnil,omitempty" name:"Fields"`
- // 投递的自定义字段列表。
+ // 投递的自定义字段列表。
CustomFields []*CustomField `json:"CustomFields,omitnil,omitempty" name:"CustomFields"`
- // 日志投递的过滤条件。
+ // 日志投递的过滤条件。
DeliveryConditions []*DeliveryCondition `json:"DeliveryConditions,omitnil,omitempty" name:"DeliveryConditions"`
- // 采样比例,采用千分制,取值范围为1-1000,例如:605 表示采样比例为 60.5%。
+ // 采样比例,采用千分制,取值范围为1-1000,例如:605 表示采样比例为 60.5%。
Sample *uint64 `json:"Sample,omitnil,omitempty" name:"Sample"`
- // 日志投递的输出格式。出参为 null 时表示为默认格式,默认格式逻辑如下:
- // 当 TaskType 取值为 custom_endpoint 时,默认格式为多个 JSON 对象组成的数组,每个 JSON 对象为一条日志;
- // 当 TaskType 取值为 s3 时,默认格式为 JSON Lines。
+ // 日志投递的输出格式。出参为 null 时表示为默认格式,默认格式逻辑如下:
当 TaskType 取值为 custom_endpoint 时,默认格式为多个 JSON 对象组成的数组,每个 JSON 对象为一条日志;当 TaskType 取值为 s3 时,默认格式为 JSON Lines。
// 注意:此字段可能返回 null,表示取不到有效值。
LogFormat *LogFormat `json:"LogFormat,omitnil,omitempty" name:"LogFormat"`
- // CLS 的配置信息。
+ // CLS 的配置信息。
// 注意:此字段可能返回 null,表示取不到有效值。
CLS *CLSTopic `json:"CLS,omitnil,omitempty" name:"CLS"`
- // 自定义 HTTP 服务的配置信息。
+ // 自定义 HTTP 服务的配置信息。
// 注意:此字段可能返回 null,表示取不到有效值。
CustomEndpoint *CustomEndpoint `json:"CustomEndpoint,omitnil,omitempty" name:"CustomEndpoint"`
- // AWS S3 兼容存储桶的配置信息。
+ // AWS S3 兼容存储桶的配置信息。
// 注意:此字段可能返回 null,表示取不到有效值。
S3 *S3 `json:"S3,omitnil,omitempty" name:"S3"`
- // 创建时间。
+ // 创建时间。
CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"`
- // 更新时间。
+ // 更新时间。
UpdateTime *string `json:"UpdateTime,omitnil,omitempty" name:"UpdateTime"`
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index d112f475d5..9a4f05ba23 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1262,7 +1262,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.3.131
## explicit; go 1.14
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016
-# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.132
+# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.3.136
## explicit; go 1.11
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors
@@ -1281,7 +1281,6 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter/v20230110
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip/v20221121
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.3.130
## explicit; go 1.14
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.3.30
## explicit; go 1.14
@@ -1443,7 +1442,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq/v20200217
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578
## explicit; go 1.14
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem/v20210701
-# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.121
+# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.136
## explicit; go 1.14
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/thpc v1.0.998
diff --git a/website/docs/d/teo_billing_data.html.markdown b/website/docs/d/teo_billing_data.html.markdown
new file mode 100644
index 0000000000..db146cba8f
--- /dev/null
+++ b/website/docs/d/teo_billing_data.html.markdown
@@ -0,0 +1,61 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_billing_data"
+sidebar_current: "docs-tencentcloud-datasource-teo_billing_data"
+description: |-
+ Use this data source to query TEO billing data, such as traffic, bandwidth, and request metrics.
+---
+
+# tencentcloud_teo_billing_data
+
+Use this data source to query TEO billing data, such as traffic, bandwidth, and request metrics.
+
+## Example Usage
+
+```hcl
+data "tencentcloud_teo_billing_data" "example" {
+ start_time = "2025-01-01T00:00:00+08:00"
+ end_time = "2025-01-02T00:00:00+08:00"
+ zone_ids = ["zone-2qtuhspy7cr6"]
+ metric_name = "acc_flux"
+ interval = "hour"
+ filters {
+ type = "host"
+ value = "test.example.com"
+ }
+ group_by = ["zone-id", "host"]
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `end_time` - (Required, String) End time. The query time range (`EndTime` - `StartTime`) must be less than or equal to 31 days.
+* `metric_name` - (Required, String) Billing metric name, such as `acc_flux`, `acc_bandwidth`, etc.
+* `start_time` - (Required, String) Start time.
+* `zone_ids` - (Required, List: [`String`]) Site ID collection, up to 100 site IDs. Use `*` to query account-level data of all sites under the current TencentCloud main account.
+* `filters` - (Optional, List) Filter conditions. Each item contains `type` and `value`. Valid `type` values: `host`, `proxy-id`, `region-id`.
+* `group_by` - (Optional, List: [`String`]) Grouping and aggregation dimensions, up to two dimensions. Valid values: `zone-id`, `host`, `proxy-id`, `region-id`.
+* `interval` - (Optional, String) Query time granularity. Valid values: `5min`, `hour`, `day`.
+* `result_output_file` - (Optional, String) Used to save results.
+
+The `filters` object supports the following:
+
+* `type` - (Required, String) Parameter name. Valid values: `host`, `proxy-id`, `region-id`.
+* `value` - (Required, String) Parameter value.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `data` - Billing data point list.
+ * `host` - Domain name to which the data point belongs.
+ * `proxy_id` - Layer 4 proxy instance ID to which the data point belongs.
+ * `region_id` - Billing region ID to which the data point belongs.
+ * `time` - Data timestamp.
+ * `value` - Numeric value.
+ * `zone_id` - Site ID to which the data point belongs.
+
+
diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb
index ed39d25eeb..6f70bdebd4 100644
--- a/website/tencentcloud.erb
+++ b/website/tencentcloud.erb
@@ -5938,6 +5938,9 @@
Data Sources