Billing
class Billing extends Message
Billing related configuration of the service.
The following example shows how to configure metrics for billing:
metrics:
- name: library.googleapis.com/read_calls
metric_kind: DELTA
value_type: INT64
- name: library.googleapis.com/write_calls
metric_kind: DELTA
value_type: INT64
billing:
metrics:
- library.googleapis.com/read_calls
- library.googleapis.com/write_calls
The next example shows how to enable billing status check and customize the
check behavior. It makes sure billing status check is included in the Check
method of Service Control API.
In the example, "google.storage.Get" method can be served when the billing
status is either current
or delinquent
, while "google.storage.Write"
method can only be served when the billing status is current
:
billing:
rules:
- selector: google.storage.Get
allowed_statuses:
- current
- delinquent
- selector: google.storage.Write
allowed_statuses: current
Mostly services should only allow current
status when serving requests.
In addition, services can choose to allow both current
and delinquent
statuses when serving read-only requests to resources. If there's no
matching selector for operation, no billing status check will be performed.
Protobuf type Google\Api\Billing
Methods
No description
Names of the metrics to report to billing. Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
Names of the metrics to report to billing. Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
A list of billing status rules for configuring billing status check.
A list of billing status rules for configuring billing status check.
Details
at line 62
__construct()
at line 74
RepeatedField
getMetrics()
Names of the metrics to report to billing. Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
Generated from protobuf field repeated string metrics = 1;
at line 86
setMetrics(array|RepeatedField $var)
Names of the metrics to report to billing. Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
Generated from protobuf field repeated string metrics = 1;
at line 98
RepeatedField
getRules()
A list of billing status rules for configuring billing status check.
Generated from protobuf field repeated .google.api.BillingStatusRule rules = 5;
at line 109
setRules(array|RepeatedField $var)
A list of billing status rules for configuring billing status check.
Generated from protobuf field repeated .google.api.BillingStatusRule rules = 5;