Method: billingAccounts.budgets.patch

Updates a budget and returns the updated budget.

HTTP request

PATCH https://billingbudgets.googleapis.com/v1beta1/{budget.name=billingAccounts/*/budgets/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
budget.name

string

Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form billingAccounts/{billingAccountId}/budgets/{budgetId}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "budget": {
    "name": string,
    "displayName": string,
    "budgetFilter": {
      "projects": [
        string
      ],
      "creditTypesTreatment": enum (CreditTypesTreatment),
      "services": [
        string
      ]
    },
    "amount": {

      // Union field budget_amount can be only one of the following:
      "specifiedAmount": {
        object (Money)
      },
      "lastPeriodAmount": {
        object (LastPeriodAmount)
      }
      // End of list of possible types for union field budget_amount.
    },
    "thresholdRules": [
      {
        "thresholdPercent": number,
        "spendBasis": enum (Basis)
      }
    ],
    "allUpdatesRule": {
      "pubsubTopic": string,
      "schemaVersion": string
    },
    "etag": string
  },
  "updateMask": string
}
Fields
budget.displayName

string

User data for display name in UI. Validation: <= 60 chars.

budget.budgetFilter

object (Filter)

Optional. Filters that define which resources are used to compute the actual spend against the budget.

budget.amount

object (BudgetAmount)

Required. Budgeted amount.

budget.thresholdRules[]

object (ThresholdRule)

Required. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.

budget.allUpdatesRule

object (AllUpdatesRule)

Optional. Rules to apply to all updates to the actual spend, regardless of the thresholds set in thresholdRules.

budget.etag

string

Optional. Etag to validate that the object is unchanged for a read-modify-write operation. An empty etag will cause an update to overwrite other changes.

updateMask

string (FieldMask format)

Optional. Indicates which fields in the provided budget to update. Read-only fields (such as name) cannot be changed. If this is not provided, then only fields with non-default values from the request are updated. See https://developers.google.com/protocol-buffers/docs/proto3#default for more details about default values.

A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Response body

If successful, the response body contains an instance of Budget.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-billing

Try it!

Apakah halaman ini membantu? Beri tahu kami pendapat Anda:

Kirim masukan tentang...

Cloud Billing
Butuh bantuan? Kunjungi halaman dukungan kami.