pub struct Zone {Show 19 fields
pub created: String,
pub id: String,
pub is_secondary_dns: bool,
pub legacy_dns_host: String,
pub legacy_ns: Vec<String>,
pub modified: String,
pub name: String,
pub ns: Vec<String>,
pub owner: String,
pub paused: bool,
pub permission: String,
pub project: String,
pub records_count: i64,
pub registrar: String,
pub status: String,
pub ttl: u32,
pub txt_verification: TxtVerification,
pub verified: String,
pub zone_type: ZoneType,
}Expand description
Represents a DNS zone.
§Examples
use hetzner::Zone;
let zone = Zone::new(
"2023-01-01T00:00:00Z".to_string(),
vec!["ns1.example.com".to_string(), "ns2.example.com".to_string()],
"example.com".to_string(),
"zone_id_123".to_string(),
false,
"legacy_dns_host".to_string(),
vec!["legacy_ns1".to_string(), "legacy_ns2".to_string()],
"2023-01-02T00:00:00Z".to_string(),
"owner_id".to_string(),
false,
"read".to_string(),
"project_id".to_string(),
10,
"registrar_name".to_string(),
"active".to_string(),
3600,
hetzner::TxtVerification {
name: "txt_name".to_string(),
token: "txt_token".to_string(),
},
"unverified".to_string(),
hetzner::ZoneType {
description: "master".to_string(),
id: "zone_type_id".to_string(),
name: "zone_type_name".to_string(),
prices: None,
},
);§Returns
A new Zone instance.
Fields§
§created: StringThe creation timestamp of the DNS zone.
id: StringThe zone ID associated with the DNS zone.
is_secondary_dns: boolIndicates if the zone is a secondary DNS.
legacy_dns_host: StringThe legacy DNS host associated with the zone.
legacy_ns: Vec<String>The legacy name servers associated with the zone.
modified: StringThe last modified timestamp of the DNS zone.
name: StringThe name of the DNS zone.
ns: Vec<String>The name servers associated with the zone.
owner: StringThe owner of the DNS zone.
paused: boolIndicates if the zone is paused.
permission: StringThe permission level of the DNS zone.
project: StringThe project associated with the DNS zone.
records_count: i64The count of records in the DNS zone.
registrar: StringThe registrar of the DNS zone.
status: StringThe status of the DNS zone.
ttl: u32The time-to-live (TTL) value of the DNS zone.
txt_verification: TxtVerificationThe TXT verification details of the DNS zone.
verified: StringThe verification status of the DNS zone.
zone_type: ZoneTypeThe zone type details of the DNS zone.
Implementations§
Source§impl Zone
impl Zone
Sourcepub fn new(
created: String,
ns: Vec<String>,
name: String,
id: String,
is_secondary_dns: bool,
legacy_dns_host: String,
legacy_ns: Vec<String>,
modified: String,
owner: String,
paused: bool,
permission: String,
project: String,
records_count: i64,
registrar: String,
status: String,
ttl: u32,
txt_verification: TxtVerification,
verified: String,
zone_type: ZoneType,
) -> Self
pub fn new( created: String, ns: Vec<String>, name: String, id: String, is_secondary_dns: bool, legacy_dns_host: String, legacy_ns: Vec<String>, modified: String, owner: String, paused: bool, permission: String, project: String, records_count: i64, registrar: String, status: String, ttl: u32, txt_verification: TxtVerification, verified: String, zone_type: ZoneType, ) -> Self
new creates a new Zone instance.
§Arguments
name- The name of the zone.id- The ID of the zone.is_secondary_dns- Indicates if the zone is a secondary DNS.legacy_dns_host- The legacy DNS host associated with the zone.legacy_ns- The legacy name servers associated with the zone.modified- The last modified timestamp of the DNS zone.owner- The owner of the DNS zone.paused- Indicates if the zone is paused.permission- The permission level of the DNS zone.project- The project associated with the DNS zone.records_count- The count of records in the DNS zone.registrar- The registrar of the DNS zone.status- The status of the DNS zone.ttl- The TTL of the DNS zone.txt_verification- The TXT verification details of the DNS zone.verified- The verification status of the DNS zone.zone_type- The type details of the DNS zone.
§Returns
A new Zone instance.