- Resource: ResourceAllowance
- UsageResourceAllowance
- UsageResourceAllowanceSpec
- Limit
- CalendarPeriod
- UsageResourceAllowanceStatus
- ResourceAllowanceState
- LimitStatus
- Interval
- ConsumptionReport
- PeriodConsumption
- Notification
- Methods
Resource: ResourceAllowance
The Resource Allowance description for Cloud Batch. Only one Resource Allowance is supported now under a specific location and project.
JSON representation |
---|
{ "name": string, "uid": string, "createTime": string, "labels": { string: string, ... }, "notifications": [ { object ( |
Fields | |
---|---|
name |
Identifier. ResourceAllowance name. For example: "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1". |
uid |
Output only. A system generated unique ID (in UUID4 format) for the ResourceAllowance. |
create |
Output only. Time when the ResourceAllowance was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
Optional. Labels are attributes that can be set and used by both the user and by Batch. Labels must meet the following constraints:
Both keys and values are additionally constrained to be <= 128 bytes. An object containing a list of |
notifications[] |
Optional. Notification configurations. |
Union field resource_allowance . ResourceAllowance detail. resource_allowance can be only one of the following: |
|
usage |
The detail of usage resource allowance. |
UsageResourceAllowance
UsageResourceAllowance describes the detail of usage resource allowance.
JSON representation |
---|
{ "spec": { object ( |
Fields | |
---|---|
spec |
Required. Spec of a usage ResourceAllowance. |
status |
Output only. Status of a usage ResourceAllowance. |
UsageResourceAllowanceSpec
Spec of a usage ResourceAllowance.
JSON representation |
---|
{
"type": string,
"limit": {
object ( |
Fields | |
---|---|
type |
Required. Spec type is unique for each usage ResourceAllowance. Batch now only supports type as "cpu-core-hours" for CPU usage consumption tracking. |
limit |
Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type. |
Limit
UsageResourceAllowance limitation.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
calendar |
Optional. A CalendarPeriod represents the abstract concept of a time period that has a canonical start. |
limit |
Required. Limit value of a UsageResourceAllowance within its one duration. Limit cannot be a negative value. Default is 0. For example, you can set |
CalendarPeriod
A CalendarPeriod
represents the abstract concept of a time period that has a canonical start. All calendar times begin at 12 AM US and Canadian Pacific Time (UTC-8).
Enums | |
---|---|
CALENDAR_PERIOD_UNSPECIFIED |
Unspecified. |
MONTH |
The month starts on the first date of the month and resets at the beginning of each month. |
QUARTER |
The quarter starts on dates January 1, April 1, July 1, and October 1 of each year and resets at the beginning of the next quarter. |
YEAR |
The year starts on January 1 and resets at the beginning of the next year. |
WEEK |
The week period starts and resets every Monday. |
DAY |
The day starts at 12:00am. |
UsageResourceAllowanceStatus
Status of a usage ResourceAllowance.
JSON representation |
---|
{ "state": enum ( |
Fields | |
---|---|
state |
Output only. ResourceAllowance state. |
limit |
Output only. ResourceAllowance consumption status for usage resources. |
report |
Output only. The report of ResourceAllowance consumptions in a time period. |
ResourceAllowanceState
ResourceAllowance valid state.
Enums | |
---|---|
RESOURCE_ALLOWANCE_STATE_UNSPECIFIED |
Unspecified. |
RESOURCE_ALLOWANCE_ACTIVE |
ResourceAllowance is active and in use. |
RESOURCE_ALLOWANCE_DEPLETED |
ResourceAllowance limit is reached. |
LimitStatus
UsageResourceAllowanceStatus detail about usage consumption.
JSON representation |
---|
{
"consumptionInterval": {
object ( |
Fields | |
---|---|
consumption |
Output only. The consumption interval. |
limit |
Output only. Limit value of a UsageResourceAllowance within its one duration. |
consumed |
Output only. Accumulated consumption during |
Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).
The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
JSON representation |
---|
{ "startTime": string, "endTime": string } |
Fields | |
---|---|
start |
Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
end |
Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
ConsumptionReport
ConsumptionReport is the report of ResourceAllowance consumptions in a time period.
JSON representation |
---|
{
"latestPeriodConsumptions": {
string: {
object ( |
Fields | |
---|---|
latest |
Output only. ResourceAllowance consumptions in the latest calendar period. Key is the calendar period in string format. Batch currently supports HOUR, DAY, MONTH and YEAR. An object containing a list of |
PeriodConsumption
JSON representation |
---|
{
"consumptionInterval": {
object ( |
Fields | |
---|---|
consumption |
Output only. The consumption interval. |
consumed |
Output only. Accumulated consumption during |
Notification
Notification on resource state change.
JSON representation |
---|
{ "pubsubTopic": string } |
Fields | |
---|---|
pubsub |
Required. The Pub/Sub topic where notifications like the resource allowance state changes will be published. The topic must exist in the same project as the job and billings will be charged to this project. If not specified, no Pub/Sub messages will be sent. Topic format: |
Methods |
|
---|---|
|
Create a Resource Allowance. |
|
Delete a ResourceAllowance. |
|
Get a ResourceAllowance specified by its resource name. |
|
List all ResourceAllowances for a project within a region. |
|
Update a Resource Allowance. |