Struct IpPools

Source
pub struct IpPools {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

Source§

impl IpPools

Source

pub async fn get_ips_pools( &self, ) -> Result<Response<Vec<IpPoolsPoolResp>>, ClientError>

Retrieve all IP pools.

This function performs a GET to the /ips/pools endpoint.

This endpoint allows you to get all of your IP pools.

Source

pub async fn get_all_ips_pools( &self, ) -> Result<Response<Vec<IpPoolsPoolResp>>, ClientError>

Retrieve all IP pools.

This function performs a GET to the /ips/pools endpoint.

As opposed to get_ips_pools, this function returns all the pages of the request at once.

This endpoint allows you to get all of your IP pools.

Source

pub async fn post_ips_pool( &self, body: &IpPool, ) -> Result<Response<IpPoolsPoolResp>, ClientError>

Create an IP pool.

This function performs a POST to the /ips/pools endpoint.

This endpoint allows you to create an IP pool.

Before you can create an IP pool, you need to activate the IP in your SendGrid account:

  1. Log into your SendGrid account.
  2. Navigate to Settings and then select IP Addresses.
  3. Find the IP address you want to activate and then click Edit.
  4. Check Allow my account to send mail using this IP address.
  5. Click Save.
Source

pub async fn post_ips_pools_pool_name_ip( &self, pool_name: &str, body: &PostIpsWarmupRequest, ) -> Result<Response<GetIpsAssignedResponse>, ClientError>

Add an IP address to a pool.

This function performs a POST to the /ips/pools/{pool_name}/ips endpoint.

This endpoint allows you to add an IP address to an IP pool.

You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made.

Before you can add an IP to a pool, you need to activate it in your SendGrid account:

  1. Log into your SendGrid account.
  2. Navigate to Settings and then select IP Addresses.
  3. Find the IP address you want to activate and then click Edit.
  4. Check Allow my account to send mail using this IP address.
  5. Click Save.

You can retrieve all of your available IP addresses from the “Retrieve all IP addresses” endpoint.

Source

pub async fn get_ips_pools_pool_name( &self, pool_name: &str, ) -> Result<Response<GetIpsPoolsPoolNameResponse>, ClientError>

Retrieve all the IPs in a specified pool.

This function performs a GET to the /ips/pools/{pool_name} endpoint.

This endpoint allows you to get all of the IP addresses that are in a specific IP pool.

Source

pub async fn put_ips_pools_pool_name( &self, pool_name: &str, body: &PutIpsPoolsPoolNameRequest, ) -> Result<Response<IpPoolsPoolResp>, ClientError>

Rename an IP pool.

This function performs a PUT to the /ips/pools/{pool_name} endpoint.

This endpoint allows you to update the name of an IP pool.

Source

pub async fn delete_ips_pools_pool_name( &self, pool_name: &str, ) -> Result<Response<Help>, ClientError>

Delete an IP pool.

This function performs a DELETE to the /ips/pools/{pool_name} endpoint.

This endpoint allows you to delete an IP pool.

Source

pub async fn delete_ips_pools_pool_name_ip( &self, pool_name: &str, ip: &str, ) -> Result<Response<Help>, ClientError>

Remove an IP address from a pool.

This function performs a DELETE to the /ips/pools/{pool_name}/ips/{ip} endpoint.

This endpoint allows you to remove an IP address from an IP pool.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,