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
impl AzureHttpClient
Sourcepub fn builder() -> AzureHttpClientBuilder
pub fn builder() -> AzureHttpClientBuilder
Create a new builder.
Sourcepub async fn from_env() -> Result<Self, AzureError>
pub async fn from_env() -> Result<Self, AzureError>
Create a client using the default credential chain.
Resolves credentials in order:
- Service principal env vars
- Managed identity IMDS
- Azure CLI
Sourcepub fn subscription_id(&self) -> &str
pub fn subscription_id(&self) -> &str
Get the configured subscription ID.
Sourcepub async fn token(&self) -> Result<String, AzureError>
pub async fn token(&self) -> Result<String, AzureError>
Acquire a token from the credential chain.
Sourcepub fn compute(&self) -> ComputeClient<'_>
pub fn compute(&self) -> ComputeClient<'_>
Access the Azure Compute API
Sourcepub fn cosmosdb(&self) -> CosmosDbClient<'_>
pub fn cosmosdb(&self) -> CosmosDbClient<'_>
Access the Azure CosmosDB API
Sourcepub fn cost(&self) -> CostClient<'_>
pub fn cost(&self) -> CostClient<'_>
Access the Azure Cost Management API
Sourcepub fn functions(&self) -> FunctionsClient<'_>
pub fn functions(&self) -> FunctionsClient<'_>
Access the Azure Functions API
Sourcepub fn graph(&self) -> GraphClient<'_>
pub fn graph(&self) -> GraphClient<'_>
Access the Microsoft Graph API
Sourcepub fn identity(&self) -> IdentityClient<'_>
pub fn identity(&self) -> IdentityClient<'_>
Access the Azure Managed Identities API
Sourcepub fn keyvault(&self) -> KeyVaultClient<'_>
pub fn keyvault(&self) -> KeyVaultClient<'_>
Access the Azure Key Vault API
Sourcepub fn log_analytics(&self) -> LogAnalyticsClient<'_>
pub fn log_analytics(&self) -> LogAnalyticsClient<'_>
Access the Azure Log Analytics API
Sourcepub fn monitor(&self) -> MonitorClient<'_>
pub fn monitor(&self) -> MonitorClient<'_>
Access the Azure Monitor API
Sourcepub fn networking(&self) -> NetworkingClient<'_>
pub fn networking(&self) -> NetworkingClient<'_>
Access the Azure Networking API
Sourcepub fn rbac(&self) -> RbacClient<'_>
pub fn rbac(&self) -> RbacClient<'_>
Access the Azure RBAC API
Sourcepub fn redis(&self) -> RedisClient<'_>
pub fn redis(&self) -> RedisClient<'_>
Access the Azure Redis Cache API
Sourcepub fn resource_graph(&self) -> ResourceGraphClient<'_>
pub fn resource_graph(&self) -> ResourceGraphClient<'_>
Access the Azure Resource Graph API
Sourcepub fn security(&self) -> SecurityClient<'_>
pub fn security(&self) -> SecurityClient<'_>
Access the Azure Defender for Cloud API
Sourcepub fn storage(&self) -> StorageClient<'_>
pub fn storage(&self) -> StorageClient<'_>
Access the Azure Storage API
Sourcepub fn subscriptions(&self) -> SubscriptionsClient<'_>
pub fn subscriptions(&self) -> SubscriptionsClient<'_>
Access the Azure Subscriptions API
Sourcepub async fn get(&self, url: &str) -> Result<AzureResponse, AzureError>
pub async fn get(&self, url: &str) -> Result<AzureResponse, AzureError>
Make a GET request with automatic Bearer token injection and retry.
Sourcepub async fn put(
&self,
url: &str,
body: &[u8],
) -> Result<AzureResponse, AzureError>
pub async fn put( &self, url: &str, body: &[u8], ) -> Result<AzureResponse, AzureError>
Make a PUT request with a JSON body.
Sourcepub async fn post(
&self,
url: &str,
body: &[u8],
) -> Result<AzureResponse, AzureError>
pub async fn post( &self, url: &str, body: &[u8], ) -> Result<AzureResponse, AzureError>
Make a POST request with a JSON body.
Sourcepub async fn delete(&self, url: &str) -> Result<AzureResponse, AzureError>
pub async fn delete(&self, url: &str) -> Result<AzureResponse, AzureError>
Make a DELETE request.
Sourcepub async fn patch(
&self,
url: &str,
body: &[u8],
) -> Result<AzureResponse, AzureError>
pub async fn patch( &self, url: &str, body: &[u8], ) -> Result<AzureResponse, AzureError>
Make a PATCH request with a JSON body.