Class: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/bigqueryreservation_v1beta1/classes.rb,
lib/google/apis/bigqueryreservation_v1beta1/representations.rb,
lib/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. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CapacityCommitment

Returns a new instance of CapacityCommitment.



176
177
178
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 176

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#commitment_end_timeString

Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Corresponds to the JSON property commitmentEndTime

Returns:

  • (String)


118
119
120
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 118

def commitment_end_time
  @commitment_end_time
end

#commitment_start_timeString

Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Corresponds to the JSON property commitmentStartTime

Returns:

  • (String)


124
125
126
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 124

def commitment_start_time
  @commitment_start_time
end

#failure_statusGoogle::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



134
135
136
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 134

def failure_status
  @failure_status
end

#multi_region_auxiliaryBoolean Also known as: multi_region_auxiliary?

Applicable only for commitments located within one of the BigQuery multi- regions (US or EU). If set to true, this commitment is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization's default region. Corresponds to the JSON property multiRegionAuxiliary

Returns:

  • (Boolean)


143
144
145
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 143

def multi_region_auxiliary
  @multi_region_auxiliary
end

#nameString

Output only. The resource name of the capacity commitment, e.g., projects/ myproject/locations/US/capacityCommitments/123 The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters. Corresponds to the JSON property name

Returns:

  • (String)


152
153
154
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 152

def name
  @name
end

#planString

Capacity commitment commitment plan. Corresponds to the JSON property plan

Returns:

  • (String)


157
158
159
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 157

def plan
  @plan
end

#renewal_planString

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 ANNUAL commitments. Corresponds to the JSON property renewalPlan

Returns:

  • (String)


164
165
166
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 164

def renewal_plan
  @renewal_plan
end

#slot_countFixnum

Number of slots in this commitment. Corresponds to the JSON property slotCount

Returns:

  • (Fixnum)


169
170
171
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 169

def slot_count
  @slot_count
end

#stateString

Output only. State of the commitment. Corresponds to the JSON property state

Returns:

  • (String)


174
175
176
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 174

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



181
182
183
184
185
186
187
188
189
190
191
# File 'lib/google/apis/bigqueryreservation_v1beta1/classes.rb', line 181

def update!(**args)
  @commitment_end_time = args[:commitment_end_time] if args.key?(:commitment_end_time)
  @commitment_start_time = args[:commitment_start_time] if args.key?(:commitment_start_time)
  @failure_status = args[:failure_status] if args.key?(:failure_status)
  @multi_region_auxiliary = args[:multi_region_auxiliary] if args.key?(:multi_region_auxiliary)
  @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