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

Inherits:
Object
  • Object
show all
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 minimum committed period of usage. Capacity commitment is immutable and cannot be deleted until the end of the commitment period. After the end of the commitment period, slots are still available but can be freely removed any time. Annual commitments will automatically be downgraded to monthly after the commitment ends. A capacity commitment resource exists as a child resource of the admin project.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CapacityCommitment

Returns a new instance of CapacityCommitment.



148
149
150
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 148

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

Instance Attribute Details

#commitment_end_timeString

Output only. The end of the commitment period. Capacity commitment cannot be removed before commitment_end_time. It is applicable only for ACTIVE capacity commitments and is computed as a combination of the plan and the time when the capacity commitment became ACTIVE. Corresponds to the JSON property commitmentEndTime

Returns:

  • (String)


115
116
117
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 115

def commitment_end_time
  @commitment_end_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



125
126
127
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 125

def failure_status
  @failure_status
end

#nameString

Output only. The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123 Corresponds to the JSON property name

Returns:

  • (String)


131
132
133
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 131

def name
  @name
end

#planString

Capacity commitment commitment plan. Corresponds to the JSON property plan

Returns:

  • (String)


136
137
138
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 136

def plan
  @plan
end

#slot_countFixnum

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

Returns:

  • (Fixnum)


141
142
143
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 141

def slot_count
  @slot_count
end

#stateString

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

Returns:

  • (String)


146
147
148
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 146

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



153
154
155
156
157
158
159
160
# File 'generated/google/apis/bigqueryreservation_v1beta1/classes.rb', line 153

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)
  @slot_count = args[:slot_count] if args.key?(:slot_count)
  @state = args[:state] if args.key?(:state)
end