pub struct CloudQuotas { /* private fields */ }Expand description
Implements a client for the Cloud Quotas API.
§Example
let client = CloudQuotas::builder().build().await?;
// use `client` to make requests to the Cloud Quotas API.§Service Description
The Cloud Quotas API is an infrastructure service for Google Cloud that lets service consumers list and manage their resource usage limits.
- List/Get the metadata and current status of the quotas for a service.
- Create/Update quota preferencess that declare the preferred quota values.
- Check the status of a quota preference request.
- List/Get pending and historical quota preference.
§Configuration
To configure CloudQuotas use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://cloudquotas.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
CloudQuotas holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap CloudQuotas in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl CloudQuotas
impl CloudQuotas
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for CloudQuotas.
let client = CloudQuotas::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: CloudQuotas + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: CloudQuotas + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_quota_infos(&self) -> ListQuotaInfos
pub fn list_quota_infos(&self) -> ListQuotaInfos
Lists QuotaInfos of all quotas for a given project, folder or organization.
Sourcepub fn get_quota_info(&self) -> GetQuotaInfo
pub fn get_quota_info(&self) -> GetQuotaInfo
Retrieve the QuotaInfo of a quota for a project, folder or organization.
Sourcepub fn list_quota_preferences(&self) -> ListQuotaPreferences
pub fn list_quota_preferences(&self) -> ListQuotaPreferences
Lists QuotaPreferences in a given project, folder or organization.
Sourcepub fn get_quota_preference(&self) -> GetQuotaPreference
pub fn get_quota_preference(&self) -> GetQuotaPreference
Gets details of a single QuotaPreference.
Sourcepub fn create_quota_preference(&self) -> CreateQuotaPreference
pub fn create_quota_preference(&self) -> CreateQuotaPreference
Creates a new QuotaPreference that declares the desired value for a quota.
Sourcepub fn update_quota_preference(&self) -> UpdateQuotaPreference
pub fn update_quota_preference(&self) -> UpdateQuotaPreference
Updates the parameters of a single QuotaPreference. It can updates the config in any states, not just the ones pending approval.
Trait Implementations§
Source§impl Clone for CloudQuotas
impl Clone for CloudQuotas
Source§fn clone(&self) -> CloudQuotas
fn clone(&self) -> CloudQuotas
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more