pub struct CreatePrimaryIpRequest {
pub assignee_id: Option<Option<i64>>,
pub assignee_type: AssigneeType,
pub auto_delete: Option<bool>,
pub labels: Option<HashMap<String, String>>,
pub location: Option<String>,
pub name: String,
pub type: IpType,
}Expand description
CreatePrimaryIpRequest : Request for POST https://api.hetzner.cloud/v1/primary_ips
Fields§
§assignee_id: Option<Option<i64>>ID of resource to assign the Primary IP to. Omitted if the Primary IP should not get assigned.
assignee_type: AssigneeTypeType of resource the Primary IP can get assigned to. Currently Primary IPs can only be assigned to Servers, therefore this field must be set to server.
auto_delete: Option<bool>Auto deletion state. If enabled the Primary IP will be deleted once the assigned resource gets deleted.
labels: Option<HashMap<String, String>>User-defined labels (key/value pairs) for the Resource. For more information, see "Labels". | User-defined labels (key/value pairs) for the Resource. Note that the set of Labels provided in the request will overwrite the existing one. For more information, see "Labels".
location: Option<String>Location ID or name the Primary IP will be bound to. Omit if assignee_id/assignee_type is provided.
name: StringName of the Resource. Must be unique per Project.
type: IpTypeImplementations§
Source§impl CreatePrimaryIpRequest
impl CreatePrimaryIpRequest
Sourcepub fn new(
assignee_type: AssigneeType,
name: String,
type: IpType,
) -> CreatePrimaryIpRequest
pub fn new( assignee_type: AssigneeType, name: String, type: IpType, ) -> CreatePrimaryIpRequest
Request for POST https://api.hetzner.cloud/v1/primary_ips
Trait Implementations§
Source§impl Clone for CreatePrimaryIpRequest
impl Clone for CreatePrimaryIpRequest
Source§fn clone(&self) -> CreatePrimaryIpRequest
fn clone(&self) -> CreatePrimaryIpRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreatePrimaryIpRequest
impl Debug for CreatePrimaryIpRequest
Source§impl Default for CreatePrimaryIpRequest
impl Default for CreatePrimaryIpRequest
Source§fn default() -> CreatePrimaryIpRequest
fn default() -> CreatePrimaryIpRequest
Source§impl<'de> Deserialize<'de> for CreatePrimaryIpRequest
impl<'de> Deserialize<'de> for CreatePrimaryIpRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CreatePrimaryIpRequest
impl PartialEq for CreatePrimaryIpRequest
Source§fn eq(&self, other: &CreatePrimaryIpRequest) -> bool
fn eq(&self, other: &CreatePrimaryIpRequest) -> bool
self and other values to be equal, and is used by ==.