Class: Google::Apis::BillingbudgetsV1::CloudBillingBudgetService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::BillingbudgetsV1::CloudBillingBudgetService
- Defined in:
- generated/google/apis/billingbudgets_v1/service.rb
Overview
Cloud Billing Budget API
The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_billing_account_budget(parent, google_cloud_billing_budgets_v1_budget_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget
Creates a new budget.
-
#delete_billing_account_budget(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleProtobufEmpty
Deletes a budget.
-
#get_billing_account_budget(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget
Returns a budget.
-
#initialize ⇒ CloudBillingBudgetService
constructor
A new instance of CloudBillingBudgetService.
-
#list_billing_account_budgets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1ListBudgetsResponse
Returns a list of budgets for a billing account.
-
#patch_billing_account_budget(name, google_cloud_billing_budgets_v1_budget_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget
Updates a budget and returns the updated budget.
Constructor Details
#initialize ⇒ CloudBillingBudgetService
Returns a new instance of CloudBillingBudgetService.
46 47 48 49 |
# File 'generated/google/apis/billingbudgets_v1/service.rb', line 46 def initialize super('https://billingbudgets.googleapis.com/', '') @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'generated/google/apis/billingbudgets_v1/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
44 45 46 |
# File 'generated/google/apis/billingbudgets_v1/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#create_billing_account_budget(parent, google_cloud_billing_budgets_v1_budget_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget
Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.
75 76 77 78 79 80 81 82 83 84 85 |
# File 'generated/google/apis/billingbudgets_v1/service.rb', line 75 def create_billing_account_budget(parent, google_cloud_billing_budgets_v1_budget_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/budgets', ) command.request_representation = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget::Representation command.request_object = google_cloud_billing_budgets_v1_budget_object command.response_representation = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget::Representation command.response_class = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_billing_account_budget(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleProtobufEmpty
Deletes a budget. Returns successfully if already deleted.
108 109 110 111 112 113 114 115 116 |
# File 'generated/google/apis/billingbudgets_v1/service.rb', line 108 def delete_billing_account_budget(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::BillingbudgetsV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::BillingbudgetsV1::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_billing_account_budget(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget
Returns a budget. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.
142 143 144 145 146 147 148 149 150 |
# File 'generated/google/apis/billingbudgets_v1/service.rb', line 142 def get_billing_account_budget(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget::Representation command.response_class = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_billing_account_budgets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1ListBudgetsResponse
Returns a list of budgets for a billing account. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.
183 184 185 186 187 188 189 190 191 192 193 |
# File 'generated/google/apis/billingbudgets_v1/service.rb', line 183 def list_billing_account_budgets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/budgets', ) command.response_representation = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1ListBudgetsResponse::Representation command.response_class = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1ListBudgetsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_billing_account_budget(name, google_cloud_billing_budgets_v1_budget_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget
Updates a budget and returns the updated budget. WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.
227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'generated/google/apis/billingbudgets_v1/service.rb', line 227 def patch_billing_account_budget(name, google_cloud_billing_budgets_v1_budget_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget::Representation command.request_object = google_cloud_billing_budgets_v1_budget_object command.response_representation = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget::Representation command.response_class = Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |