pub struct AuthenticationAPI { /* private fields */ }
Expand description
All requests to Datadog’s API must be authenticated.
Requests that write data require reporting access and require an API key
.
Requests that read data require full access and also require an application key
.
Note: All Datadog API clients are configured by default to consume Datadog US site APIs.
If you are on the Datadog EU site, set the environment variable DATADOG_HOST
to
<https://api.datadoghq.eu
> or override this value directly when creating your client.
Manage your account’s API and application keys in Datadog, and see the API and Application Keys page in the documentation.
Implementations§
Source§impl AuthenticationAPI
impl AuthenticationAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn validate(
&self,
) -> Result<AuthenticationValidationResponse, Error<ValidateError>>
pub async fn validate( &self, ) -> Result<AuthenticationValidationResponse, Error<ValidateError>>
Check if the API key (not the APP key) is valid. If invalid, a 403 is returned.
Sourcepub async fn validate_with_http_info(
&self,
) -> Result<ResponseContent<AuthenticationValidationResponse>, Error<ValidateError>>
pub async fn validate_with_http_info( &self, ) -> Result<ResponseContent<AuthenticationValidationResponse>, Error<ValidateError>>
Check if the API key (not the APP key) is valid. If invalid, a 403 is returned.
Trait Implementations§
Source§impl Clone for AuthenticationAPI
impl Clone for AuthenticationAPI
Source§fn clone(&self) -> AuthenticationAPI
fn clone(&self) -> AuthenticationAPI
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AuthenticationAPI
impl Debug for AuthenticationAPI
Auto Trait Implementations§
impl Freeze for AuthenticationAPI
impl !RefUnwindSafe for AuthenticationAPI
impl Send for AuthenticationAPI
impl Sync for AuthenticationAPI
impl Unpin for AuthenticationAPI
impl !UnwindSafe for AuthenticationAPI
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more