google-cloud-billingbudgets overview (2.19.0)

com.google.cloud.billing.budgets.v1

A client to Cloud Billing Budget API

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 and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 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

A client to Cloud Billing Budget API

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 and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 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