diff --git a/.changelog/4187.txt b/.changelog/4187.txt
new file mode 100644
index 0000000000..776c9a3caf
--- /dev/null
+++ b/.changelog/4187.txt
@@ -0,0 +1,3 @@
+```release-note:new-resource
+tencentcloud_teo_edge_k_v_namespace
+```
diff --git a/go.mod b/go.mod
index 55e2c04f1d..342e67795c 100644
--- a/go.mod
+++ b/go.mod
@@ -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.46
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.90
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.108
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.3.86
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 2da347a05b..1a9bf50cae 100644
--- a/go.sum
+++ b/go.sum
@@ -837,8 +837,6 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/apm v1.3.8 h1:v/G/D3bqU
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/apm v1.3.8/go.mod h1:DarTPk6LPu4LtKwDRbF2V2Af4KKXVXnzyteNhAifWm8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as v1.3.16 h1:0YPLYvTF/Jb2kzLQPTE9+SUHoOTinqxzLJpQNOg4Gcc=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as v1.3.16/go.mod h1:1JNwb292Pt2CuxQOsgwdXFs2a79nLdwiFRXT0xKACkg=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bh v1.3.68 h1:yyH8702x16BIh46K6vEeHoQiIHuKsYCye2Lj4lmtX98=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bh v1.3.68/go.mod h1:ernIVPt8moCpVWvuoFsJ2OU29Gm6q0XCsY9gemtcR/0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bh v1.3.93 h1:6tYneudwMIvczAIH+6UT4A6DUKF9VPm6er+TIVGMyKg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bh v1.3.93/go.mod h1:4VE2PmQ0iUVzFkamod4wE2eKjW95NkfqP/sWymsReR4=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bi v1.0.824 h1:DVKvZ6h+qd7tadUrCjVAkCCmE3TsbK2ZmwGd3AJcpWc=
@@ -1075,8 +1073,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.3.46 h1:hnBTV4y
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.3.46/go.mod h1:brB63yRDKDgCzEBFU5G3OBV+wQ+lpnOnedxwdnLgjjk=
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.90 h1:UAefUxiVLj639m5jplPyTyOkF5vT8W0d8TrWZ7cepj4=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.90/go.mod h1:YV/JlZueAHyf9eyLmowdbeX90MR5jJmy0Dn6gZwPT2M=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.108 h1:cAw2o4gMuAUZnjdo+WDZmUTHgH6FdysXeUDI1YcBjgI=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.3.108/go.mod h1:/+JtDwgVSkaDGMU42zTWtidw/p56hl2N46zkWJLAr9U=
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.86 h1:vTpLGPpzAbZHOv0F6hmy8C9IBwJIUfhTrXH0vi7eiGA=
diff --git a/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/.openspec.yaml b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/.openspec.yaml
new file mode 100644
index 0000000000..0ba725fbf0
--- /dev/null
+++ b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/.openspec.yaml
@@ -0,0 +1,2 @@
+schema: spec-driven
+created: 2026-06-03
diff --git a/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/design.md b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/design.md
new file mode 100644
index 0000000000..e41a6b7662
--- /dev/null
+++ b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/design.md
@@ -0,0 +1,57 @@
+## Context
+
+TencentCloud TEO (EdgeOne) 提供 Edge KV 命名空间管理的云 API,包括 CreateEdgeKVNamespace、DescribeEdgeKVNamespaces、ModifyEdgeKVNamespace、DeleteEdgeKVNamespace 四个接口。这些接口已在 vendor 中可用(`github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901`)。当前 provider 已有 TEO 服务目录(`tencentcloud/services/teo/`),需要在其中新增资源文件。
+
+## Goals / Non-Goals
+
+**Goals:**
+- 实现 `tencentcloud_teo_edge_k_v_namespace` 资源的完整 CRUD 生命周期
+- 使用 `zone_id#namespace` 联合 ID,支持 terraform import
+- 遵循项目现有代码风格(参考 `tencentcloud_igtm_strategy` 资源)
+- 提供单元测试(使用 gomonkey mock 云 API)
+- 提供资源文档(.md 文件)
+
+**Non-Goals:**
+- 不实现 Edge KV 键值对的 CRUD(仅管理命名空间)
+- 不实现 datasource 类型资源
+- 不新增 service 层文件(直接在资源文件中调用 API)
+
+## Decisions
+
+### 1. 资源 ID 设计:使用 zone_id + namespace 联合 ID
+
+**选择**: 使用 `tccommon.FILED_SP`(即 `#`)作为分隔符拼接 `zone_id` 和 `namespace` 作为资源 ID。
+
+**理由**: CreateEdgeKVNamespace 接口不返回独立的资源 ID,命名空间通过 zone_id + namespace 唯一标识。这与项目中其他类似资源的做法一致。
+
+**替代方案**: 仅使用 namespace 作为 ID → 不可行,因为 namespace 在不同 zone 下可能重复。
+
+### 2. ForceNew 字段设计
+
+**选择**: `zone_id` 和 `namespace` 设为 ForceNew。
+
+**理由**: ModifyEdgeKVNamespace 接口仅支持修改 `remark` 字段,`zone_id` 和 `namespace` 是定位资源的标识符,不可变更。
+
+### 3. Update 方法设计
+
+**选择**: Update 方法仅处理 `remark` 字段的变更,通过 ModifyEdgeKVNamespace 接口实现。
+
+**理由**: 云 API ModifyEdgeKVNamespace 仅支持修改 remark。zone_id 和 namespace 已设为 ForceNew,变更时会触发 destroy + create。
+
+### 4. Read 方法设计:使用 Filters 过滤
+
+**选择**: 在 DescribeEdgeKVNamespaces 请求中使用 `namespace` 过滤条件精确查询目标命名空间,Limit 设为 1000(接口最大值)。
+
+**理由**: DescribeEdgeKVNamespaces 是列表查询接口,通过 Filters 按 namespace 名称过滤可精确定位目标资源。设置最大 Limit 确保不会因分页遗漏。
+
+### 5. 测试方案:gomonkey mock
+
+**选择**: 使用 gomonkey 对云 API 调用进行 mock,编写纯业务逻辑单元测试。
+
+**理由**: 项目要求新增资源使用 mock 方式进行单元测试,不依赖真实云环境。
+
+## Risks / Trade-offs
+
+- [DescribeEdgeKVNamespaces 使用模糊匹配] → 在 Read 方法中遍历返回结果,精确匹配 namespace 名称,避免模糊查询返回多个结果时取错数据。
+- [CreateEdgeKVNamespace 不返回资源 ID] → 创建成功后直接使用入参 zone_id + namespace 组合为 ID,无需从响应中提取。
+- [并发创建同名 namespace] → 依赖云 API 侧的唯一性校验,Terraform 层面不做额外处理。
diff --git a/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/proposal.md b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/proposal.md
new file mode 100644
index 0000000000..e2f38e6f52
--- /dev/null
+++ b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/proposal.md
@@ -0,0 +1,32 @@
+## Why
+
+TencentCloud TEO (EdgeOne) 提供了 Edge KV 命名空间功能,允许用户在边缘节点创建和管理 KV 存储命名空间。当前 Terraform Provider 缺少对该资源的支持,用户无法通过 IaC 方式管理 TEO Edge KV 命名空间的生命周期(创建、查询、修改、删除)。新增此资源以补全 TEO 产品的 Terraform 覆盖度。
+
+## What Changes
+
+- 新增 Terraform 资源 `tencentcloud_teo_edge_k_v_namespace`,支持完整的 CRUD 生命周期管理
+- 资源使用 `zone_id` + `namespace` 作为联合 ID,支持 import
+- 支持创建时指定 `zone_id`、`namespace`、`remark` 参数
+- 支持通过 `ModifyEdgeKVNamespace` 接口更新 `remark` 字段
+- 支持通过 `DeleteEdgeKVNamespace` 接口删除命名空间
+- Read 方法通过 `DescribeEdgeKVNamespaces` 接口查询命名空间详情
+- 在 `provider.go` 和 `provider.md` 中注册新资源
+
+## Capabilities
+
+### New Capabilities
+
+- `teo-edge-kv-namespace-resource`: 提供 TEO Edge KV 命名空间的 CRUD 资源管理能力,包括创建、读取、更新(remark)、删除命名空间,以及 import 支持
+
+### Modified Capabilities
+
+(无)
+
+## Impact
+
+- 新增文件: `tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.go`
+- 新增文件: `tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace_test.go`
+- 新增文件: `tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.md`
+- 修改文件: `tencentcloud/provider.go`(注册资源)
+- 修改文件: `tencentcloud/provider.md`(添加资源文档引用)
+- 依赖: `github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901`(已在 vendor 中)
diff --git a/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/specs/teo-edge-kv-namespace-resource/spec.md b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/specs/teo-edge-kv-namespace-resource/spec.md
new file mode 100644
index 0000000000..6abb02de2b
--- /dev/null
+++ b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/specs/teo-edge-kv-namespace-resource/spec.md
@@ -0,0 +1,93 @@
+## ADDED Requirements
+
+### Requirement: Resource schema definition
+
+The resource `tencentcloud_teo_edge_k_v_namespace` SHALL define the following schema fields:
+- `zone_id` (Required, ForceNew, String): 站点 ID
+- `namespace` (Required, ForceNew, String): 命名空间名称,1-50 个字符,允许 a-z、A-Z、0-9、-
+- `remark` (Optional, String): 命名空间描述,最大 256 个字符
+
+The resource SHALL use `zone_id#namespace` as the composite resource ID (using `tccommon.FILED_SP` as separator).
+
+#### Scenario: Schema fields are correctly defined
+- **WHEN** user defines a `tencentcloud_teo_edge_k_v_namespace` resource block with `zone_id`, `namespace`, and `remark`
+- **THEN** Terraform SHALL accept the configuration and plan the resource creation
+
+#### Scenario: Import with composite ID
+- **WHEN** user runs `terraform import tencentcloud_teo_edge_k_v_namespace.example zone-xxx#my-namespace`
+- **THEN** the resource SHALL be imported successfully by parsing `zone_id` and `namespace` from the composite ID
+
+### Requirement: Create operation
+
+The resource Create function SHALL call `CreateEdgeKVNamespace` API with `ZoneId`, `Namespace`, and `Remark` parameters. After successful creation, the resource ID SHALL be set to `zone_id#namespace`. The Create function SHALL verify that the API call succeeds before setting the ID.
+
+#### Scenario: Successful creation
+- **WHEN** user applies a configuration with valid `zone_id`, `namespace`, and `remark`
+- **THEN** the system SHALL call `CreateEdgeKVNamespace` API and set the resource ID to `zone_id#namespace`
+
+#### Scenario: Creation with retry on failure
+- **WHEN** the `CreateEdgeKVNamespace` API call fails with a retryable error
+- **THEN** the system SHALL retry the request using `tccommon.ReadRetryTimeout` and `resource.RetryContext`
+
+### Requirement: Read operation
+
+The resource Read function SHALL call `DescribeEdgeKVNamespaces` API with `ZoneId` and a `namespace` filter to retrieve the namespace details. It SHALL set `zone_id`, `namespace`, and `remark` from the response. If the namespace is not found, it SHALL remove the resource from state.
+
+#### Scenario: Successful read
+- **WHEN** the resource exists in the cloud
+- **THEN** the system SHALL call `DescribeEdgeKVNamespaces` with namespace filter, find the matching namespace, and set `zone_id`, `namespace`, `remark` in state
+
+#### Scenario: Resource not found
+- **WHEN** the `DescribeEdgeKVNamespaces` API returns empty results for the namespace
+- **THEN** the system SHALL remove the resource from Terraform state (call `d.SetId("")`)
+
+### Requirement: Update operation
+
+The resource Update function SHALL call `ModifyEdgeKVNamespace` API when `remark` changes. Since `zone_id` and `namespace` are ForceNew, they cannot be updated in-place.
+
+#### Scenario: Update remark
+- **WHEN** user changes the `remark` field value
+- **THEN** the system SHALL call `ModifyEdgeKVNamespace` API with the new `remark` value
+
+#### Scenario: Update with retry on failure
+- **WHEN** the `ModifyEdgeKVNamespace` API call fails with a retryable error
+- **THEN** the system SHALL retry the request using `tccommon.ReadRetryTimeout` and `resource.RetryContext`
+
+### Requirement: Delete operation
+
+The resource Delete function SHALL call `DeleteEdgeKVNamespace` API with `ZoneId` and `Namespace` parameters to remove the namespace.
+
+#### Scenario: Successful deletion
+- **WHEN** user destroys the resource
+- **THEN** the system SHALL call `DeleteEdgeKVNamespace` API with the correct `ZoneId` and `Namespace`
+
+#### Scenario: Delete with retry on failure
+- **WHEN** the `DeleteEdgeKVNamespace` API call fails with a retryable error
+- **THEN** the system SHALL retry the request using `tccommon.ReadRetryTimeout` and `resource.RetryContext`
+
+### Requirement: Provider registration
+
+The resource SHALL be registered in `tencentcloud/provider.go` under the TEO service section, and referenced in `tencentcloud/provider.md`.
+
+#### Scenario: Resource is available in provider
+- **WHEN** user configures the tencentcloud provider
+- **THEN** the resource `tencentcloud_teo_edge_k_v_namespace` SHALL be available for use
+
+### Requirement: Unit tests with gomonkey mock
+
+The resource SHALL have unit tests in `resource_tc_teo_edge_k_v_namespace_test.go` that use gomonkey to mock cloud API calls. Tests SHALL cover Create, Read, Update, and Delete operations and SHALL pass with `go test -gcflags=all=-l`.
+
+#### Scenario: Unit tests pass
+- **WHEN** running `go test -gcflags=all=-l` on the test file
+- **THEN** all unit tests SHALL pass without requiring real cloud credentials
+
+### Requirement: Resource documentation
+
+The resource SHALL have a documentation file at `tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.md` with:
+- A one-line description mentioning TEO product
+- Example Usage section
+- Import section showing the composite ID format `zone_id#namespace`
+
+#### Scenario: Documentation is complete
+- **WHEN** the documentation file is generated
+- **THEN** it SHALL contain description, Example Usage, and Import sections
diff --git a/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/tasks.md b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/tasks.md
new file mode 100644
index 0000000000..0fae0080f0
--- /dev/null
+++ b/openspec/changes/archive/2026-06-03-add-teo-edge-kv-namespace-resource/tasks.md
@@ -0,0 +1,21 @@
+## 1. Resource Implementation
+
+- [x] 1.1 Create resource file `tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.go` with schema definition (zone_id, namespace, remark) and CRUD functions (Create, Read, Update, Delete) following the igtm_strategy resource pattern
+- [x] 1.2 Implement Create function: call CreateEdgeKVNamespace API with retry, set composite ID (zone_id#namespace)
+- [x] 1.3 Implement Read function: call DescribeEdgeKVNamespaces API with namespace filter, set state fields, handle resource not found
+- [x] 1.4 Implement Update function: call ModifyEdgeKVNamespace API with retry when remark changes
+- [x] 1.5 Implement Delete function: call DeleteEdgeKVNamespace API with retry
+
+## 2. Provider Registration
+
+- [x] 2.1 Register `tencentcloud_teo_edge_k_v_namespace` resource in `tencentcloud/provider.go` under TEO service section
+- [x] 2.2 Add resource reference in `tencentcloud/provider.md`
+
+## 3. Documentation
+
+- [x] 3.1 Create resource documentation file `tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.md` with description, Example Usage, and Import sections
+
+## 4. Unit Tests
+
+- [x] 4.1 Create unit test file `tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace_test.go` with gomonkey mock tests covering Create, Read, Update, and Delete operations
+- [x] 4.2 Run unit tests with `go test -gcflags=all=-l` to verify they pass
diff --git a/openspec/specs/teo-edge-kv-namespace-resource/spec.md b/openspec/specs/teo-edge-kv-namespace-resource/spec.md
new file mode 100644
index 0000000000..6abb02de2b
--- /dev/null
+++ b/openspec/specs/teo-edge-kv-namespace-resource/spec.md
@@ -0,0 +1,93 @@
+## ADDED Requirements
+
+### Requirement: Resource schema definition
+
+The resource `tencentcloud_teo_edge_k_v_namespace` SHALL define the following schema fields:
+- `zone_id` (Required, ForceNew, String): 站点 ID
+- `namespace` (Required, ForceNew, String): 命名空间名称,1-50 个字符,允许 a-z、A-Z、0-9、-
+- `remark` (Optional, String): 命名空间描述,最大 256 个字符
+
+The resource SHALL use `zone_id#namespace` as the composite resource ID (using `tccommon.FILED_SP` as separator).
+
+#### Scenario: Schema fields are correctly defined
+- **WHEN** user defines a `tencentcloud_teo_edge_k_v_namespace` resource block with `zone_id`, `namespace`, and `remark`
+- **THEN** Terraform SHALL accept the configuration and plan the resource creation
+
+#### Scenario: Import with composite ID
+- **WHEN** user runs `terraform import tencentcloud_teo_edge_k_v_namespace.example zone-xxx#my-namespace`
+- **THEN** the resource SHALL be imported successfully by parsing `zone_id` and `namespace` from the composite ID
+
+### Requirement: Create operation
+
+The resource Create function SHALL call `CreateEdgeKVNamespace` API with `ZoneId`, `Namespace`, and `Remark` parameters. After successful creation, the resource ID SHALL be set to `zone_id#namespace`. The Create function SHALL verify that the API call succeeds before setting the ID.
+
+#### Scenario: Successful creation
+- **WHEN** user applies a configuration with valid `zone_id`, `namespace`, and `remark`
+- **THEN** the system SHALL call `CreateEdgeKVNamespace` API and set the resource ID to `zone_id#namespace`
+
+#### Scenario: Creation with retry on failure
+- **WHEN** the `CreateEdgeKVNamespace` API call fails with a retryable error
+- **THEN** the system SHALL retry the request using `tccommon.ReadRetryTimeout` and `resource.RetryContext`
+
+### Requirement: Read operation
+
+The resource Read function SHALL call `DescribeEdgeKVNamespaces` API with `ZoneId` and a `namespace` filter to retrieve the namespace details. It SHALL set `zone_id`, `namespace`, and `remark` from the response. If the namespace is not found, it SHALL remove the resource from state.
+
+#### Scenario: Successful read
+- **WHEN** the resource exists in the cloud
+- **THEN** the system SHALL call `DescribeEdgeKVNamespaces` with namespace filter, find the matching namespace, and set `zone_id`, `namespace`, `remark` in state
+
+#### Scenario: Resource not found
+- **WHEN** the `DescribeEdgeKVNamespaces` API returns empty results for the namespace
+- **THEN** the system SHALL remove the resource from Terraform state (call `d.SetId("")`)
+
+### Requirement: Update operation
+
+The resource Update function SHALL call `ModifyEdgeKVNamespace` API when `remark` changes. Since `zone_id` and `namespace` are ForceNew, they cannot be updated in-place.
+
+#### Scenario: Update remark
+- **WHEN** user changes the `remark` field value
+- **THEN** the system SHALL call `ModifyEdgeKVNamespace` API with the new `remark` value
+
+#### Scenario: Update with retry on failure
+- **WHEN** the `ModifyEdgeKVNamespace` API call fails with a retryable error
+- **THEN** the system SHALL retry the request using `tccommon.ReadRetryTimeout` and `resource.RetryContext`
+
+### Requirement: Delete operation
+
+The resource Delete function SHALL call `DeleteEdgeKVNamespace` API with `ZoneId` and `Namespace` parameters to remove the namespace.
+
+#### Scenario: Successful deletion
+- **WHEN** user destroys the resource
+- **THEN** the system SHALL call `DeleteEdgeKVNamespace` API with the correct `ZoneId` and `Namespace`
+
+#### Scenario: Delete with retry on failure
+- **WHEN** the `DeleteEdgeKVNamespace` API call fails with a retryable error
+- **THEN** the system SHALL retry the request using `tccommon.ReadRetryTimeout` and `resource.RetryContext`
+
+### Requirement: Provider registration
+
+The resource SHALL be registered in `tencentcloud/provider.go` under the TEO service section, and referenced in `tencentcloud/provider.md`.
+
+#### Scenario: Resource is available in provider
+- **WHEN** user configures the tencentcloud provider
+- **THEN** the resource `tencentcloud_teo_edge_k_v_namespace` SHALL be available for use
+
+### Requirement: Unit tests with gomonkey mock
+
+The resource SHALL have unit tests in `resource_tc_teo_edge_k_v_namespace_test.go` that use gomonkey to mock cloud API calls. Tests SHALL cover Create, Read, Update, and Delete operations and SHALL pass with `go test -gcflags=all=-l`.
+
+#### Scenario: Unit tests pass
+- **WHEN** running `go test -gcflags=all=-l` on the test file
+- **THEN** all unit tests SHALL pass without requiring real cloud credentials
+
+### Requirement: Resource documentation
+
+The resource SHALL have a documentation file at `tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.md` with:
+- A one-line description mentioning TEO product
+- Example Usage section
+- Import section showing the composite ID format `zone_id#namespace`
+
+#### Scenario: Documentation is complete
+- **WHEN** the documentation file is generated
+- **THEN** it SHALL contain description, Example Usage, and Import sections
diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go
index bc3062d9c9..9854754bed 100644
--- a/tencentcloud/provider.go
+++ b/tencentcloud/provider.go
@@ -2118,6 +2118,7 @@ func Provider() *schema.Provider {
"tencentcloud_teo_just_in_time_transcode_template": teo.ResourceTencentCloudTeoJustInTimeTranscodeTemplate(),
"tencentcloud_teo_customize_error_page": teo.ResourceTencentCloudTeoCustomizeErrorPage(),
"tencentcloud_teo_origin_acl": teo.ResourceTencentCloudTeoOriginAcl(),
+ "tencentcloud_teo_edge_k_v_namespace": teo.ResourceTencentCloudTeoEdgeKVNamespace(),
"tencentcloud_teo_ddos_protection_config": teo.ResourceTencentCloudTeoDdosProtectionConfig(),
"tencentcloud_teo_multi_path_gateway_secret_key": teo.ResourceTencentCloudTeoMultiPathGatewaySecretKeyConfig(),
"tencentcloud_teo_multi_path_gateway": teo.ResourceTencentCloudTeoMultiPathGateway(),
diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md
index db96270a03..49cc1628d9 100644
--- a/tencentcloud/provider.md
+++ b/tencentcloud/provider.md
@@ -1596,6 +1596,7 @@ tencentcloud_teo_bind_security_template
tencentcloud_teo_content_identifier
tencentcloud_teo_customize_error_page
tencentcloud_teo_origin_acl
+tencentcloud_teo_edge_k_v_namespace
tencentcloud_teo_ddos_protection_config
tencentcloud_teo_multi_path_gateway_secret_key
tencentcloud_teo_multi_path_gateway
diff --git a/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.go b/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.go
new file mode 100644
index 0000000000..30c11f11d3
--- /dev/null
+++ b/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.go
@@ -0,0 +1,267 @@
+package teo
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "strings"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ 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/internal/helper"
+)
+
+func ResourceTencentCloudTeoEdgeKVNamespace() *schema.Resource {
+ return &schema.Resource{
+ Create: resourceTencentCloudTeoEdgeKVNamespaceCreate,
+ Read: resourceTencentCloudTeoEdgeKVNamespaceRead,
+ Update: resourceTencentCloudTeoEdgeKVNamespaceUpdate,
+ Delete: resourceTencentCloudTeoEdgeKVNamespaceDelete,
+ Importer: &schema.ResourceImporter{
+ State: schema.ImportStatePassthrough,
+ },
+ Schema: map[string]*schema.Schema{
+ "zone_id": {
+ Type: schema.TypeString,
+ Required: true,
+ ForceNew: true,
+ Description: "Site ID.",
+ },
+ "namespace": {
+ Type: schema.TypeString,
+ Required: true,
+ ForceNew: true,
+ Description: "Namespace name. Supports 1-50 characters, allowed characters are a-z, A-Z, 0-9, -.",
+ },
+ "remark": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Namespace description. Maximum 256 characters.",
+ },
+ },
+ }
+}
+
+func resourceTencentCloudTeoEdgeKVNamespaceCreate(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_teo_edge_k_v_namespace.create")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ var (
+ logId = tccommon.GetLogId(tccommon.ContextNil)
+ ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+ request = teov20220901.NewCreateEdgeKVNamespaceRequest()
+ zoneId string
+ namespace string
+ )
+
+ if v, ok := d.GetOk("zone_id"); ok {
+ request.ZoneId = helper.String(v.(string))
+ zoneId = v.(string)
+ }
+
+ if v, ok := d.GetOk("namespace"); ok {
+ request.Namespace = helper.String(v.(string))
+ namespace = v.(string)
+ }
+
+ if v, ok := d.GetOk("remark"); ok {
+ request.Remark = helper.String(v.(string))
+ }
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseTeoV20220901Client().CreateEdgeKVNamespaceWithContext(ctx, request)
+ if e != nil {
+ return tccommon.RetryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
+ }
+
+ if result == nil || result.Response == nil {
+ return resource.NonRetryableError(fmt.Errorf("Create teo edge kv namespace failed, Response is nil."))
+ }
+
+ return nil
+ })
+
+ if err != nil {
+ log.Printf("[CRITAL]%s create teo edge kv namespace failed, reason:%+v", logId, err)
+ return err
+ }
+
+ d.SetId(strings.Join([]string{zoneId, namespace}, tccommon.FILED_SP))
+ return resourceTencentCloudTeoEdgeKVNamespaceRead(d, meta)
+}
+
+func resourceTencentCloudTeoEdgeKVNamespaceRead(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_teo_edge_k_v_namespace.read")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ var (
+ logId = tccommon.GetLogId(tccommon.ContextNil)
+ ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+ request = teov20220901.NewDescribeEdgeKVNamespacesRequest()
+ )
+
+ idSplit := strings.Split(d.Id(), tccommon.FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
+ }
+
+ zoneId := idSplit[0]
+ namespace := idSplit[1]
+
+ request.ZoneId = &zoneId
+ request.Limit = helper.Int64(1000)
+ request.Filters = []*teov20220901.AdvancedFilter{
+ {
+ Name: helper.String("namespace"),
+ Values: []*string{&namespace},
+ Fuzzy: helper.Bool(false),
+ },
+ }
+
+ var kvNamespace *teov20220901.KVNamespace
+ err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseTeoV20220901Client().DescribeEdgeKVNamespacesWithContext(ctx, request)
+ if e != nil {
+ return tccommon.RetryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
+ }
+
+ if result == nil || result.Response == nil {
+ return resource.NonRetryableError(fmt.Errorf("Describe teo edge kv namespaces failed, Response is nil."))
+ }
+
+ for _, ns := range result.Response.KVNamespaces {
+ if ns.Namespace != nil && *ns.Namespace == namespace {
+ kvNamespace = ns
+ break
+ }
+ }
+
+ return nil
+ })
+
+ if err != nil {
+ log.Printf("[CRITAL]%s read teo edge kv namespace failed, reason:%+v", logId, err)
+ return err
+ }
+
+ if kvNamespace == nil {
+ log.Printf("[WARN]%s resource `tencentcloud_teo_edge_k_v_namespace` [%s] not found, please check if it has been deleted.\n", logId, d.Id())
+ d.SetId("")
+ return nil
+ }
+
+ _ = d.Set("zone_id", zoneId)
+
+ if kvNamespace.Namespace != nil {
+ _ = d.Set("namespace", kvNamespace.Namespace)
+ }
+
+ if kvNamespace.Remark != nil {
+ _ = d.Set("remark", kvNamespace.Remark)
+ }
+
+ return nil
+}
+
+func resourceTencentCloudTeoEdgeKVNamespaceUpdate(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_teo_edge_k_v_namespace.update")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ var (
+ logId = tccommon.GetLogId(tccommon.ContextNil)
+ ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+ )
+
+ idSplit := strings.Split(d.Id(), tccommon.FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
+ }
+
+ zoneId := idSplit[0]
+ namespace := idSplit[1]
+
+ if d.HasChange("remark") {
+ request := teov20220901.NewModifyEdgeKVNamespaceRequest()
+ request.ZoneId = &zoneId
+ request.Namespace = &namespace
+
+ if v, ok := d.GetOk("remark"); ok {
+ request.Remark = helper.String(v.(string))
+ } else {
+ request.Remark = helper.String("")
+ }
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseTeoV20220901Client().ModifyEdgeKVNamespaceWithContext(ctx, request)
+ if e != nil {
+ return tccommon.RetryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
+ }
+
+ if result == nil || result.Response == nil {
+ return resource.NonRetryableError(fmt.Errorf("Modify teo edge kv namespace failed, Response is nil."))
+ }
+
+ return nil
+ })
+
+ if err != nil {
+ log.Printf("[CRITAL]%s update teo edge kv namespace failed, reason:%+v", logId, err)
+ return err
+ }
+ }
+
+ return resourceTencentCloudTeoEdgeKVNamespaceRead(d, meta)
+}
+
+func resourceTencentCloudTeoEdgeKVNamespaceDelete(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_teo_edge_k_v_namespace.delete")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ var (
+ logId = tccommon.GetLogId(tccommon.ContextNil)
+ ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+ request = teov20220901.NewDeleteEdgeKVNamespaceRequest()
+ )
+
+ idSplit := strings.Split(d.Id(), tccommon.FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
+ }
+
+ zoneId := idSplit[0]
+ namespace := idSplit[1]
+
+ request.ZoneId = &zoneId
+ request.Namespace = &namespace
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseTeoV20220901Client().DeleteEdgeKVNamespaceWithContext(ctx, request)
+ if e != nil {
+ return tccommon.RetryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
+ }
+
+ if result == nil || result.Response == nil {
+ return resource.NonRetryableError(fmt.Errorf("Delete teo edge kv namespace failed, Response is nil."))
+ }
+
+ return nil
+ })
+
+ if err != nil {
+ log.Printf("[CRITAL]%s delete teo edge kv namespace failed, reason:%+v", logId, err)
+ return err
+ }
+
+ return nil
+}
diff --git a/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.md b/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.md
new file mode 100644
index 0000000000..3a2cb1bbfe
--- /dev/null
+++ b/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace.md
@@ -0,0 +1,19 @@
+Provides a resource to create a TEO edge KV namespace
+
+Example Usage
+
+```hcl
+resource "tencentcloud_teo_edge_k_v_namespace" "example" {
+ zone_id = "zone-2o3h21ed2t68"
+ namespace = "my-namespace"
+ remark = "This is an example namespace"
+}
+```
+
+Import
+
+TEO edge KV namespace can be imported using the composite id (zone_id#namespace), e.g.
+
+````
+terraform import tencentcloud_teo_edge_k_v_namespace.example zone-2o3h21ed2t68#my-namespace
+````
diff --git a/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace_test.go b/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace_test.go
new file mode 100644
index 0000000000..7f4fe59aa3
--- /dev/null
+++ b/tencentcloud/services/teo/resource_tc_teo_edge_k_v_namespace_test.go
@@ -0,0 +1,258 @@
+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"
+)
+
+type mockMetaEdgeKVNamespace struct {
+ client *connectivity.TencentCloudClient
+}
+
+func (m *mockMetaEdgeKVNamespace) GetAPIV3Conn() *connectivity.TencentCloudClient {
+ return m.client
+}
+
+var _ tccommon.ProviderMeta = &mockMetaEdgeKVNamespace{}
+
+func newMockMetaEdgeKVNamespace() *mockMetaEdgeKVNamespace {
+ return &mockMetaEdgeKVNamespace{client: &connectivity.TencentCloudClient{}}
+}
+
+func ptrStringEdgeKVNamespace(s string) *string {
+ return &s
+}
+
+func helper_int64(v int64) *int64 {
+ return &v
+}
+
+// go test ./tencentcloud/services/teo/ -run "TestTeoEdgeKVNamespace" -v -count=1 -gcflags="all=-l"
+
+// TestTeoEdgeKVNamespace_Create tests Create operation
+func TestTeoEdgeKVNamespace_Create(t *testing.T) {
+ patches := gomonkey.NewPatches()
+ defer patches.Reset()
+
+ teoClient := &teov20220901.Client{}
+ patches.ApplyMethodReturn(newMockMetaEdgeKVNamespace().client, "UseTeoV20220901Client", teoClient)
+
+ patches.ApplyMethodFunc(teoClient, "CreateEdgeKVNamespaceWithContext", func(_ context.Context, request *teov20220901.CreateEdgeKVNamespaceRequest) (*teov20220901.CreateEdgeKVNamespaceResponse, error) {
+ assert.NotNil(t, request.ZoneId)
+ assert.Equal(t, "zone-2o3h21ed2t68", *request.ZoneId)
+ assert.NotNil(t, request.Namespace)
+ assert.Equal(t, "my-namespace", *request.Namespace)
+ assert.NotNil(t, request.Remark)
+ assert.Equal(t, "test remark", *request.Remark)
+
+ resp := teov20220901.NewCreateEdgeKVNamespaceResponse()
+ resp.Response = &teov20220901.CreateEdgeKVNamespaceResponseParams{
+ RequestId: ptrStringEdgeKVNamespace("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ patches.ApplyMethodFunc(teoClient, "DescribeEdgeKVNamespacesWithContext", func(_ context.Context, request *teov20220901.DescribeEdgeKVNamespacesRequest) (*teov20220901.DescribeEdgeKVNamespacesResponse, error) {
+ assert.NotNil(t, request.ZoneId)
+ assert.Equal(t, "zone-2o3h21ed2t68", *request.ZoneId)
+
+ resp := teov20220901.NewDescribeEdgeKVNamespacesResponse()
+ resp.Response = &teov20220901.DescribeEdgeKVNamespacesResponseParams{
+ TotalCount: helper_int64(1),
+ KVNamespaces: []*teov20220901.KVNamespace{
+ {
+ Namespace: ptrStringEdgeKVNamespace("my-namespace"),
+ Remark: ptrStringEdgeKVNamespace("test remark"),
+ },
+ },
+ RequestId: ptrStringEdgeKVNamespace("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ meta := newMockMetaEdgeKVNamespace()
+ res := teo.ResourceTencentCloudTeoEdgeKVNamespace()
+ d := schema.TestResourceDataRaw(t, res.Schema, map[string]interface{}{
+ "zone_id": "zone-2o3h21ed2t68",
+ "namespace": "my-namespace",
+ "remark": "test remark",
+ })
+
+ err := res.Create(d, meta)
+ assert.NoError(t, err)
+ assert.Equal(t, "zone-2o3h21ed2t68#my-namespace", d.Id())
+ assert.Equal(t, "test remark", d.Get("remark"))
+}
+
+// TestTeoEdgeKVNamespace_Read tests Read operation
+func TestTeoEdgeKVNamespace_Read(t *testing.T) {
+ patches := gomonkey.NewPatches()
+ defer patches.Reset()
+
+ teoClient := &teov20220901.Client{}
+ patches.ApplyMethodReturn(newMockMetaEdgeKVNamespace().client, "UseTeoV20220901Client", teoClient)
+
+ patches.ApplyMethodFunc(teoClient, "DescribeEdgeKVNamespacesWithContext", func(_ context.Context, request *teov20220901.DescribeEdgeKVNamespacesRequest) (*teov20220901.DescribeEdgeKVNamespacesResponse, error) {
+ assert.NotNil(t, request.ZoneId)
+ assert.Equal(t, "zone-2o3h21ed2t68", *request.ZoneId)
+
+ resp := teov20220901.NewDescribeEdgeKVNamespacesResponse()
+ resp.Response = &teov20220901.DescribeEdgeKVNamespacesResponseParams{
+ TotalCount: helper_int64(1),
+ KVNamespaces: []*teov20220901.KVNamespace{
+ {
+ Namespace: ptrStringEdgeKVNamespace("my-namespace"),
+ Remark: ptrStringEdgeKVNamespace("test remark"),
+ },
+ },
+ RequestId: ptrStringEdgeKVNamespace("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ meta := newMockMetaEdgeKVNamespace()
+ res := teo.ResourceTencentCloudTeoEdgeKVNamespace()
+ d := schema.TestResourceDataRaw(t, res.Schema, map[string]interface{}{
+ "zone_id": "zone-2o3h21ed2t68",
+ "namespace": "my-namespace",
+ })
+ d.SetId("zone-2o3h21ed2t68#my-namespace")
+
+ err := res.Read(d, meta)
+ assert.NoError(t, err)
+ assert.Equal(t, "zone-2o3h21ed2t68", d.Get("zone_id"))
+ assert.Equal(t, "my-namespace", d.Get("namespace"))
+ assert.Equal(t, "test remark", d.Get("remark"))
+}
+
+// TestTeoEdgeKVNamespace_ReadNotFound tests Read when resource is not found
+func TestTeoEdgeKVNamespace_ReadNotFound(t *testing.T) {
+ patches := gomonkey.NewPatches()
+ defer patches.Reset()
+
+ teoClient := &teov20220901.Client{}
+ patches.ApplyMethodReturn(newMockMetaEdgeKVNamespace().client, "UseTeoV20220901Client", teoClient)
+
+ patches.ApplyMethodFunc(teoClient, "DescribeEdgeKVNamespacesWithContext", func(_ context.Context, request *teov20220901.DescribeEdgeKVNamespacesRequest) (*teov20220901.DescribeEdgeKVNamespacesResponse, error) {
+ resp := teov20220901.NewDescribeEdgeKVNamespacesResponse()
+ resp.Response = &teov20220901.DescribeEdgeKVNamespacesResponseParams{
+ TotalCount: helper_int64(0),
+ KVNamespaces: []*teov20220901.KVNamespace{},
+ RequestId: ptrStringEdgeKVNamespace("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ meta := newMockMetaEdgeKVNamespace()
+ res := teo.ResourceTencentCloudTeoEdgeKVNamespace()
+ d := schema.TestResourceDataRaw(t, res.Schema, map[string]interface{}{
+ "zone_id": "zone-2o3h21ed2t68",
+ "namespace": "my-namespace",
+ })
+ d.SetId("zone-2o3h21ed2t68#my-namespace")
+
+ err := res.Read(d, meta)
+ assert.NoError(t, err)
+ assert.Equal(t, "", d.Id())
+}
+
+// TestTeoEdgeKVNamespace_Update tests Update operation
+func TestTeoEdgeKVNamespace_Update(t *testing.T) {
+ patches := gomonkey.NewPatches()
+ defer patches.Reset()
+
+ teoClient := &teov20220901.Client{}
+ patches.ApplyMethodReturn(newMockMetaEdgeKVNamespace().client, "UseTeoV20220901Client", teoClient)
+
+ modifyCalled := false
+ patches.ApplyMethodFunc(teoClient, "ModifyEdgeKVNamespaceWithContext", func(_ context.Context, request *teov20220901.ModifyEdgeKVNamespaceRequest) (*teov20220901.ModifyEdgeKVNamespaceResponse, error) {
+ assert.NotNil(t, request.ZoneId)
+ assert.Equal(t, "zone-2o3h21ed2t68", *request.ZoneId)
+ assert.NotNil(t, request.Namespace)
+ assert.Equal(t, "my-namespace", *request.Namespace)
+ assert.NotNil(t, request.Remark)
+ assert.Equal(t, "updated remark", *request.Remark)
+ modifyCalled = true
+
+ resp := teov20220901.NewModifyEdgeKVNamespaceResponse()
+ resp.Response = &teov20220901.ModifyEdgeKVNamespaceResponseParams{
+ RequestId: ptrStringEdgeKVNamespace("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ patches.ApplyMethodFunc(teoClient, "DescribeEdgeKVNamespacesWithContext", func(_ context.Context, request *teov20220901.DescribeEdgeKVNamespacesRequest) (*teov20220901.DescribeEdgeKVNamespacesResponse, error) {
+ resp := teov20220901.NewDescribeEdgeKVNamespacesResponse()
+ resp.Response = &teov20220901.DescribeEdgeKVNamespacesResponseParams{
+ TotalCount: helper_int64(1),
+ KVNamespaces: []*teov20220901.KVNamespace{
+ {
+ Namespace: ptrStringEdgeKVNamespace("my-namespace"),
+ Remark: ptrStringEdgeKVNamespace("updated remark"),
+ },
+ },
+ RequestId: ptrStringEdgeKVNamespace("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ meta := newMockMetaEdgeKVNamespace()
+ res := teo.ResourceTencentCloudTeoEdgeKVNamespace()
+ d := schema.TestResourceDataRaw(t, res.Schema, map[string]interface{}{
+ "zone_id": "zone-2o3h21ed2t68",
+ "namespace": "my-namespace",
+ "remark": "updated remark",
+ })
+ d.SetId("zone-2o3h21ed2t68#my-namespace")
+
+ err := res.Update(d, meta)
+ assert.NoError(t, err)
+ assert.True(t, modifyCalled)
+ assert.Equal(t, "updated remark", d.Get("remark"))
+}
+
+// TestTeoEdgeKVNamespace_Delete tests Delete operation
+func TestTeoEdgeKVNamespace_Delete(t *testing.T) {
+ patches := gomonkey.NewPatches()
+ defer patches.Reset()
+
+ teoClient := &teov20220901.Client{}
+ patches.ApplyMethodReturn(newMockMetaEdgeKVNamespace().client, "UseTeoV20220901Client", teoClient)
+
+ deleteCalled := false
+ patches.ApplyMethodFunc(teoClient, "DeleteEdgeKVNamespaceWithContext", func(_ context.Context, request *teov20220901.DeleteEdgeKVNamespaceRequest) (*teov20220901.DeleteEdgeKVNamespaceResponse, error) {
+ assert.NotNil(t, request.ZoneId)
+ assert.Equal(t, "zone-2o3h21ed2t68", *request.ZoneId)
+ assert.NotNil(t, request.Namespace)
+ assert.Equal(t, "my-namespace", *request.Namespace)
+ deleteCalled = true
+
+ resp := teov20220901.NewDeleteEdgeKVNamespaceResponse()
+ resp.Response = &teov20220901.DeleteEdgeKVNamespaceResponseParams{
+ RequestId: ptrStringEdgeKVNamespace("fake-request-id"),
+ }
+ return resp, nil
+ })
+
+ meta := newMockMetaEdgeKVNamespace()
+ res := teo.ResourceTencentCloudTeoEdgeKVNamespace()
+ d := schema.TestResourceDataRaw(t, res.Schema, map[string]interface{}{
+ "zone_id": "zone-2o3h21ed2t68",
+ "namespace": "my-namespace",
+ "remark": "test remark",
+ })
+ d.SetId("zone-2o3h21ed2t68#my-namespace")
+
+ err := res.Delete(d, meta)
+ assert.NoError(t, err)
+ assert.True(t, deleteCalled)
+}
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 fcb95fb7f6..eac0ede091 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
@@ -600,7 +600,9 @@ func NewCreateAccelerationDomainResponse() (response *CreateAccelerationDomainRe
// INVALIDPARAMETERVALUE_INVALIDDNSNAME = "InvalidParameterValue.InvalidDNSName"
// INVALIDPARAMETERVALUE_INVALIDDOMAINNAME = "InvalidParameterValue.InvalidDomainName"
// INVALIDPARAMETERVALUE_INVALIDPROXYORIGIN = "InvalidParameterValue.InvalidProxyOrigin"
+// INVALIDPARAMETERVALUE_INVALIDSITEFAILOVERUNSUPPORTED = "InvalidParameterValue.InvalidSiteFailoverUnsupported"
// INVALIDPARAMETERVALUE_ORIGINGROUPNOTEXISTS = "InvalidParameterValue.OriginGroupNotExists"
+// INVALIDPARAMETERVALUE_SITEFAILOVERNOTSUPPORTHOSTORIGINTYPEVOD = "InvalidParameterValue.SiteFailoverNotSupportHostOriginTypeVod"
// OPERATIONDENIED = "OperationDenied"
// OPERATIONDENIED_ACCELERATEMAINLANDDISABLE = "OperationDenied.AccelerateMainlandDisable"
// OPERATIONDENIED_CONFIGLOCKED = "OperationDenied.ConfigLocked"
@@ -662,7 +664,9 @@ func (c *Client) CreateAccelerationDomain(request *CreateAccelerationDomainReque
// INVALIDPARAMETERVALUE_INVALIDDNSNAME = "InvalidParameterValue.InvalidDNSName"
// INVALIDPARAMETERVALUE_INVALIDDOMAINNAME = "InvalidParameterValue.InvalidDomainName"
// INVALIDPARAMETERVALUE_INVALIDPROXYORIGIN = "InvalidParameterValue.InvalidProxyOrigin"
+// INVALIDPARAMETERVALUE_INVALIDSITEFAILOVERUNSUPPORTED = "InvalidParameterValue.InvalidSiteFailoverUnsupported"
// INVALIDPARAMETERVALUE_ORIGINGROUPNOTEXISTS = "InvalidParameterValue.OriginGroupNotExists"
+// INVALIDPARAMETERVALUE_SITEFAILOVERNOTSUPPORTHOSTORIGINTYPEVOD = "InvalidParameterValue.SiteFailoverNotSupportHostOriginTypeVod"
// OPERATIONDENIED = "OperationDenied"
// OPERATIONDENIED_ACCELERATEMAINLANDDISABLE = "OperationDenied.AccelerateMainlandDisable"
// OPERATIONDENIED_CONFIGLOCKED = "OperationDenied.ConfigLocked"
@@ -1503,6 +1507,78 @@ func (c *Client) CreateFunctionWithContext(ctx context.Context, request *CreateF
return
}
+func NewCreateFunctionReplicaRequest() (request *CreateFunctionReplicaRequest) {
+ request = &CreateFunctionReplicaRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateFunctionReplica")
+
+
+ return
+}
+
+func NewCreateFunctionReplicaResponse() (response *CreateFunctionReplicaResponse) {
+ response = &CreateFunctionReplicaResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// CreateFunctionReplica
+// 本接口用于创建指定边缘函数的副本。创建副本后,当客户端请求匹配已配置的触发规则或默认域名时,您可以通过在请求头中添加 EO-Function-Replica-Name:[副本名称] 来访问特定的函数副本。每个函数默认支持创建两个副本。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// FAILEDOPERATION_FUNCTIONDEPLOYING = "FailedOperation.FunctionDeploying"
+// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
+// INVALIDPARAMETER_BADCONTENT = "InvalidParameter.BadContent"
+// INVALIDPARAMETER_BADFUNCTIONNAME = "InvalidParameter.BadFunctionName"
+// INVALIDPARAMETER_CONTENTEXCEEDSLIMIT = "InvalidParameter.ContentExceedsLimit"
+// INVALIDPARAMETER_FUNCTIONNAMECONFLICT = "InvalidParameter.FunctionNameConflict"
+// INVALIDPARAMETER_LENGTHEXCEEDSLIMIT = "InvalidParameter.LengthExceedsLimit"
+// LIMITEXCEEDED_FUNCTIONLIMITEXCEEDED = "LimitExceeded.FunctionLimitExceeded"
+// OPERATIONDENIED_VERSIONCONTROLLOCKED = "OperationDenied.VersionControlLocked"
+// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) CreateFunctionReplica(request *CreateFunctionReplicaRequest) (response *CreateFunctionReplicaResponse, err error) {
+ return c.CreateFunctionReplicaWithContext(context.Background(), request)
+}
+
+// CreateFunctionReplica
+// 本接口用于创建指定边缘函数的副本。创建副本后,当客户端请求匹配已配置的触发规则或默认域名时,您可以通过在请求头中添加 EO-Function-Replica-Name:[副本名称] 来访问特定的函数副本。每个函数默认支持创建两个副本。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// FAILEDOPERATION_FUNCTIONDEPLOYING = "FailedOperation.FunctionDeploying"
+// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
+// INVALIDPARAMETER_BADCONTENT = "InvalidParameter.BadContent"
+// INVALIDPARAMETER_BADFUNCTIONNAME = "InvalidParameter.BadFunctionName"
+// INVALIDPARAMETER_CONTENTEXCEEDSLIMIT = "InvalidParameter.ContentExceedsLimit"
+// INVALIDPARAMETER_FUNCTIONNAMECONFLICT = "InvalidParameter.FunctionNameConflict"
+// INVALIDPARAMETER_LENGTHEXCEEDSLIMIT = "InvalidParameter.LengthExceedsLimit"
+// LIMITEXCEEDED_FUNCTIONLIMITEXCEEDED = "LimitExceeded.FunctionLimitExceeded"
+// OPERATIONDENIED_VERSIONCONTROLLOCKED = "OperationDenied.VersionControlLocked"
+// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) CreateFunctionReplicaWithContext(ctx context.Context, request *CreateFunctionReplicaRequest) (response *CreateFunctionReplicaResponse, err error) {
+ if request == nil {
+ request = NewCreateFunctionReplicaRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "CreateFunctionReplica")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateFunctionReplica require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateFunctionReplicaResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewCreateFunctionRuleRequest() (request *CreateFunctionRuleRequest) {
request = &CreateFunctionRuleRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -2667,7 +2743,7 @@ func NewCreateRealtimeLogDeliveryTaskResponse() (response *CreateRealtimeLogDeli
//
// - 当数据投递类型(LogType)为速率限制和 CC 攻击防护日志、托管规则日志、自定义规则日志、Bot 管理日志时,同一个实体在同种数据投递类型(LogType)和数据投递区域(Area)的组合下,只能被添加到一个实时日志投递任务中。
//
-// - 当实时日志投递任务类型(TaskType)为 EdgeOne 日志分析(log_analysis)时,只支持数据投递类型(LogType)为站点加速日志(domain);在同一站点(ZoneId)和数据投递区域(Area)的组合下,只能添加一个推送至 EdgeOne 日志分析的实时日志投递任务;。
+// - 当实时日志投递任务类型(TaskType)为 EdgeOne 日志分析(log_analysis)时,只支持数据投递类型(LogType)为站点加速日志(domain)或托管规则日志(web-attack);在同一站点(ZoneId)、同一数据投递区域(Area)和数据的组合下,每种数据投递类型(LogType)只能添加一个推送至 EdgeOne 日志分析的实时日志投递任务。
//
//
//
@@ -2711,7 +2787,7 @@ func (c *Client) CreateRealtimeLogDeliveryTask(request *CreateRealtimeLogDeliver
//
// - 当数据投递类型(LogType)为速率限制和 CC 攻击防护日志、托管规则日志、自定义规则日志、Bot 管理日志时,同一个实体在同种数据投递类型(LogType)和数据投递区域(Area)的组合下,只能被添加到一个实时日志投递任务中。
//
-// - 当实时日志投递任务类型(TaskType)为 EdgeOne 日志分析(log_analysis)时,只支持数据投递类型(LogType)为站点加速日志(domain);在同一站点(ZoneId)和数据投递区域(Area)的组合下,只能添加一个推送至 EdgeOne 日志分析的实时日志投递任务;。
+// - 当实时日志投递任务类型(TaskType)为 EdgeOne 日志分析(log_analysis)时,只支持数据投递类型(LogType)为站点加速日志(domain)或托管规则日志(web-attack);在同一站点(ZoneId)、同一数据投递区域(Area)和数据的组合下,每种数据投递类型(LogType)只能添加一个推送至 EdgeOne 日志分析的实时日志投递任务。
//
//
//
@@ -4553,6 +4629,66 @@ func (c *Client) DeleteFunctionWithContext(ctx context.Context, request *DeleteF
return
}
+func NewDeleteFunctionReplicaRequest() (request *DeleteFunctionReplicaRequest) {
+ request = &DeleteFunctionReplicaRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DeleteFunctionReplica")
+
+
+ return
+}
+
+func NewDeleteFunctionReplicaResponse() (response *DeleteFunctionReplicaResponse) {
+ response = &DeleteFunctionReplicaResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DeleteFunctionReplica
+// 本接口用于删除指定的边缘函数副本。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// FAILEDOPERATION_RULEOPERATIONCONFLICT = "FailedOperation.RuleOperationConflict"
+// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
+// OPERATIONDENIED_VERSIONCONTROLLOCKED = "OperationDenied.VersionControlLocked"
+// RESOURCEUNAVAILABLE_FUNCTIONNOTFOUND = "ResourceUnavailable.FunctionNotFound"
+// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
+func (c *Client) DeleteFunctionReplica(request *DeleteFunctionReplicaRequest) (response *DeleteFunctionReplicaResponse, err error) {
+ return c.DeleteFunctionReplicaWithContext(context.Background(), request)
+}
+
+// DeleteFunctionReplica
+// 本接口用于删除指定的边缘函数副本。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// FAILEDOPERATION_RULEOPERATIONCONFLICT = "FailedOperation.RuleOperationConflict"
+// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
+// OPERATIONDENIED_VERSIONCONTROLLOCKED = "OperationDenied.VersionControlLocked"
+// RESOURCEUNAVAILABLE_FUNCTIONNOTFOUND = "ResourceUnavailable.FunctionNotFound"
+// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
+func (c *Client) DeleteFunctionReplicaWithContext(ctx context.Context, request *DeleteFunctionReplicaRequest) (response *DeleteFunctionReplicaResponse, err error) {
+ if request == nil {
+ request = NewDeleteFunctionReplicaRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DeleteFunctionReplica")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DeleteFunctionReplica require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDeleteFunctionReplicaResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDeleteFunctionRulesRequest() (request *DeleteFunctionRulesRequest) {
request = &DeleteFunctionRulesRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -6993,6 +7129,60 @@ func (c *Client) DescribeFunctionComponentBindingsWithContext(ctx context.Contex
return
}
+func NewDescribeFunctionReplicasRequest() (request *DescribeFunctionReplicasRequest) {
+ request = &DescribeFunctionReplicasRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeFunctionReplicas")
+
+
+ return
+}
+
+func NewDescribeFunctionReplicasResponse() (response *DescribeFunctionReplicasResponse) {
+ response = &DescribeFunctionReplicasResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeFunctionReplicas
+// 本接口用于查询边缘函数的副本列表。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// INVALIDPARAMETER_INVALIDFILTERNAME = "InvalidParameter.InvalidFilterName"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+func (c *Client) DescribeFunctionReplicas(request *DescribeFunctionReplicasRequest) (response *DescribeFunctionReplicasResponse, err error) {
+ return c.DescribeFunctionReplicasWithContext(context.Background(), request)
+}
+
+// DescribeFunctionReplicas
+// 本接口用于查询边缘函数的副本列表。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// INVALIDPARAMETER_INVALIDFILTERNAME = "InvalidParameter.InvalidFilterName"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+func (c *Client) DescribeFunctionReplicasWithContext(ctx context.Context, request *DescribeFunctionReplicasRequest) (response *DescribeFunctionReplicasResponse, err error) {
+ if request == nil {
+ request = NewDescribeFunctionReplicasRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeFunctionReplicas")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeFunctionReplicas require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeFunctionReplicasResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDescribeFunctionRulesRequest() (request *DescribeFunctionRulesRequest) {
request = &DescribeFunctionRulesRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -9499,125 +9689,9 @@ func NewDescribeTimingL7OriginPullDataResponse() (response *DescribeTimingL7Orig
}
// DescribeTimingL7OriginPullData
-// 本接口用以查询七层域名业务的回源时序数据,可以通过指定查询维度 DimensionName 进行分组查询,返回多组时序数据。
-//
-//
-//
-//
单次请求最多返回 50,000 个数据项 TimingDataItem 。数据项总数的计算规则如下:
-// -// 指标个数 * 时间点个数 * 维度值个数 = 数据项总数 -// -//-// -//
MetricNames 的列表长度。
-//
-// (EndTime - StartTime) / Interval。
-//
-// DimensionName 时,默认按账号维度汇总数据,维度值个数为 1。DimensionName = domain 时,维度值个数为 Filters 中 domain 过滤条件指定的域名列表长度。DimensionName = origin-status-code-category 时,维度值个数默认为 6。DimensionName = origin-status-code 时,维度值个数默认为 600。DimensionName 可以与 Filters 组合使用,通过在 Filters 中指定 DimensionName 对应的过滤条件以限制维度值个数。
以查询某一小时的具体状态码维度的时序数据为例,假设查询条件如下:
-// -//MetricNames = ["l7Flow_request_hy"](指标个数 = 1)StartTime = 2025-10-01T06:00:00+08:00,EndTime = 2025-10-01T06:59:59+08:00,Interval = "min"(时间点个数 = 60)DimensionName = origin-status-code,Filters = [{"originStatusCode": ["0", "4xx", "5xx"]}](维度值个数 = 201)则数据项总数为:
-// -//1 × 60 × 201 = 12060-// -//
未超过限制。
-// -// -// -//注意:若查询的数据项总数超过 50,000,系统会返回错误 LimitExceeded.TimingDataItemLimitExceeded。
-// -//此时,请通过调整入参减少单次查询的数据项至 50,000 以内,可采取的做法有:
-// -//StartTime 到 EndTime 之间的时间跨度)。Interval)。Filters,指定更少的 domain 或 originStatusCode 列表。MetricNames,指定更少的查询指标。DimensionName 进行分组查询,返回多组时序数据,详细指引与使用限制请参考 [如何使用 API 实现单次调用中的分组查询](https://cloud.tencent.com/document/product/1552/127501)。
//
// 可能返回的错误码:
// INVALIDPARAMETER_ACTIONINPROGRESS = "InvalidParameter.ActionInProgress"
@@ -9630,125 +9704,9 @@ func (c *Client) DescribeTimingL7OriginPullData(request *DescribeTimingL7OriginP
}
// DescribeTimingL7OriginPullData
-// 本接口用以查询七层域名业务的回源时序数据,可以通过指定查询维度 DimensionName 进行分组查询,返回多组时序数据。
-//
-//
-//
-// 单次请求最多返回 50,000 个数据项 TimingDataItem 。数据项总数的计算规则如下:
-// -// 指标个数 * 时间点个数 * 维度值个数 = 数据项总数 -// -//-// -//
MetricNames 的列表长度。
-//
-// (EndTime - StartTime) / Interval。
-//
-// DimensionName 时,默认按账号维度汇总数据,维度值个数为 1。DimensionName = domain 时,维度值个数为 Filters 中 domain 过滤条件指定的域名列表长度。DimensionName = origin-status-code-category 时,维度值个数默认为 6。DimensionName = origin-status-code 时,维度值个数默认为 600。DimensionName 可以与 Filters 组合使用,通过在 Filters 中指定 DimensionName 对应的过滤条件以限制维度值个数。
以查询某一小时的具体状态码维度的时序数据为例,假设查询条件如下:
-// -//MetricNames = ["l7Flow_request_hy"](指标个数 = 1)StartTime = 2025-10-01T06:00:00+08:00,EndTime = 2025-10-01T06:59:59+08:00,Interval = "min"(时间点个数 = 60)DimensionName = origin-status-code,Filters = [{"originStatusCode": ["0", "4xx", "5xx"]}](维度值个数 = 201)则数据项总数为:
-// -//1 × 60 × 201 = 12060-// -//
未超过限制。
-// -// -// -//注意:若查询的数据项总数超过 50,000,系统会返回错误 LimitExceeded.TimingDataItemLimitExceeded。
-// -//此时,请通过调整入参减少单次查询的数据项至 50,000 以内,可采取的做法有:
-// -//StartTime 到 EndTime 之间的时间跨度)。Interval)。Filters,指定更少的 domain 或 originStatusCode 列表。MetricNames,指定更少的查询指标。DimensionName 进行分组查询,返回多组时序数据,详细指引与使用限制请参考 [如何使用 API 实现单次调用中的分组查询](https://cloud.tencent.com/document/product/1552/127501)。
//
// 可能返回的错误码:
// INVALIDPARAMETER_ACTIONINPROGRESS = "InvalidParameter.ActionInProgress"
@@ -11086,6 +11044,7 @@ func NewModifyAccelerationDomainResponse() (response *ModifyAccelerationDomainRe
// INVALIDPARAMETERVALUE_CONFLICTRECORD = "InvalidParameterValue.ConflictRecord"
// INVALIDPARAMETERVALUE_DOMAINNOTMATCHZONE = "InvalidParameterValue.DomainNotMatchZone"
// INVALIDPARAMETERVALUE_INVALIDDOMAINSTATUS = "InvalidParameterValue.InvalidDomainStatus"
+// INVALIDPARAMETERVALUE_SITEFAILOVERNOTSUPPORTHOSTORIGINTYPEVOD = "InvalidParameterValue.SiteFailoverNotSupportHostOriginTypeVod"
// OPERATIONDENIED_DOMAINNOICP = "OperationDenied.DomainNoICP"
// OPERATIONDENIED_RESOURCELOCKEDTEMPORARY = "OperationDenied.ResourceLockedTemporary"
// OPERATIONDENIED_VERSIONCONTROLISGRAYING = "OperationDenied.VersionControlIsGraying"
@@ -11122,6 +11081,7 @@ func (c *Client) ModifyAccelerationDomain(request *ModifyAccelerationDomainReque
// INVALIDPARAMETERVALUE_CONFLICTRECORD = "InvalidParameterValue.ConflictRecord"
// INVALIDPARAMETERVALUE_DOMAINNOTMATCHZONE = "InvalidParameterValue.DomainNotMatchZone"
// INVALIDPARAMETERVALUE_INVALIDDOMAINSTATUS = "InvalidParameterValue.InvalidDomainStatus"
+// INVALIDPARAMETERVALUE_SITEFAILOVERNOTSUPPORTHOSTORIGINTYPEVOD = "InvalidParameterValue.SiteFailoverNotSupportHostOriginTypeVod"
// OPERATIONDENIED_DOMAINNOICP = "OperationDenied.DomainNoICP"
// OPERATIONDENIED_RESOURCELOCKEDTEMPORARY = "OperationDenied.ResourceLockedTemporary"
// OPERATIONDENIED_VERSIONCONTROLISGRAYING = "OperationDenied.VersionControlIsGraying"
@@ -12057,6 +12017,70 @@ func (c *Client) ModifyFunctionComponentBindingsWithContext(ctx context.Context,
return
}
+func NewModifyFunctionReplicaRequest() (request *ModifyFunctionReplicaRequest) {
+ request = &ModifyFunctionReplicaRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "ModifyFunctionReplica")
+
+
+ return
+}
+
+func NewModifyFunctionReplicaResponse() (response *ModifyFunctionReplicaResponse) {
+ response = &ModifyFunctionReplicaResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyFunctionReplica
+// 本接口用于修改指定边缘函数副本的内容和描述。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// INVALIDPARAMETER_BINDINGNOTFOUND = "InvalidParameter.BindingNotFound"
+// INVALIDPARAMETER_DUPLICATEBINDINGNAME = "InvalidParameter.DuplicateBindingName"
+// INVALIDPARAMETER_FUNCTIONBINDVARIABLENAMECONFLICT = "InvalidParameter.FunctionBindVariableNameConflict"
+// INVALIDPARAMETER_INVALIDOPERATION = "InvalidParameter.InvalidOperation"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// RESOURCEUNAVAILABLE_FUNCTIONNOTFOUND = "ResourceUnavailable.FunctionNotFound"
+// RESOURCEUNAVAILABLE_NAMESPACENOTFOUND = "ResourceUnavailable.NamespaceNotFound"
+func (c *Client) ModifyFunctionReplica(request *ModifyFunctionReplicaRequest) (response *ModifyFunctionReplicaResponse, err error) {
+ return c.ModifyFunctionReplicaWithContext(context.Background(), request)
+}
+
+// ModifyFunctionReplica
+// 本接口用于修改指定边缘函数副本的内容和描述。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// INVALIDPARAMETER_BINDINGNOTFOUND = "InvalidParameter.BindingNotFound"
+// INVALIDPARAMETER_DUPLICATEBINDINGNAME = "InvalidParameter.DuplicateBindingName"
+// INVALIDPARAMETER_FUNCTIONBINDVARIABLENAMECONFLICT = "InvalidParameter.FunctionBindVariableNameConflict"
+// INVALIDPARAMETER_INVALIDOPERATION = "InvalidParameter.InvalidOperation"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// RESOURCEUNAVAILABLE_FUNCTIONNOTFOUND = "ResourceUnavailable.FunctionNotFound"
+// RESOURCEUNAVAILABLE_NAMESPACENOTFOUND = "ResourceUnavailable.NamespaceNotFound"
+func (c *Client) ModifyFunctionReplicaWithContext(ctx context.Context, request *ModifyFunctionReplicaRequest) (response *ModifyFunctionReplicaResponse, err error) {
+ if request == nil {
+ request = NewModifyFunctionReplicaRequest()
+ }
+ c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "ModifyFunctionReplica")
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyFunctionReplica require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyFunctionReplicaResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewModifyFunctionRuleRequest() (request *ModifyFunctionRuleRequest) {
request = &ModifyFunctionRuleRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -12252,6 +12276,7 @@ func NewModifyHostsCertificateResponse() (response *ModifyHostsCertificateRespon
// INVALIDPARAMETERVALUE_OCDIRECTORIGINDOMAINNOTSUPPORTUPSTREAMVERIFY = "InvalidParameterValue.OCDirectOriginDomainNotSupportUpstreamVerify"
// INVALIDPARAMETERVALUE_SERVERCERTINFONEEDCONTAINRSAORECC = "InvalidParameterValue.ServerCertInfoNeedContainRSAorECC"
// INVALIDPARAMETERVALUE_SERVERCERTINFONEEDCONTAINSM2 = "InvalidParameterValue.ServerCertInfoNeedContainSM2"
+// INVALIDPARAMETERVALUE_SITEFAILOVERNOTSUPPORTHOSTUPSTREAMVERIFY = "InvalidParameterValue.SiteFailoverNotSupportHostUpstreamVerify"
// INVALIDPARAMETERVALUE_UPSTREAMCLIENTCERTINFOQUOTALIMIT = "InvalidParameterValue.UpstreamClientCertInfoQuotaLimit"
// INVALIDPARAMETERVALUE_UPSTREAMVERIFYCUSTOMCACERTINFOQUOTALIMIT = "InvalidParameterValue.UpstreamVerifyCustomCACertInfoQuotaLimit"
// LIMITEXCEEDED_RATELIMITEXCEEDED = "LimitExceeded.RateLimitExceeded"
@@ -12260,6 +12285,7 @@ func NewModifyHostsCertificateResponse() (response *ModifyHostsCertificateRespon
// OPERATIONDENIED_CONFIGLOCKED = "OperationDenied.ConfigLocked"
// OPERATIONDENIED_DISABLEZONENOTCOMPLETED = "OperationDenied.DisableZoneNotCompleted"
// OPERATIONDENIED_ERRZONEISALREADYPAUSED = "OperationDenied.ErrZoneIsAlreadyPaused"
+// OPERATIONDENIED_HOSTSCERTIFICATEINCONSISTENCY = "OperationDenied.HostsCertificateInconsistency"
// OPERATIONDENIED_HOSTSCLIENTCERTIFICATEINCONSISTENCY = "OperationDenied.HostsClientCertificateInconsistency"
// OPERATIONDENIED_HOSTSKEYLESSSERVERINCONSISTENCY = "OperationDenied.HostsKeylessServerInconsistency"
// OPERATIONDENIED_HOSTSUPSTREAMCERTIFICATEINCONSISTENCY = "OperationDenied.HostsUpstreamCertificateInconsistency"
@@ -12334,6 +12360,7 @@ func (c *Client) ModifyHostsCertificate(request *ModifyHostsCertificateRequest)
// INVALIDPARAMETERVALUE_OCDIRECTORIGINDOMAINNOTSUPPORTUPSTREAMVERIFY = "InvalidParameterValue.OCDirectOriginDomainNotSupportUpstreamVerify"
// INVALIDPARAMETERVALUE_SERVERCERTINFONEEDCONTAINRSAORECC = "InvalidParameterValue.ServerCertInfoNeedContainRSAorECC"
// INVALIDPARAMETERVALUE_SERVERCERTINFONEEDCONTAINSM2 = "InvalidParameterValue.ServerCertInfoNeedContainSM2"
+// INVALIDPARAMETERVALUE_SITEFAILOVERNOTSUPPORTHOSTUPSTREAMVERIFY = "InvalidParameterValue.SiteFailoverNotSupportHostUpstreamVerify"
// INVALIDPARAMETERVALUE_UPSTREAMCLIENTCERTINFOQUOTALIMIT = "InvalidParameterValue.UpstreamClientCertInfoQuotaLimit"
// INVALIDPARAMETERVALUE_UPSTREAMVERIFYCUSTOMCACERTINFOQUOTALIMIT = "InvalidParameterValue.UpstreamVerifyCustomCACertInfoQuotaLimit"
// LIMITEXCEEDED_RATELIMITEXCEEDED = "LimitExceeded.RateLimitExceeded"
@@ -12342,6 +12369,7 @@ func (c *Client) ModifyHostsCertificate(request *ModifyHostsCertificateRequest)
// OPERATIONDENIED_CONFIGLOCKED = "OperationDenied.ConfigLocked"
// OPERATIONDENIED_DISABLEZONENOTCOMPLETED = "OperationDenied.DisableZoneNotCompleted"
// OPERATIONDENIED_ERRZONEISALREADYPAUSED = "OperationDenied.ErrZoneIsAlreadyPaused"
+// OPERATIONDENIED_HOSTSCERTIFICATEINCONSISTENCY = "OperationDenied.HostsCertificateInconsistency"
// OPERATIONDENIED_HOSTSCLIENTCERTIFICATEINCONSISTENCY = "OperationDenied.HostsClientCertificateInconsistency"
// OPERATIONDENIED_HOSTSKEYLESSSERVERINCONSISTENCY = "OperationDenied.HostsKeylessServerInconsistency"
// OPERATIONDENIED_HOSTSUPSTREAMCERTIFICATEINCONSISTENCY = "OperationDenied.HostsUpstreamCertificateInconsistency"
@@ -15011,6 +15039,7 @@ func NewModifyZoneResponse() (response *ModifyZoneResponse) {
// OPERATIONDENIED_NODOMAINACCESSZONEONLYSUPPORTMODIFYTYPE = "OperationDenied.NoDomainAccessZoneOnlySupportModifyType"
// OPERATIONDENIED_PLANNOTSUPPORTMODIFYZONEAREA = "OperationDenied.PlanNotSupportModifyZoneArea"
// OPERATIONDENIED_RESOURCELOCKEDTEMPORARY = "OperationDenied.ResourceLockedTemporary"
+// OPERATIONDENIED_ZONEHASHOSTSMODIFYCONFLICT = "OperationDenied.ZoneHasHostsModifyConflict"
// RESOURCEINUSE_CNAME = "ResourceInUse.Cname"
// RESOURCEINUSE_DNS = "ResourceInUse.Dns"
// RESOURCEINUSE_GENERICHOST = "ResourceInUse.GenericHost"
@@ -15056,6 +15085,7 @@ func (c *Client) ModifyZone(request *ModifyZoneRequest) (response *ModifyZoneRes
// OPERATIONDENIED_NODOMAINACCESSZONEONLYSUPPORTMODIFYTYPE = "OperationDenied.NoDomainAccessZoneOnlySupportModifyType"
// OPERATIONDENIED_PLANNOTSUPPORTMODIFYZONEAREA = "OperationDenied.PlanNotSupportModifyZoneArea"
// OPERATIONDENIED_RESOURCELOCKEDTEMPORARY = "OperationDenied.ResourceLockedTemporary"
+// OPERATIONDENIED_ZONEHASHOSTSMODIFYCONFLICT = "OperationDenied.ZoneHasHostsModifyConflict"
// RESOURCEINUSE_CNAME = "ResourceInUse.Cname"
// RESOURCEINUSE_DNS = "ResourceInUse.Dns"
// RESOURCEINUSE_GENERICHOST = "ResourceInUse.GenericHost"
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 560e0b754b..1501ff61cc 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
@@ -605,7 +605,7 @@ const (
// 无效的回源Host。
INVALIDPARAMETER_INVALIDSERVERNAME = "InvalidParameter.InvalidServerName"
- // 设置的匹配条件不支持EdgeOne Shield操作,请删除相关配置项或联系智能客服提交工单处理。
+ // 设置的匹配条件不支持 EdgeOne Shield 操作,请删除相关配置项。
INVALIDPARAMETER_INVALIDSHIELDUNSUPPORTED = "InvalidParameter.InvalidShieldUnsupported"
// 排序字段不合法。
@@ -977,7 +977,7 @@ const (
// DNS 代理域名源站错误。
INVALIDPARAMETERVALUE_INVALIDPROXYORIGIN = "InvalidParameterValue.InvalidProxyOrigin"
- // 存在源站故障转移配置项配置在不支持的匹配条件下,请删除相关配置项或联系智能客服提交工单处理。
+ // 存在源站故障转移配置项配置在不支持的匹配条件下,请删除相关配置。
INVALIDPARAMETERVALUE_INVALIDSITEFAILOVERUNSUPPORTED = "InvalidParameterValue.InvalidSiteFailoverUnsupported"
// 标签值存在不合法字符。
@@ -1187,6 +1187,9 @@ const (
// 站点处于停用状态,请开启后重试。
OPERATIONDENIED_ERRZONEISALREADYPAUSED = "OperationDenied.ErrZoneIsAlreadyPaused"
+ // 待变更域名边缘HTTPS证书不一致,请确认变更域名证书一致后重试。
+ OPERATIONDENIED_HOSTSCERTIFICATEINCONSISTENCY = "OperationDenied.HostsCertificateInconsistency"
+
// 待变更域名边缘双向认证证书不一致,请确认变更域名证书一致后重试。
OPERATIONDENIED_HOSTSCLIENTCERTIFICATEINCONSISTENCY = "OperationDenied.HostsClientCertificateInconsistency"
@@ -1382,6 +1385,9 @@ const (
// 站点工作模式不属于版本管理模式。
OPERATIONDENIED_WORKMODENOTINVERSIONCONTROL = "OperationDenied.WorkModeNotInVersionControl"
+ // 修改加速区域时,如果站点下存在域名,则不允许同时修改其他信息。
+ OPERATIONDENIED_ZONEHASHOSTSMODIFYCONFLICT = "OperationDenied.ZoneHasHostsModifyConflict"
+
// 共享CNAME已被其他站点绑定,请先解绑才能删除站点
OPERATIONDENIED_ZONEISBINDINGSHAREDCNAME = "OperationDenied.ZoneIsBindingSharedCNAME"
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 af3b62ac69..cd8357a22c 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
@@ -573,7 +573,7 @@ type ApplicationProxy struct {
//