Skip to main content

AzureHttpClient

Struct AzureHttpClient 

Source
pub struct AzureHttpClient { /* private fields */ }
Expand description

HTTP client for Azure API operations.

Provides automatic Bearer token injection, retry, and rate limiting.

Implementations§

Source§

impl AzureHttpClient

Source

pub fn builder() -> AzureHttpClientBuilder

Create a new builder.

Source

pub async fn from_env() -> Result<Self, AzureError>

Create a client using the default credential chain.

Resolves credentials in order:

  1. Service principal env vars
  2. Managed identity IMDS
  3. Azure CLI
Source

pub fn subscription_id(&self) -> &str

Get the configured subscription ID.

Source

pub async fn token(&self) -> Result<String, AzureError>

Acquire a token from the credential chain.

Source

pub fn acr(&self) -> AcrClient<'_>

Access the Azure Container Registry API

Source

pub fn aks(&self) -> AksClient<'_>

Access the Azure Kubernetes Service API

Source

pub fn compute(&self) -> ComputeClient<'_>

Access the Azure Compute API

Source

pub fn cosmosdb(&self) -> CosmosDbClient<'_>

Access the Azure CosmosDB API

Source

pub fn cost(&self) -> CostClient<'_>

Access the Azure Cost Management API

Source

pub fn dns(&self) -> DnsClient<'_>

Access the Azure DNS API

Source

pub fn functions(&self) -> FunctionsClient<'_>

Access the Azure Functions API

Source

pub fn graph(&self) -> GraphClient<'_>

Access the Microsoft Graph API

Source

pub fn identity(&self) -> IdentityClient<'_>

Access the Azure Managed Identities API

Source

pub fn keyvault(&self) -> KeyVaultClient<'_>

Access the Azure Key Vault API

Source

pub fn log_analytics(&self) -> LogAnalyticsClient<'_>

Access the Azure Log Analytics API

Source

pub fn monitor(&self) -> MonitorClient<'_>

Access the Azure Monitor API

Source

pub fn networking(&self) -> NetworkingClient<'_>

Access the Azure Networking API

Source

pub fn rbac(&self) -> RbacClient<'_>

Access the Azure RBAC API

Source

pub fn redis(&self) -> RedisClient<'_>

Access the Azure Redis Cache API

Source

pub fn resource_graph(&self) -> ResourceGraphClient<'_>

Access the Azure Resource Graph API

Source

pub fn security(&self) -> SecurityClient<'_>

Access the Azure Defender for Cloud API

Source

pub fn sql(&self) -> SqlClient<'_>

Access the Azure SQL API

Source

pub fn storage(&self) -> StorageClient<'_>

Access the Azure Storage API

Source

pub fn subscriptions(&self) -> SubscriptionsClient<'_>

Access the Azure Subscriptions API

Source

pub async fn get(&self, url: &str) -> Result<AzureResponse, AzureError>

Make a GET request with automatic Bearer token injection and retry.

Source

pub async fn put( &self, url: &str, body: &[u8], ) -> Result<AzureResponse, AzureError>

Make a PUT request with a JSON body.

Source

pub async fn post( &self, url: &str, body: &[u8], ) -> Result<AzureResponse, AzureError>

Make a POST request with a JSON body.

Source

pub async fn delete(&self, url: &str) -> Result<AzureResponse, AzureError>

Make a DELETE request.

Source

pub async fn patch( &self, url: &str, body: &[u8], ) -> Result<AzureResponse, AzureError>

Make a PATCH request with a JSON body.

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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<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