Przejdź do treści
Biblioteka skilli
DevOps i chmura · Integracja z narzędziem

tencentcloud-dns

/tencentcloud-dns

Zarządza rekordami DNS w DNSPod (Tencent Cloud): dodawanie, zmiana i usuwanie rekordów A, AAAA, CNAME, MX, TXT, NS, SRV i CAA, wyszukiwanie oraz rekordy TXT dla ACME, SPF, DKIM i weryfikacji domeny.

Repozytorium
Skills ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/dns.py

Co robi i kiedy

Zarządza rekordami DNS w DNSPod (Tencent Cloud): dodawanie, zmiana i usuwanie rekordów A, AAAA, CNAME, MX, TXT, NS, SRV i CAA, wyszukiwanie oraz rekordy TXT dla ACME, SPF, DKIM i weryfikacji domeny.

Oryginalny opis (EN)

Manage DNS records on DNSPod (Tencent Cloud's DNS service). Use when the user asks to add / update / delete A / AAAA / CNAME / MX / TXT / NS / SRV / CAA records, list records for a domain, search records, add ACME challenge / SPF / DKIM / domain-verification TXT records. Backed by the official tencentcloud-sdk-python DNSPod client.

Jak działa

  1. CLI (preferred)
  2. When to Use
  3. Dependencies
  4. Quick start
  5. Workflows
  6. Record types
  7. CNAME apex restriction
  8. RecordLine ("线路")
  9. Verifying changes
  10. Important reminders
Sekcje z nagłówków SKILL.md, w oryginale · 191 linii, 1 035 słów
Podgląd SKILL.md
---
name: tencentcloud-dns
description: |
  Manage DNS records on DNSPod (Tencent Cloud's DNS service). Use when
  the user asks to add / update / delete A / AAAA / CNAME / MX / TXT /
  NS / SRV / CAA records, list records for a domain, search records,
  add ACME challenge / SPF / DKIM / domain-verification TXT records.
  Backed by the official tencentcloud-sdk-python DNSPod client.
license: Apache-2.0
metadata:
  author: acedatacloud
  version: "1.0"
connections: [tencentcloud]
---

# DNSPod (Tencent Cloud DNS)

Manage DNS records via the DNSPod API.

> **Setup:** See [tencentcloud authentication](../_shared/tencentcloud.md). DNSPod uses the **same** Tencent Cloud SecretId / SecretKey as the rest of the platform — there's no separate `DP_Id` / `DP_Key` for the v3 API. The SDK client below auto-reads `TENCENTCLOUD_SECRET_ID` / `TENCENTCLOUD_SECRET_KEY` from env.
>
> The legacy v2 DNSPod API used a different key format; this skill targets the v3 SDK exclusively.

## CLI (preferred)

The skill ships [`scripts/dns.py`](scripts/dns.py) — wraps every common DNSPod v3 operation.

```bash
# $SKILL_DIR can point at another skill loaded this turn — anchor on our own
# script (re-run this at the top of every fresh-shell Bash block).
DNS="$SKILL_DIR/scripts/dns.py"; [ -f "$DNS" ] || DNS=$(find /tmp -maxdepth 8 -path '*/skills/*/scripts/dns.py' 2>/dev/null | head -1)
[ -f "$DNS" ] || { echo "tencentcloud-dns script not found (SKILL_DIR=$SKILL_DIR)" >&2; exit 1; }

python3 $DNS domains                                       # list domains
python3 $DNS list example.com                              # records on one domain
python3 $DNS list example.com --type CNAME                 # filter by type
python3 $DNS search example.com --keyword api              # client-side keyword search
python3 $DNS create example.com --sub www --type A --value 1.2.3.4
python3 $DNS create example.com --sub @ --type MX --value 'mail.example.com.' --mx 10
python3 $DNS create example.com --sub _acme-challenge --type TXT --value '"<token>"'
python3 $DNS update example.com <record-id> --sub www --type A --value 5.6.7.8
python3 $DNS delete example.com <record-id> --yes          # destructive, requires --yes
```

The `delete` subcommand requires `--yes` — without it, it prints a dry-run line so you can confirm the right `record-id` first.

## When to Use

- Add a new subdomain (A / AAAA / CNAME)
- Update an existing record (change IP, change CNAME target)
- Add email-related records (MX, SPF / DKIM / DMARC TXT)
- Add domain-verification TXT records (Google / Search Console / SSL ACME challenges)
- List or search records on a domain
- Delete obsolete records

## Dependencies

```bash
pip install tencentcloud-sdk-python
```

## Quick start

```python
import os
from tencentcloud.common import credential
from tencentcloud.dnspod.v20210323 import dnspod_client, models

cred = credential.EnvironmentVariableCredential().get_credential()
# DNSPod is global — region is ignored, but the SDK still requires one.
client = dnspod_client.DnspodClient(cred, "")
```

## Workflows

### List domains in the account

```python
req = models.DescribeDomainListRequest()
req.Limit = 100
resp = client.DescribeDomainList(req)
for d in resp.DomainList:
    print(d.DomainId, d.Name, d.Status, d.RecordCount)
```

### List records for a domain

```python
req = models.DescribeRecordListRequest()
req.Domain = "example.com"
req.Limit = 100                  # max 3000
# Optional: req.RecordType = "A"
# Optional: req.Subdomain = "api"
resp = client.DescribeRecordList(req)
for r in resp.RecordList:
    print(r.RecordId, r.Name, r.Type, r.Value, "TTL=", r.TTL, "Line=", r.Line)
```

### Search by keyword (filter client-side)

```python
req = models.DescribeRecordListRequest()
req.Domain = "example.com"
req.Limit = 3000
resp = client.DescribeRecordList(req)
matches = [r for r in resp.RecordList if "api" in r.Name or "api" in r.Value]
for r in matches:
    print(r.RecordId, r.Name, r.Type, r.Value)
```

### Create records

```python
def create_record(domain, sub_domain, record_type, value, ttl=600, mx=None):
    req = models.CreateRecordRequest()
    req.Domain = domain
    req.SubDomain = sub_domain   # use "@" for the apex
    req.RecordType = record_type
    req.RecordLine = "默认"      # "Default" line — works in all environments
    req.Value = value
    req.TTL = ttl
    if mx is not None:
        req.MX = mx
    resp = client.CreateRecord(req)
    return resp.RecordId

# A record
rid = create_record("example.com", "www", "A", "1.2.3.4")
# CNAME (note: Value MUST end with a dot for absolute target)
rid = create_record("example.com", "api2", "CNAME", "api.example.com.")
# MX (priority via mx=)
rid = create_record("example.com", "@", "MX", "mail.example.com.", mx=10)
# TXT (SPF)
rid = create_record("example.com", "@", "TXT", '"v=spf1 include:_spf.google.com ~all"')
# ACME challenge for cert issuance
rid = create_record("example.com", "_acme-challenge", "TXT", '"<validation-token>"')
```

### Update an existing record

```python
req = models.ModifyRecordRequest()
req.Domain = "example.com"
req.RecordId = 123456789
req.SubDomain = "www"
req.RecordType = "A"
req.RecordLine = "默认"
req.Value = "5.6.7.8"
req.TTL = 600
client.ModifyRecord(req)
```

### Delete a record

```python
# Confirm with the user before running.
req = models.DeleteRecordRequest()
req.Domain = "example.com"
req.RecordId = 123456789
client.DeleteRecord(req)
```

## Record types

| Type | Use For | Example Value |
|---|---|---|
| `A` | IPv4 address | `1.2.3.4` |
| `AAAA` | IPv6 address | `2001:db8::1` |
| `CNAME` | Alias to another hostname | `target.example.com.` |
| `MX` | Mail server | `mail.example.com.` (set `MX=` priority) |
| `TXT` | SPF / DKIM / DMARC / domain verification / ACME | `"v=spf1 ..."` (quoted) |
| `NS` | Delegate subzone | `ns1.example.com.` |
| `SRV` | Service discovery | `0 5 443 api.example.com.` |
| `CAA` | Cert Authority Authorization | `0 issue "letsencrypt.org"` |

## CNAME apex restriction

DNSPod (like every other DNS service) **does not support `CNAME` on the apex `@`** (the bare domain) when other record types exist. Use `A` for the apex; `CNAME` for subdomains. If the upstream is itself a hostname (e.g. an EdgeOne / CDN endpoint), use the `Alias` record type via the EdgeOne console — DNSPod itself doesn't have an `ALIAS` type.

## RecordLine ("线路")

DNSPod can serve different values to different ISPs / regions via `RecordLine`. For 99% of cases pick `"默认"` (Default) — it serves to every resolver. Other common lines: `"电信"`, `"联通"`, `"移动"`, `"境外"`, `"国内"`. Use the console to set up split-horizon DNS; the API just lets you write the records.

## Verifying changes

```bash
dig @119.29.29.29 www.example.com +short    # 119.29.29.29 = DNSPod's recursor
dig www.example.com +trace                  # follow the delegation chain
```

DNSPod propagation is usually under a minute on its own resolver and bounded by the TTL elsewhere. Use `TTL=60` while iterating; raise to `600` once stable.

## Important reminders

- **CNAME values need a trailing dot** to be absolute (`api.example.com.`). Without it, DNSPod won't reject — but resolvers will hate you.
- **Confirm deletes** with the user — there's no undo. The `RecordId` is required, so search first to be sure.
- **Don't rotate `NS` records lightly** — losing nameserver delegation takes the entire domain offline until you fix it.
- **TXT values for SPF/DMARC need to stay under 255 chars per chunk.** For longer policies, split into multiple quoted strings within one TXT value.
- DNSPod has separate quota for free / paid plans on `RecordCount` and `RecordsPerMinute`. Check the console if `LimitExceeded` errors appear.

## Console links

- DNSPod console: <https://console.cloud.tencent.com/cns>
- API reference: <https://www.tencentcloud.com/document/product/1097/40694>
Pliki w paczce (2)
  • SKILL.md 8 KB
  • scripts/dns.py 8 KB

Wersje

W bazie nie ma innych skilli o nazwie tencentcloud-dns.

Migawka bazy z 13.11.2026 · wersja paczki f80ce9d3cd72 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100dns-record-analyzer
    Audytuje i diagnozuje rekordy DNS domeny, w tym A, AAAA, CNAME, MX, TXT, SPF, DKIM, DMARC, CAA i NS, a także problemy z propagacją.
  • 100namecheap
    Zarządza rekordami DNS domen zarejestrowanych w Namecheap przez API: lista domen, dodawanie, zmiana i usuwanie wpisów A, AAAA, CNAME, MX i TXT oraz konfiguracja API.
  • 100dns-architecture-resolution-records
    Diagnozuje rekurencyjne zapytania DNS, cache TTL, split-horizon oraz rekordy A, AAAA, CNAME, TXT i MX.
  • 100cloudflare-dns-records
    Wyświetla, dodaje, zmienia i usuwa rekordy DNS w Cloudflare po planie próbnym i wyraźnym potwierdzeniu, a także przełącza proxy.
  • 100email-auth-check
    Sprawdza uwierzytelnianie e-mail domeny na żywo przez DNS: SPF, DKIM, DMARC, MX i DNSSEC, a także podaje gotowe rekordy do naprawy.
  • 100tencentcloud-edgeone
    Zarządza Tencent Cloud EdgeOne (CDN i bezpieczeństwo na brzegu): strefy, czyszczenie cache, prefetch, domeny akceleracji, rekordy DNS i podgląd konfiguracji WAF.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.