Struct DomainAuthentication

Source
pub struct DomainAuthentication {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

Source§

impl DomainAuthentication

Source

pub async fn get_whitelabel_domains( &self, limit: i64, offset: i64, exclude_subusers: bool, username: &str, domain: &str, ) -> Result<Response<Vec<DomainAuthentication200ResponseAllOf>>, ClientError>

List all authenticated domains.

This function performs a GET to the /whitelabel/domains endpoint.

This endpoint allows you to retrieve a list of all domains you have authenticated.

Parameters:

  • limit: i64 – Number of domains to return.
  • offset: i64 – Paging offset.
  • exclude_subusers: bool – Indicates if your subuser statistics will be sent to your New Relic Dashboard.
  • username: &str – The license key provided with your New Relic account.
  • domain: &str – The license key provided with your New Relic account.
  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn get_all_whitelabel_domains( &self, offset: i64, exclude_subusers: bool, username: &str, domain: &str, ) -> Result<Response<Vec<DomainAuthentication200ResponseAllOf>>, ClientError>

List all authenticated domains.

This function performs a GET to the /whitelabel/domains endpoint.

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

This endpoint allows you to retrieve a list of all domains you have authenticated.

Source

pub async fn post_whitelabel_domain( &self, body: &PostWhitelabelDomainsRequest, ) -> Result<Response<AuthenticationDomain>, ClientError>

Authenticate a domain.

This function performs a POST to the /whitelabel/domains endpoint.

This endpoint allows you to authenticate a domain.

If you are authenticating a domain for a subuser, you have two options:

  1. Use the “username” parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain.
  2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn get_whitelabel_domains_domain( &self, domain_id: &str, ) -> Result<Response<AuthenticationDomain>, ClientError>

Retrieve an authenticated domain.

This function performs a GET to the /whitelabel/domains/{domain_id} endpoint.

This endpoint allows you to retrieve a specific authenticated domain.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

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

Delete an authenticated domain.

This function performs a DELETE to the /whitelabel/domains/{domain_id} endpoint.

This endpoint allows you to delete an authenticated domain.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn patch_whitelabel_domains_domain( &self, domain_id: &str, body: &PatchWhitelabelDomainsDomainRequest, ) -> Result<Response<Vec<DomainAuthentication200ResponseAllOf>>, ClientError>

Update an authenticated domain.

This function performs a PATCH to the /whitelabel/domains/{domain_id} endpoint.

This endpoint allows you to update the settings for an authenticated domain.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn get_whitelabel_domains_default( &self, domain: &str, ) -> Result<Response<Vec<DomainAuthentication200ResponseAllOf>>, ClientError>

Get the default authentication.

This function performs a GET to the /whitelabel/domains/default endpoint.

This endpoint allows you to retrieve the default authentication for a domain.

When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden.

This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status.

Parameters:

  • domain: &str – The license key provided with your New Relic account.
  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn get_all_whitelabel_domains_default( &self, domain: &str, ) -> Result<Response<Vec<DomainAuthentication200ResponseAllOf>>, ClientError>

Get the default authentication.

This function performs a GET to the /whitelabel/domains/default endpoint.

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

This endpoint allows you to retrieve the default authentication for a domain.

When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden.

This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status.

Source

pub async fn post_whitelabel_domains_ip( &self, id: i64, body: &Ips, ) -> Result<Response<DomainAuthentication>, ClientError>

Add an IP to an authenticated domain.

This function performs a POST to the /whitelabel/domains/{id}/ips endpoint.

This endpoint allows you to add an IP address to an authenticated domain.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn delete_whitelabel_domains_ips_ip( &self, id: i64, ip: &str, ) -> Result<Response<DomainAuthentication>, ClientError>

Remove an IP from an authenticated domain.

This function performs a DELETE to the /whitelabel/domains/{id}/ips/{ip} endpoint.

This endpoint allows you to remove an IP address from that domain’s authentication.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn post_whitelabel_domains_validate( &self, id: i64, ) -> Result<Response<PostWhitelabelDomainsValidateResponse>, ClientError>

Validate a domain authentication.

This function performs a POST to the /whitelabel/domains/{id}/validate endpoint.

This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn get_whitelabel_domains_subuser( &self, username: &str, ) -> Result<Response<DomainAuthentication>, ClientError>

List the authenticated domain associated with the given user.

This function performs a GET to the /whitelabel/domains/subuser endpoint.

This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.

Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent’s domain authentication. To associate a authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The the parent may then associate the authenticated domain via the subuser management tools.

Parameters:

  • username: &str – Username for the subuser to find associated authenticated domain.
Source

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

Disassociate an authenticated domain from a given user.

This function performs a DELETE to the /whitelabel/domains/subuser endpoint.

This endpoint allows you to disassociate a specific authenticated domain from a subuser.

Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent’s domain authentication. To associate a authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The the parent may then associate the authenticated domain via the subuser management tools.

Parameters:

  • username: &str – Username for the subuser to find associated authenticated domain.
Source

pub async fn post_whitelabel_domains_domain_subuser( &self, domain_id: i64, body: &PutUserUsernameResponse, ) -> Result<Response<DomainAuthentication>, ClientError>

Associate a authenticated domain with a given user.

This function performs a POST to the /whitelabel/domains/{domain_id}/subuser endpoint.

This endpoint allows you to associate a specific authenticated domain with a subuser.

Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent’s domain authentication. To associate a authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The the parent may then associate the authenticated domain via the subuser management tools.

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,

Source§

impl<T> MaybeSendSync for T