google-cloud-billingbudgets overview (2.1.7)

com.google.cloud.billing.budgets.v1

The interfaces provided are listed below, along with usage samples.

BudgetServiceClient

Service Description: BudgetService stores Cloud Billing budgets, which define a budget plan and rules to execute as we track spend against that plan.

Sample for BudgetServiceClient:


 try (BudgetServiceClient budgetServiceClient = BudgetServiceClient.create()) {
   BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]");
   Budget budget = Budget.newBuilder().build();
   Budget response = budgetServiceClient.createBudget(parent, budget);
 }
 

com.google.cloud.billing.budgets.v1.stub

com.google.cloud.billing.budgets.v1beta1

The interfaces provided are listed below, along with usage samples.

BudgetServiceClient

Service Description: BudgetService stores Cloud Billing budgets, which define a budget plan and rules to execute as we track spend against that plan.

Sample for BudgetServiceClient:


 try (BudgetServiceClient budgetServiceClient = BudgetServiceClient.create()) {
   CreateBudgetRequest request =
       CreateBudgetRequest.newBuilder()
           .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString())
           .setBudget(Budget.newBuilder().build())
           .build();
   Budget response = budgetServiceClient.createBudget(request);
 }
 

com.google.cloud.billing.budgets.v1beta1.stub