Class: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryreservationV1beta1::CapacityCommitment
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/bigqueryreservation_v1beta1/classes.rb,
generated/google/apis/bigqueryreservation_v1beta1/representations.rb,
generated/google/apis/bigqueryreservation_v1beta1/representations.rb
Overview
Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Monthly and annual commitments renew by default. Only flex commitments can be removed. In order to remove monthly or annual commitments, their plan needs to be changed to flex first. A capacity commitment resource exists as a child resource of the admin project.
Instance Attribute Summary collapse
-
#commitment_end_time ⇒ String
Output only.
-
#failure_status ⇒ Google::Apis::BigqueryreservationV1beta1::Status
The
Status
type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. -
#name ⇒ String
Output only.
-
#plan ⇒ String
Capacity commitment commitment plan.
-
#renewal_plan ⇒ String
The plan this capacity commitment is converted to after commitment_end_time passes.
-
#slot_count ⇒ Fixnum
Number of slots in this commitment.
-
#state ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CapacityCommitment
constructor
A new instance of CapacityCommitment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ CapacityCommitment
Returns a new instance of CapacityCommitment.
153 154 155 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 153 def initialize(**args) update!(**args) end |
Instance Attribute Details
#commitment_end_time ⇒ String
Output only. The end of the current commitment period. It is applicable only
for ACTIVE
capacity commitments.
Corresponds to the JSON property commitmentEndTime
113 114 115 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 113 def commitment_end_time @commitment_end_time end |
#failure_status ⇒ Google::Apis::BigqueryreservationV1beta1::Status
The Status
type defines a logical error model that is suitable for
different programming environments, including REST APIs and RPC APIs. It is
used by gRPC. Each Status
message contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the
API Design Guide.
Corresponds to the JSON property failureStatus
123 124 125 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 123 def failure_status @failure_status end |
#name ⇒ String
Output only. The resource name of the capacity commitment, e.g.,
projects/myproject/locations/US/capacityCommitments/123
Corresponds to the JSON property name
129 130 131 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 129 def name @name end |
#plan ⇒ String
Capacity commitment commitment plan.
Corresponds to the JSON property plan
134 135 136 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 134 def plan @plan end |
#renewal_plan ⇒ String
The plan this capacity commitment is converted to after commitment_end_time
passes. Once the plan is changed, committed period is extended according to
commitment plan. Only applicable for MONTHLY and ANNUAL commitments.
Corresponds to the JSON property renewalPlan
141 142 143 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 141 def renewal_plan @renewal_plan end |
#slot_count ⇒ Fixnum
Number of slots in this commitment.
Corresponds to the JSON property slotCount
146 147 148 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 146 def slot_count @slot_count end |
#state ⇒ String
Output only. State of the commitment.
Corresponds to the JSON property state
151 152 153 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 151 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
158 159 160 161 162 163 164 165 166 |
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 158 def update!(**args) @commitment_end_time = args[:commitment_end_time] if args.key?(:commitment_end_time) @failure_status = args[:failure_status] if args.key?(:failure_status) @name = args[:name] if args.key?(:name) @plan = args[:plan] if args.key?(:plan) @renewal_plan = args[:renewal_plan] if args.key?(:renewal_plan) @slot_count = args[:slot_count] if args.key?(:slot_count) @state = args[:state] if args.key?(:state) end |