Skip to content
Start here

Update TSIG

dns.zone_transfers.tsigs.update(strtsig_id, TSIGUpdateParams**kwargs) -> TSIG
PUT/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}

Modify TSIG.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Account Settings Write
ParametersExpand Collapse
account_id: str
tsig_id: str
algo: str

TSIG algorithm.

name: str

TSIG key name.

secret: str

TSIG secret.

ReturnsExpand Collapse
class TSIG:
id: str
algo: str

TSIG algorithm.

name: str

TSIG key name.

secret: str

TSIG secret.

Update TSIG

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
tsig = client.dns.zone_transfers.tsigs.update(
    tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a",
    account_id="01a7362d577a6c3019a474fd6f485823",
    algo="hmac-sha512.",
    name="tsig.customer.cf.",
    secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c",
)
print(tsig.id)
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "69cd1e104af3e6ed3cb344f263fd0d5a",
    "algo": "hmac-sha512.",
    "name": "tsig.customer.cf.",
    "secret": "caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "69cd1e104af3e6ed3cb344f263fd0d5a",
    "algo": "hmac-sha512.",
    "name": "tsig.customer.cf.",
    "secret": "caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c"
  }
}