Reference documentation and code samples for the Google Cloud Billing Budgets V1beta1 Client class Budget.
A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met).
The budget time period is configurable, with options such as month (default), quarter, year, or custom time period.
Generated from protobuf message google.cloud.billing.budgets.v1beta1.Budget
Namespace
Google \ Cloud \ Billing \ Budgets \ V1beta1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Output only. Resource name of the budget. The resource name implies the scope of a budget. Values are of the form |
↳ display_name |
string
User data for display name in UI. Validation: <= 60 chars. |
↳ budget_filter |
Google\Cloud\Billing\Budgets\V1beta1\Filter
Optional. Filters that define which resources are used to compute the actual spend against the budget amount, such as projects, services, and the budget's time period, as well as other filters. |
↳ amount |
Google\Cloud\Billing\Budgets\V1beta1\BudgetAmount
Required. Budgeted amount. |
↳ threshold_rules |
array<Google\Cloud\Billing\Budgets\V1beta1\ThresholdRule>
Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. Optional for |
↳ all_updates_rule |
Google\Cloud\Billing\Budgets\V1beta1\AllUpdatesRule
Optional. Rules to apply to notifications sent based on budget spend and thresholds. |
↳ 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. |
getName
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}
.
Returns | |
---|---|
Type | Description |
string |
setName
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}
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDisplayName
User data for display name in UI.
Validation: <= 60 chars.
Returns | |
---|---|
Type | Description |
string |
setDisplayName
User data for display name in UI.
Validation: <= 60 chars.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getBudgetFilter
Optional. Filters that define which resources are used to compute the actual spend against the budget amount, such as projects, services, and the budget's time period, as well as other filters.
Returns | |
---|---|
Type | Description |
Google\Cloud\Billing\Budgets\V1beta1\Filter|null |
hasBudgetFilter
clearBudgetFilter
setBudgetFilter
Optional. Filters that define which resources are used to compute the actual spend against the budget amount, such as projects, services, and the budget's time period, as well as other filters.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Billing\Budgets\V1beta1\Filter
|
Returns | |
---|---|
Type | Description |
$this |
getAmount
Required. Budgeted amount.
Returns | |
---|---|
Type | Description |
Google\Cloud\Billing\Budgets\V1beta1\BudgetAmount|null |
hasAmount
clearAmount
setAmount
Required. Budgeted amount.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Billing\Budgets\V1beta1\BudgetAmount
|
Returns | |
---|---|
Type | Description |
$this |
getThresholdRules
Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
Optional for pubsubTopic
notifications.
Required if using email notifications.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setThresholdRules
Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget.
Optional for pubsubTopic
notifications.
Required if using email notifications.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Billing\Budgets\V1beta1\ThresholdRule>
|
Returns | |
---|---|
Type | Description |
$this |
getAllUpdatesRule
Optional. Rules to apply to notifications sent based on budget spend and thresholds.
Returns | |
---|---|
Type | Description |
Google\Cloud\Billing\Budgets\V1beta1\AllUpdatesRule|null |
hasAllUpdatesRule
clearAllUpdatesRule
setAllUpdatesRule
Optional. Rules to apply to notifications sent based on budget spend and thresholds.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Billing\Budgets\V1beta1\AllUpdatesRule
|
Returns | |
---|---|
Type | Description |
$this |
getEtag
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.
Returns | |
---|---|
Type | Description |
string |
setEtag
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.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |