pub struct ArmClient { /* private fields */ }Expand description
ARM client for discovering Azure resources.
Implementations§
Source§impl ArmClient
impl ArmClient
Sourcepub async fn new() -> Result<Self, ClientError>
pub async fn new() -> Result<Self, ClientError>
Create a new ARM client, acquiring a token via the Azure CLI.
Sourcepub async fn list_subscriptions(&self) -> Result<Vec<Subscription>, ClientError>
pub async fn list_subscriptions(&self) -> Result<Vec<Subscription>, ClientError>
List all enabled Azure subscriptions.
Sourcepub async fn list_cosmos_accounts(
&self,
subscription_id: &str,
) -> Result<Vec<CosmosAccount>, ClientError>
pub async fn list_cosmos_accounts( &self, subscription_id: &str, ) -> Result<Vec<CosmosAccount>, ClientError>
List Cosmos DB accounts in a given subscription.
Sourcepub async fn has_cosmos_data_role(
&self,
account_resource_id: &str,
principal_id: &str,
) -> Result<bool, ClientError>
pub async fn has_cosmos_data_role( &self, account_resource_id: &str, principal_id: &str, ) -> Result<bool, ClientError>
Check if a principal has any Cosmos DB SQL role assignment on the account.
Sourcepub async fn assign_cosmos_data_contributor(
&self,
account_resource_id: &str,
principal_id: &str,
) -> Result<(), ClientError>
pub async fn assign_cosmos_data_contributor( &self, account_resource_id: &str, principal_id: &str, ) -> Result<(), ClientError>
Assign the Cosmos DB Built-in Data Contributor role to a principal.
Auto Trait Implementations§
impl Freeze for ArmClient
impl !RefUnwindSafe for ArmClient
impl Send for ArmClient
impl Sync for ArmClient
impl Unpin for ArmClient
impl UnsafeUnpin for ArmClient
impl !UnwindSafe for ArmClient
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