google-cloud-billingbudgets overview (2.2.0)

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:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 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:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 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