# TSIGs ## List TSIGs `client.dns.zoneTransfers.tsigs.list(TSIGListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/secondary_dns/tsigs` List TSIGs. ### Parameters - `params: TSIGListParams` - `account_id: string` ### Returns - `TSIG` - `id: string` - `algo: string` TSIG algorithm. - `name: string` TSIG key name. - `secret: string` TSIG secret. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const tsig of client.dns.zoneTransfers.tsigs.list({ account_id: '01a7362d577a6c3019a474fd6f485823', })) { console.log(tsig.id); } ``` #### Response ```json { "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" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## TSIG Details `client.dns.zoneTransfers.tsigs.get(stringtsigId, TSIGGetParamsparams, RequestOptionsoptions?): TSIG` **get** `/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}` Get TSIG. ### Parameters - `tsigId: string` - `params: TSIGGetParams` - `account_id: string` ### Returns - `TSIG` - `id: string` - `algo: string` TSIG algorithm. - `name: string` TSIG key name. - `secret: string` TSIG secret. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const tsig = await client.dns.zoneTransfers.tsigs.get('69cd1e104af3e6ed3cb344f263fd0d5a', { account_id: '01a7362d577a6c3019a474fd6f485823', }); console.log(tsig.id); ``` #### Response ```json { "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" } } ``` ## Create TSIG `client.dns.zoneTransfers.tsigs.create(TSIGCreateParamsparams, RequestOptionsoptions?): TSIG` **post** `/accounts/{account_id}/secondary_dns/tsigs` Create TSIG. ### Parameters - `params: TSIGCreateParams` - `account_id: string` Path param - `algo: string` Body param: TSIG algorithm. - `name: string` Body param: TSIG key name. - `secret: string` Body param: TSIG secret. ### Returns - `TSIG` - `id: string` - `algo: string` TSIG algorithm. - `name: string` TSIG key name. - `secret: string` TSIG secret. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const tsig = await client.dns.zoneTransfers.tsigs.create({ account_id: '01a7362d577a6c3019a474fd6f485823', algo: 'hmac-sha512.', name: 'tsig.customer.cf.', secret: 'caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c', }); console.log(tsig.id); ``` #### Response ```json { "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" } } ``` ## Update TSIG `client.dns.zoneTransfers.tsigs.update(stringtsigId, TSIGUpdateParamsparams, RequestOptionsoptions?): TSIG` **put** `/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}` Modify TSIG. ### Parameters - `tsigId: string` - `params: TSIGUpdateParams` - `account_id: string` Path param - `algo: string` Body param: TSIG algorithm. - `name: string` Body param: TSIG key name. - `secret: string` Body param: TSIG secret. ### Returns - `TSIG` - `id: string` - `algo: string` TSIG algorithm. - `name: string` TSIG key name. - `secret: string` TSIG secret. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const tsig = await client.dns.zoneTransfers.tsigs.update('69cd1e104af3e6ed3cb344f263fd0d5a', { account_id: '01a7362d577a6c3019a474fd6f485823', algo: 'hmac-sha512.', name: 'tsig.customer.cf.', secret: 'caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c', }); console.log(tsig.id); ``` #### Response ```json { "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" } } ``` ## Delete TSIG `client.dns.zoneTransfers.tsigs.delete(stringtsigId, TSIGDeleteParamsparams, RequestOptionsoptions?): TSIGDeleteResponse` **delete** `/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}` Delete TSIG. ### Parameters - `tsigId: string` - `params: TSIGDeleteParams` - `account_id: string` ### Returns - `TSIGDeleteResponse` - `id?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const tsig = await client.dns.zoneTransfers.tsigs.delete('69cd1e104af3e6ed3cb344f263fd0d5a', { account_id: '01a7362d577a6c3019a474fd6f485823', }); console.log(tsig.id); ``` #### Response ```json { "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" } } ``` ## Domain Types ### TSIG - `TSIG` - `id: string` - `algo: string` TSIG algorithm. - `name: string` TSIG key name. - `secret: string` TSIG secret. ### TSIG Delete Response - `TSIGDeleteResponse` - `id?: string`