Reference documentation and code samples for the Google Cloud Billing Budgets V1beta1 Client class Filter.
A filter for a budget, limiting the scope of the cost to calculate.
Generated from protobuf message google.cloud.billing.budgets.v1beta1.Filter
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ projects |
array
Optional. A set of projects of the form |
↳ credit_types |
array
Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. See a list of acceptable credit type values. If Filter.credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be empty. |
↳ credit_types_treatment |
int
Optional. If not set, default behavior is |
↳ services |
array
Optional. A set of services of the form |
↳ subaccounts |
array
Optional. A set of subaccounts of the form |
↳ labels |
array|Google\Protobuf\Internal\MapField
Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. If omitted, the report will include all labeled and unlabeled usage. An object containing a single |
↳ calendar_period |
int
Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on. |
↳ custom_period |
Google\Cloud\Billing\Budgets\V1beta1\CustomPeriod
Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur. |
getProjects
Optional. A set of projects of the form projects/{project}
,
specifying that usage from only this set of projects should be
included in the budget. If omitted, the report will include all usage for
the billing account, regardless of which project the usage occurred on.
Only zero or one project can be specified currently.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setProjects
Optional. A set of projects of the form projects/{project}
,
specifying that usage from only this set of projects should be
included in the budget. If omitted, the report will include all usage for
the billing account, regardless of which project the usage occurred on.
Only zero or one project can be specified currently.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getCreditTypes
Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. See a list of acceptable credit type values.
If Filter.credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be empty.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setCreditTypes
Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. See a list of acceptable credit type values.
If Filter.credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be empty.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getCreditTypesTreatment
Optional. If not set, default behavior is INCLUDE_ALL_CREDITS
.
Returns | |
---|---|
Type | Description |
int |
setCreditTypesTreatment
Optional. If not set, default behavior is INCLUDE_ALL_CREDITS
.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getServices
Optional. A set of services of the form services/{service_id}
,
specifying that usage from only this set of services should be
included in the budget. If omitted, the report will include usage for
all the services.
The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setServices
Optional. A set of services of the form services/{service_id}
,
specifying that usage from only this set of services should be
included in the budget. If omitted, the report will include usage for
all the services.
The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getSubaccounts
Optional. A set of subaccounts of the form billingAccounts/{account_id}
, specifying
that usage from only this set of subaccounts should be included in the
budget. If a subaccount is set to the name of the parent account,
usage from the parent account will be included. If omitted, the
report will include usage from the parent account and all
subaccounts, if they exist.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setSubaccounts
Optional. A set of subaccounts of the form billingAccounts/{account_id}
, specifying
that usage from only this set of subaccounts should be included in the
budget. If a subaccount is set to the name of the parent account,
usage from the parent account will be included. If omitted, the
report will include usage from the parent account and all
subaccounts, if they exist.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getLabels
Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. If omitted, the report will include all labeled and unlabeled usage.
An object containing a single "key": value
pair. Example: { "name":
"wrench" }
.
Currently, multiple entries or multiple values per entry are not
allowed.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
setLabels
Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. If omitted, the report will include all labeled and unlabeled usage.
An object containing a single "key": value
pair. Example: { "name":
"wrench" }
.
Currently, multiple entries or multiple values per entry are not
allowed.
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |
getCalendarPeriod
Optional. Specifies to track usage for recurring calendar period.
For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on.
Returns | |
---|---|
Type | Description |
int |
hasCalendarPeriod
setCalendarPeriod
Optional. Specifies to track usage for recurring calendar period.
For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getCustomPeriod
Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.
Returns | |
---|---|
Type | Description |
Google\Cloud\Billing\Budgets\V1beta1\CustomPeriod|null |
hasCustomPeriod
setCustomPeriod
Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Billing\Budgets\V1beta1\CustomPeriod
|
Returns | |
---|---|
Type | Description |
$this |
getUsagePeriod
Returns | |
---|---|
Type | Description |
string |