tcb domains edit
Update the domain-level settings of a bound custom domain (certificate, access type, enablement) without touching routes. Only the fields you pass are changed.
v3.8.3+
tcb domains edit has been available since v3.8.3.
Usage
tcb domains edit <domain> [options]
Parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
<domain> | Yes | Domain to update | — |
--certid <certId> | No | New SSL certificate ID | — |
--access-type <type> | No | New access type: DIRECT / CDN / CUSTOM / EO | — |
--custom-cname <cname> | No | New custom CNAME, --access-type CUSTOM only | — |
--enable | No | Enable the domain, mutually exclusive with --disable | — |
--disable | No | Disable the domain, mutually exclusive with --enable | — |
--dry-run | No | Show the change without applying it | false |
-e, --env-id <envId> | No | Environment ID | envId in the configuration |
--platform-id <platformId> | No | Platform edition pool ID, mutually exclusive with -e (v3.8.3+) | — |
Examples
# Update the SSL certificate
tcb domains edit api.example.com --certid <certId> -e <envId>
# Switch to CDN access
tcb domains edit api.example.com --access-type CDN -e <envId>
# Custom access with a CNAME origin
tcb domains edit api.example.com --access-type CUSTOM --custom-cname origin.example.com -e <envId>
# Disable the domain
tcb domains edit api.example.com --disable -e <envId>
# Preview the change
tcb domains edit api.example.com --certid <certId> --dry-run -e <envId>
# Inside a platform edition pool (v3.8.3+)
tcb domains edit api.example.com --platform-id <platformId> --access-type EO --certid <certId> --enable
Notes
- Pass at least one field to change (
--certid/--access-type/--custom-cname/--enable/--disable) - The domain must already be bound; use
tcb domains addfor a new one - Only domain-level settings change; routes are edited with
tcb routes edit