[−][src]Struct digitalocean::request::Request
A consuming builder which can be used to build up API calls.
In general consumers of the crate should not need to use this type directly.
Instead, build up requests from what is found in api::*
.
Implementations
impl Request<M, V>
[src]
pub fn certificate_chain<S: AsRef<str> + Serialize + Display>(
self,
val: S
) -> Self
[src]
self,
val: S
) -> Self
The full PEM-formatted trust chain between the certificate authority's certificate and your domain's SSL certificate.
impl Request<M, V>
[src]
pub fn records(self) -> DomainRecordRequest<List, Vec<DomainRecord>>
[src]
impl Request<M, V>
[src]
pub fn create<S: AsRef<str> + Display + Serialize>(
self,
kind: S,
name: S,
data: S
) -> DomainRecordRequest<Create, DomainRecord>
[src]
self,
kind: S,
name: S,
data: S
) -> DomainRecordRequest<Create, DomainRecord>
pub fn get(self, id: usize) -> DomainRecordRequest<Get, DomainRecord>
[src]
pub fn update(self, id: usize) -> DomainRecordRequest<Update, DomainRecord>
[src]
pub fn delete(self, id: usize) -> DomainRecordRequest<Delete, ()>
[src]
impl Request<M, V>
[src]
pub fn priority(self, val: Option<usize>) -> Self
[src]
The priority for SRV and MX records.
pub fn port(self, val: Option<usize>) -> Self
[src]
The port for SRV records.
pub fn ttl(self, val: usize) -> Self
[src]
This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested.
pub fn weight(self, val: Option<usize>) -> Self
[src]
The weight for SRV records.
impl Request<M, V>
[src]
pub fn kind<S: AsRef<str> + Display + Serialize>(self, val: S) -> Self
[src]
The record type (A, MX, CNAME, etc).
pub fn name<S: AsRef<str> + Display + Serialize>(self, val: S) -> Self
[src]
The host name, alias, or service being defined by the record.
pub fn data<S: AsRef<str> + Display + Serialize>(self, val: S) -> Self
[src]
Variable data depending on record type. See the Domain Records section for more detail on each record type.
pub fn priority(self, val: Option<usize>) -> Self
[src]
The priority for SRV and MX records.
pub fn port(self, val: Option<usize>) -> Self
[src]
The port for SRV records.
pub fn ttl(self, val: usize) -> Self
[src]
This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested.
pub fn weight(self, val: Option<usize>) -> Self
[src]
The weight for SRV records.
impl Request<M, V>
[src]
pub fn ssh_keys<D>(self, val: Vec<D>) -> Self where
D: Display + Serialize,
[src]
D: Display + Serialize,
An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation.
pub fn backups(self, val: bool) -> Self
[src]
A boolean indicating whether automated backups should be enabled for the Droplet. Automated backups can only be enabled when the Droplet is created.
pub fn ipv6(self, val: bool) -> Self
[src]
A boolean indicating whether IPv6 is enabled on the Droplet.
pub fn private_networking(self, val: bool) -> Self
[src]
A boolean indicating whether private networking is enabled for the Droplet. Private networking is currently only available in certain regions.
pub fn user_data(self, val: bool) -> Self
[src]
A string containing 'user data' which may be used to configure the Droplet on first boot, often a 'cloud-config' file or Bash script. It must be plain text and may not exceed 64 KiB in size.
pub fn monitoring(self, val: bool) -> Self
[src]
A boolean indicating whether to install the DigitalOcean agent for monitoring.
pub fn volumes(self, val: Vec<String>) -> Self
[src]
A flat array including the unique string identifier for each Block Storage volume to be attached to the Droplet. At the moment a volume can only be attached to a single Droplet.
pub fn tags(self, val: Vec<String>) -> Self
[src]
A flat array of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags.
impl Request<M, V>
[src]
pub fn ssh_keys<D>(self, val: Vec<D>) -> Self where
D: Display + Serialize,
[src]
D: Display + Serialize,
An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation.
pub fn backups(self, val: bool) -> Self
[src]
A boolean indicating whether automated backups should be enabled for the Droplet. Automated backups can only be enabled when the Droplet is created.
pub fn ipv6(self, val: bool) -> Self
[src]
A boolean indicating whether IPv6 is enabled on the Droplet.
pub fn private_networking(self, val: bool) -> Self
[src]
A boolean indicating whether private networking is enabled for the Droplet. Private networking is currently only available in certain regions.
pub fn user_data(self, val: bool) -> Self
[src]
A string containing 'user data' which may be used to configure the Droplet on first boot, often a 'cloud-config' file or Bash script. It must be plain text and may not exceed 64 KiB in size.
pub fn monitoring(self, val: bool) -> Self
[src]
A boolean indicating whether to install the DigitalOcean agent for monitoring.
pub fn volumes(self, val: Vec<String>) -> Self
[src]
A flat array including the unique string identifier for each Block Storage volume to be attached to the Droplet. At the moment a volume can only be attached to a single Droplet.
pub fn tags(self, val: Vec<String>) -> Self
[src]
A flat array of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags.
impl Request<M, V>
[src]
pub fn snapshots(self) -> SnapshotRequest<List, Vec<Snapshot>>
[src]
pub fn backups(self) -> SnapshotRequest<List, Vec<Snapshot>>
[src]
pub fn neighbors(self) -> DropletRequest<List, Vec<Droplet>>
[src]
impl Request<M, V>
[src]
pub fn actions(self) -> DropletActionRequest<List, Vec<Action>>
[src]
pub fn enable_backups(self) -> DropletActionRequest<Create, Action>
[src]
pub fn disable_backups(self) -> DropletActionRequest<Create, Action>
[src]
pub fn reboot(self) -> DropletActionRequest<Create, Action>
[src]
pub fn power_cycle(self) -> DropletActionRequest<Create, Action>
[src]
pub fn shutdown(self) -> DropletActionRequest<Create, Action>
[src]
pub fn power(self, val: bool) -> DropletActionRequest<Create, Action>
[src]
pub fn restore<D: Display>(
self,
image: D
) -> DropletActionRequest<Create, Action>
[src]
self,
image: D
) -> DropletActionRequest<Create, Action>
pub fn password_reset(self) -> DropletActionRequest<Create, Action>
[src]
pub fn resize<S>(
self,
size: S,
disk: bool
) -> DropletActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
[src]
self,
size: S,
disk: bool
) -> DropletActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
pub fn rebuild<S>(self, image: S) -> DropletActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
[src]
S: AsRef<str> + Serialize + Display,
pub fn rename<S>(self, name: S) -> DropletActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
[src]
S: AsRef<str> + Serialize + Display,
pub fn kernel(self, kernel: usize) -> DropletActionRequest<Create, Action>
[src]
pub fn enable_ipv6(self) -> DropletActionRequest<Create, Action>
[src]
pub fn enable_private_networking(self) -> DropletActionRequest<Create, Action>
[src]
pub fn snapshot<S>(self, name: S) -> DropletActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
[src]
S: AsRef<str> + Serialize + Display,
pub fn action(self, id: usize) -> DropletActionRequest<Get, Action>
[src]
impl Request<M, V>
[src]
pub fn actions(self) -> FloatingIpActionRequest<List, Vec<Action>>
[src]
pub fn action(self, id: usize) -> FloatingIpActionRequest<Get, Action>
[src]
pub fn unassign(self) -> FloatingIpActionRequest<Create, Action>
[src]
pub fn assign(self, id: usize) -> FloatingIpActionRequest<Create, Action>
[src]
impl Request<M, V>
[src]
pub fn name<S: Display + Serialize>(self, val: S) -> ImageRequest<Update, Image>
[src]
The new name that you would like to use for the image.
impl Request<M, V>
[src]
pub fn actions(self) -> ImageActionRequest<List, Vec<Action>>
[src]
pub fn transfer<S>(self, region: S) -> ImageActionRequest<Create, Action> where
S: AsRef<str> + Display + Serialize,
[src]
S: AsRef<str> + Display + Serialize,
pub fn convert(self) -> ImageActionRequest<Create, Action>
[src]
pub fn action(self, id: usize) -> ImageActionRequest<Get, Action>
[src]
impl Request<M, V>
[src]
pub fn algorithm<S>(self, val: S) -> LoadBalancerRequest<Create, LoadBalancer> where
S: Display + Serialize,
[src]
S: Display + Serialize,
The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either "round_robin" or "least_connections". The default value is "round_robin".
pub fn forwarding_rule<T>(
self,
val: T
) -> LoadBalancerRequest<Create, LoadBalancer> where
T: Into<ForwardingRule>,
[src]
self,
val: T
) -> LoadBalancerRequest<Create, LoadBalancer> where
T: Into<ForwardingRule>,
An array of objects specifying the forwarding rules for a Load Balancer. At least one forwarding rule is required when creating a new Load Balancer instance.
pub fn health_check<S: AsRef<str> + Display + Serialize>(
self,
protocol: S,
port: usize,
path: Option<S>,
check_interval_seconds: Option<usize>,
response_timeout_seconds: Option<usize>,
unhealthy_threshold: Option<usize>,
healthy_threshold: Option<usize>
) -> LoadBalancerRequest<Create, LoadBalancer>
[src]
self,
protocol: S,
port: usize,
path: Option<S>,
check_interval_seconds: Option<usize>,
response_timeout_seconds: Option<usize>,
unhealthy_threshold: Option<usize>,
healthy_threshold: Option<usize>
) -> LoadBalancerRequest<Create, LoadBalancer>
The (optional) health check settings.
pub fn sticky_sessions<S: AsRef<str> + Display + Serialize>(
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>
) -> LoadBalancerRequest<Create, LoadBalancer>
[src]
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>
) -> LoadBalancerRequest<Create, LoadBalancer>
The (optional) sticky sessions settings. kind
must be cookies
or
none
. If kind
is cookies
then cookie_name
and
cookie_ttl_seconds
should be set as well.
pub fn redirect_http_to_https(
self,
setting: bool
) -> LoadBalancerRequest<Create, LoadBalancer>
[src]
self,
setting: bool
) -> LoadBalancerRequest<Create, LoadBalancer>
A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.
pub fn droplets(
self,
ids: Vec<usize>
) -> LoadBalancerRequest<Create, LoadBalancer>
[src]
self,
ids: Vec<usize>
) -> LoadBalancerRequest<Create, LoadBalancer>
The IDs of the Droplets to be assigned to the Load Balancer.
Note: Not intended to be used alongside the tag
function.
pub fn tag<S>(self, tag: S) -> LoadBalancerRequest<Create, LoadBalancer> where
S: AsRef<str> + Display + Serialize,
[src]
S: AsRef<str> + Display + Serialize,
The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
Note: Not intended to be used alongside the droplets
function.
impl Request<M, V>
[src]
pub fn name<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer> where
S: Display + Serialize,
[src]
S: Display + Serialize,
A human-readable name for a Load Balancer instance.
pub fn region<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer> where
S: Display + Serialize,
[src]
S: Display + Serialize,
The region where the Load Balancer instance will be located.
pub fn algorithm<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer> where
S: Display + Serialize,
[src]
S: Display + Serialize,
The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either "round_robin" or "least_connections". The default value is "round_robin".
pub fn forwarding_rule<T>(
self,
val: T
) -> LoadBalancerRequest<Update, LoadBalancer> where
T: Into<ForwardingRule>,
[src]
self,
val: T
) -> LoadBalancerRequest<Update, LoadBalancer> where
T: Into<ForwardingRule>,
An array of objects specifying the forwarding rules for a Load Balancer. At least one forwarding rule is required when creating a new Load Balancer instance.
pub fn health_check<S: AsRef<str> + Display + Serialize>(
self,
protocol: S,
port: usize,
path: Option<S>,
check_interval_seconds: Option<usize>,
response_timeout_seconds: Option<usize>,
unhealthy_threshold: Option<usize>,
healthy_threshold: Option<usize>
) -> LoadBalancerRequest<Update, LoadBalancer>
[src]
self,
protocol: S,
port: usize,
path: Option<S>,
check_interval_seconds: Option<usize>,
response_timeout_seconds: Option<usize>,
unhealthy_threshold: Option<usize>,
healthy_threshold: Option<usize>
) -> LoadBalancerRequest<Update, LoadBalancer>
The (optional) health check settings.
pub fn sticky_sessions<S: AsRef<str> + Display + Serialize>(
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>
) -> LoadBalancerRequest<Update, LoadBalancer>
[src]
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>
) -> LoadBalancerRequest<Update, LoadBalancer>
The (optional) sticky sessions settings. kind
must be cookies
or
none
. If kind
is cookies
then cookie_name
and
cookie_ttl_seconds
should be set as well.
pub fn redirect_http_to_https(
self,
setting: bool
) -> LoadBalancerRequest<Update, LoadBalancer>
[src]
self,
setting: bool
) -> LoadBalancerRequest<Update, LoadBalancer>
A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.
pub fn droplets(
self,
ids: Vec<usize>
) -> LoadBalancerRequest<Update, LoadBalancer>
[src]
self,
ids: Vec<usize>
) -> LoadBalancerRequest<Update, LoadBalancer>
The IDs of the Droplets to be assigned to the Load Balancer.
Note: Not intended to be used alongside the tag
function.
pub fn tag<S>(self, tag: S) -> LoadBalancerRequest<Update, LoadBalancer> where
S: AsRef<str> + Display + Serialize,
[src]
S: AsRef<str> + Display + Serialize,
The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
Note: Not intended to be used alongside the droplets
function.
impl Request<M, V>
[src]
pub fn add_droplets(self, ids: Vec<usize>) -> LoadBalancerRequest<Create, ()>
[src]
Add droplets (by id) to the load balancer.
pub fn remove_droplets(self, ids: Vec<usize>) -> LoadBalancerRequest<Delete, ()>
[src]
Remove droplets (by id) from the load balancer.
pub fn add_forwarding_rules<T>(
self,
items: Vec<T>
) -> LoadBalancerRequest<Create, ()> where
T: Into<ForwardingRule>,
[src]
self,
items: Vec<T>
) -> LoadBalancerRequest<Create, ()> where
T: Into<ForwardingRule>,
Add a forwarding rule to the Load Balancer.
pub fn remove_forwarding_rules<T>(
self,
items: Vec<T>
) -> LoadBalancerRequest<Delete, ()> where
T: Into<ForwardingRule>,
[src]
self,
items: Vec<T>
) -> LoadBalancerRequest<Delete, ()> where
T: Into<ForwardingRule>,
Remove a forwarding rule to the Load Balancer.
impl Request<M, V>
[src]
pub fn name<S: AsRef<str> + Display + Serialize>(self, val: S) -> Self
[src]
The name to give the new SSH key in your account.
impl Request<M, V>
[src]
pub fn add_resources<S>(self, resources: Vec<(S, S)>) -> TagRequest<Create, ()> where
S: AsRef<str> + Serialize + Display,
[src]
S: AsRef<str> + Serialize + Display,
Accepts tuples matching (id, type)
. Currently the only type
is "droplet"
.
pub fn remove_resources<S>(
self,
resources: Vec<(S, S)>
) -> TagRequest<Delete, ()> where
S: AsRef<str> + Serialize + Display,
[src]
self,
resources: Vec<(S, S)>
) -> TagRequest<Delete, ()> where
S: AsRef<str> + Serialize + Display,
Accepts tuples matching (id, type)
. Currently the only type
is "droplet"
.
impl Request<M, V>
[src]
impl Request<M, V>
[src]
pub fn snapshots(self) -> SnapshotRequest<List, Vec<Snapshot>>
[src]
pub fn snapshot<S>(self, name: S) -> SnapshotRequest<Create, Snapshot> where
S: AsRef<str> + Serialize + Display,
[src]
S: AsRef<str> + Serialize + Display,
impl Request<M, V>
[src]
pub fn description<S: AsRef<str> + Serialize + Display>(self, val: S) -> Self
[src]
An optional free-form text field to describe a Block Storage volume.
pub fn region<S: AsRef<str> + Serialize + Display>(self, val: S) -> Self
[src]
The region where the Block Storage volume will be created. When setting a region, the value should be the slug identifier for the region. When you query a Block Storage volume, the entire region object will be returned.
Note: Should not be specified with a snapshot_id
.
pub fn snapshot_id<S: AsRef<str> + Serialize + Display>(self, val: S) -> Self
[src]
The unique identifier for the volume snapshot from which to create the volume.
Note: Should not be specified with a region_id
.
impl Request<M, V>
[src]
pub fn attach(self, droplet: usize) -> VolumeActionRequest<Create, Action>
[src]
pub fn detach(self, droplet: usize) -> VolumeActionRequest<Create, Action>
[src]
pub fn resize(self, size: usize) -> VolumeActionRequest<Create, Action>
[src]
pub fn actions(self) -> VolumeActionRequest<List, Vec<Action>>
[src]
pub fn action(self, id: usize) -> VolumeActionRequest<Get, Action>
[src]
impl<A: Method, R> Request<A, R>
[src]
pub fn url_mut(&mut self) -> &mut Url
[src]
pub fn body_mut(&mut self) -> &mut Value
[src]
The JSON body of the request.
impl<A: Method, R> Request<A, R>
[src]
pub fn url(&self) -> &Url
[src]
pub fn body(&self) -> &Value
[src]
The JSON body of the request.
pub fn method(&self) -> &A
[src]
impl<A: Method, R> Request<A, R>
[src]
pub fn set_url(&mut self, val: Url) -> &mut Self
[src]
pub fn set_body(&mut self, val: Value) -> &mut Self
[src]
The JSON body of the request.
impl<A: Method, V> Request<A, V>
[src]
pub fn new(url: Url) -> Self
[src]
Create a request pointing at the given url. V
is the value ultimately
returned when the call is executed.
impl<V> Request<List, V>
[src]
pub fn limit(self, limit: Option<usize>) -> Self
[src]
Impose a limit on the number of values which may be retrieved from a request.
Trait Implementations
impl<A: Clone + Method, R: Clone> Clone for Request<A, R>
[src]
impl<A: Debug + Method, R: Debug> Debug for Request<A, R>
[src]
impl<'de, A: Method, R> Deserialize<'de> for Request<A, R> where
A: Deserialize<'de>,
[src]
A: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Executable<()> for Request<Delete, ()>
[src]
impl<V: HasResponse> Executable<V> for Request<Create, V>
[src]
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
[src]
impl<V: HasResponse> Executable<V> for Request<Update, V>
[src]
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
[src]
impl<V: HasResponse> Executable<V> for Request<Get, V>
[src]
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
[src]
impl<V> Executable<Vec<V>> for Request<List, Vec<V>> where
Vec<V>: HasResponse,
<Vec<V> as HasResponse>::Response: HasPagination,
[src]
Vec<V>: HasResponse,
<Vec<V> as HasResponse>::Response: HasPagination,
impl<A: Method, R> Serialize for Request<A, R> where
A: Serialize,
[src]
A: Serialize,
Auto Trait Implementations
impl<A, R> RefUnwindSafe for Request<A, R> where
A: RefUnwindSafe,
R: RefUnwindSafe,
A: RefUnwindSafe,
R: RefUnwindSafe,
impl<A, R> Send for Request<A, R> where
A: Send,
R: Send,
A: Send,
R: Send,
impl<A, R> Sync for Request<A, R> where
A: Sync,
R: Sync,
A: Sync,
R: Sync,
impl<A, R> Unpin for Request<A, R> where
A: Unpin,
R: Unpin,
A: Unpin,
R: Unpin,
impl<A, R> UnwindSafe for Request<A, R> where
A: UnwindSafe,
R: UnwindSafe,
A: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,