|
|
|
@ -485,19 +485,28 @@ pub struct ZoneRemoveRequest {
|
|
|
|
|
zone_id: i32,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, Eq, Hash, PartialEq)]
|
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, Eq, Hash, PartialEq, clap::ValueEnum)]
|
|
|
|
|
#[serde(rename_all="lowercase")]
|
|
|
|
|
/// A record policy type related to how to restrict usage of the record. For example: Latlong (for location-based) and Region (for country based).
|
|
|
|
|
pub enum RecordPolicyType {
|
|
|
|
|
/// No restriction.
|
|
|
|
|
r#None,
|
|
|
|
|
/// Latitude & Longitude restirction.
|
|
|
|
|
LatLong,
|
|
|
|
|
/// Political region restriction.
|
|
|
|
|
Region,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[lunanode_request(response="RecordAddResponse", endpoint="dns2/record-add/")]
|
|
|
|
|
/// Add a new DNS record to your zone.
|
|
|
|
|
pub struct RecordAddRequest {
|
|
|
|
|
/// Reference the zone (see: [`requests::ZoneListResponse`])
|
|
|
|
|
zone_id: i32,
|
|
|
|
|
/// The name field for the record. @ sign is used for a root zone.
|
|
|
|
|
name: String,
|
|
|
|
|
/// The data field for the record. This is usually an IP address, but TXT records may contain any text.
|
|
|
|
|
data: String,
|
|
|
|
|
/// Time-To-Live: the defines how often this record should be re-cached.
|
|
|
|
|
ttl: i32,
|
|
|
|
|
r#type: RecordType,
|
|
|
|
|
/// The priority for certain record types, like MX and SRV.
|
|
|
|
|