pub struct SpendLimitClient { /* private fields */ }Expand description
Calls SpendLimitService.
Spend limits: an amount per calendar month for a billing account, and the shares of it at which an alert is emailed. A spend limit only alerts: it never stops or refuses anything.
Access to spend limits is granted apart from access to billing accounts: an organization’s owner holds it by default.
Implementations§
Source§impl SpendLimitClient
impl SpendLimitClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of SpendLimitService that sends its calls through client.
Sourcepub fn service(&self) -> &Service
pub fn service(&self) -> &Service
The endpoint the client sends its calls to, which also serves the operations its methods answer with.
Sourcepub async fn get_spend_limit(
&self,
request: GetSpendLimitRequest,
) -> Result<SpendLimit, Error>
pub async fn get_spend_limit( &self, request: GetSpendLimitRequest, ) -> Result<SpendLimit, Error>
Returns a billing account’s spend limit; one that has none has no
limit. Needs admin.spend_limit.get on the organization.
Sourcepub async fn update_spend_limit(
&self,
request: UpdateSpendLimitRequest,
) -> Result<SpendLimit, Error>
pub async fn update_spend_limit( &self, request: UpdateSpendLimitRequest, ) -> Result<SpendLimit, Error>
Sets or removes a billing account’s spend limit. The fields named in
update_mask are replaced and the others kept. A spend limit left
without a limit is removed, with its thresholds and recipients. Needs
admin.spend_limit.update on the organization.