dcloud dns records set

Create or replace the record set at a name and type

IAM dns:ChangeRecordsChanges stateAsks before it deletes (-y skips)

name is "@", a relative label such as "www", or a fully qualified name in the zone. ALIAS takes exactly one of appId, loadBalancerId, bucket or distributionId instead of values, and works at the apex. A, AAAA and CNAME may name an uptime check (healthCheckId) and failoverValues answered while it is down; their TTL is then served as at most 60 seconds.

Synopsis

dcloud dns records set id --name name --type type [flags]

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: uuid

Flags

  • --nameRequired

    string

    Where the set sits: "@" or empty for the apex, a relative label such as "www", or a fully qualified name inside the zone. Refused (400) outside the zone, for NS or CNAME at the apex, for a CNAME next to other records, and for another type at a name that has a CNAME

    Constraints: max 253 chars

  • --typeRequired

    enum

    Record type. ALIAS is the platform type that answers with the address of an app, load balancer, bucket website or CDN distribution. Writing a set replaces the one at the same name and type

    One of: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, ALIAS

  • --ttlOptional

    number

    Seconds resolvers may cache the set, 1 to 604800. Absent: 300 in the API (the console form starts at 3600). A set with a health check or routed variant checks is served with at most 60

    Constraints: integer, 1-604800

  • --valuesOptional

    array of string

    The record data in presentation format, one entry per value, at most 100 of at most 4096 characters each: A "203.0.113.7", MX "10 mail.example.com", SRV "10 5 5060 sip.example.com", CAA "0 issue letsencrypt.org", TXT the text. Duplicates are merged. A CNAME takes exactly one. Required (400 "At least one value is required") unless the type is ALIAS or routing supplies them, when a routed set takes the first variant's values

    Constraints: 1-4096 chars

  • --app-idOptional

    string

    ALIAS: the app whose address is answered

  • --load-balancer-idOptional

    string

    ALIAS: a load balancer, answered with its IPv4 (A) and IPv6 (AAAA)

  • --bucketOptional

    string

    ALIAS: a bucket name; the name answers with the bucket's static website

  • --distribution-idOptional

    string

    ALIAS: a CDN distribution, answered with its healthy edge nodes (TTL at most 30 s); list the name among the distribution's aliases too, for its certificate

  • --health-check-idOptional

    string

    A, AAAA, CNAME: an uptime check; null removes it

    May be null.

  • --failover-valuesOptional

    array of string

    Answered instead of values while the health check is down

  • --routingOptional

    object

    Weighted ({policy:"weighted", variants:[{id, weight 0-255, values, healthCheckId?}]}) or geolocation ({policy:"geo", variants:[{id, country|continent, values, healthCheckId?}]}) routing; null removes it. For geo, values are the default answer.

    Constraints: JSON

    May be null.

Example

dcloud dns records set id --name example --type A

Generated from the API description, the same one the API checks requests against and the CLI is built from.