Class: Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Filter
- Inherits:
-
Object
- Object
- Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Filter
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/billingbudgets_v1/classes.rb,
lib/google/apis/billingbudgets_v1/representations.rb,
lib/google/apis/billingbudgets_v1/representations.rb
Overview
A filter for a budget, limiting the scope of the cost to calculate.
Instance Attribute Summary collapse
-
#calendar_period ⇒ String
Optional.
-
#credit_types ⇒ Array<String>
Optional.
-
#credit_types_treatment ⇒ String
Optional.
-
#custom_period ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1CustomPeriod
All date times begin at 12 AM US and Canadian Pacific Time (UTC-8).
-
#labels ⇒ Hash<String,Array<Object>>
Optional.
-
#projects ⇒ Array<String>
Optional.
-
#resource_ancestors ⇒ Array<String>
Optional.
-
#services ⇒ Array<String>
Optional.
-
#subaccounts ⇒ Array<String>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1Filter
constructor
A new instance of GoogleCloudBillingBudgetsV1Filter.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1Filter
Returns a new instance of GoogleCloudBillingBudgetsV1Filter.
242 243 244 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 242 def initialize(**args) update!(**args) end |
Instance Attribute Details
#calendar_period ⇒ String
Optional. Specifies to track usage for recurring calendar period. For example,
assume that CalendarPeriod.QUARTER is set. The budget tracks usage from April
1 to June 30, when the current calendar month is April, May, June. After that,
it tracks usage from July 1 to September 30 when the current calendar month is
July, August, September, so on.
Corresponds to the JSON property calendarPeriod
175 176 177 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 175 def calendar_period @calendar_period end |
#credit_types ⇒ Array<String>
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.
Corresponds to the JSON property creditTypes
185 186 187 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 185 def credit_types @credit_types end |
#credit_types_treatment ⇒ String
Optional. If not set, default behavior is INCLUDE_ALL_CREDITS
.
Corresponds to the JSON property creditTypesTreatment
190 191 192 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 190 def credit_types_treatment @credit_types_treatment end |
#custom_period ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1CustomPeriod
All date times begin at 12 AM US and Canadian Pacific Time (UTC-8).
Corresponds to the JSON property customPeriod
195 196 197 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 195 def custom_period @custom_period end |
#labels ⇒ Hash<String,Array<Object>>
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 includes 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.
Corresponds to the JSON property labels
204 205 206 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 204 def labels @labels end |
#projects ⇒ Array<String>
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 includes all usage for the billing account, regardless of
which project the usage occurred on.
Corresponds to the JSON property
projects`
212 213 214 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 212 def projects @projects end |
#resource_ancestors ⇒ Array<String>
Optional. A set of folder and organization names of the form folders/
folderIdor `organizations/`organizationId
, specifying that usage from
only this set of folders and organizations should be included in the budget.
If omitted, the budget includes all usage that the billing account pays for.
If the folder or organization contains projects that are paid for by a
different Cloud Billing account, the budget doesn't apply to those projects.
Corresponds to the JSON property resourceAncestors
222 223 224 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 222 def resource_ancestors @resource_ancestors end |
#services ⇒ Array<String>
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 includes usage for all the services. The service names are
available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/
catalog-api.
Corresponds to the JSON property
services`
231 232 233 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 231 def services @services end |
#subaccounts ⇒ Array<String>
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 is included. If the field is omitted, the report
includes usage from the parent account and all subaccounts, if they exist.
Corresponds to the JSON property
subaccounts`
240 241 242 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 240 def subaccounts @subaccounts end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 247 def update!(**args) @calendar_period = args[:calendar_period] if args.key?(:calendar_period) @credit_types = args[:credit_types] if args.key?(:credit_types) @credit_types_treatment = args[:credit_types_treatment] if args.key?(:credit_types_treatment) @custom_period = args[:custom_period] if args.key?(:custom_period) @labels = args[:labels] if args.key?(:labels) @projects = args[:projects] if args.key?(:projects) @resource_ancestors = args[:resource_ancestors] if args.key?(:resource_ancestors) @services = args[:services] if args.key?(:services) @subaccounts = args[:subaccounts] if args.key?(:subaccounts) end |