Struct sendgrid_api::ip_pools::IpPools
source · pub struct IpPools {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl IpPools
impl IpPools
sourcepub async fn get_ips_pools(&self) -> Result<Vec<IpPoolsPoolResp>>
pub async fn get_ips_pools(&self) -> Result<Vec<IpPoolsPoolResp>>
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.
sourcepub async fn get_all_ips_pools(&self) -> Result<Vec<IpPoolsPoolResp>>
pub async fn get_all_ips_pools(&self) -> Result<Vec<IpPoolsPoolResp>>
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.
sourcepub async fn post_ips_pool(&self, body: &IpPool) -> Result<IpPoolsPoolResp>
pub async fn post_ips_pool(&self, body: &IpPool) -> Result<IpPoolsPoolResp>
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:
- Log into your SendGrid account.
- Navigate to Settings and then select IP Addresses.
- Find the IP address you want to activate and then click Edit.
- Check Allow my account to send mail using this IP address.
- Click Save.
sourcepub async fn post_ips_pools_pool_name_ip(
&self,
pool_name: &str,
body: &PostIpsWarmupRequest
) -> Result<GetIpsAssignedResponse>
pub async fn post_ips_pools_pool_name_ip(
&self,
pool_name: &str,
body: &PostIpsWarmupRequest
) -> Result<GetIpsAssignedResponse>
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:
- Log into your SendGrid account.
- Navigate to Settings and then select IP Addresses.
- Find the IP address you want to activate and then click Edit.
- Check Allow my account to send mail using this IP address.
- Click Save.
You can retrieve all of your available IP addresses from the “Retrieve all IP addresses” endpoint.
sourcepub async fn get_ips_pools_pool_name(
&self,
pool_name: &str
) -> Result<GetIpsPoolsPoolNameResponse>
pub async fn get_ips_pools_pool_name(
&self,
pool_name: &str
) -> Result<GetIpsPoolsPoolNameResponse>
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.
sourcepub async fn put_ips_pools_pool_name(
&self,
pool_name: &str,
body: &PutIpsPoolsPoolNameRequest
) -> Result<IpPoolsPoolResp>
pub async fn put_ips_pools_pool_name(
&self,
pool_name: &str,
body: &PutIpsPoolsPoolNameRequest
) -> Result<IpPoolsPoolResp>
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.
sourcepub async fn delete_ips_pools_pool_name(&self, pool_name: &str) -> Result<Help>
pub async fn delete_ips_pools_pool_name(&self, pool_name: &str) -> Result<Help>
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.