Class: Google::Apis::BigqueryreservationV1::CapacityCommitment
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryreservationV1::CapacityCommitment
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/bigqueryreservation_v1/classes.rb,
lib/google/apis/bigqueryreservation_v1/representations.rb,
lib/google/apis/bigqueryreservation_v1/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
-
#commitment_end_time ⇒ String
Output only.
-
#commitment_start_time ⇒ String
Output only.
-
#edition ⇒ String
Optional.
-
#failure_status ⇒ Google::Apis::BigqueryreservationV1::Status
The
Statustype defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. -
#is_flat_rate ⇒ Boolean
(also: #is_flat_rate?)
Output only.
-
#multi_region_auxiliary ⇒ Boolean
(also: #multi_region_auxiliary?)
Applicable only for commitments located within one of the BigQuery multi- regions (US or EU).
-
#name ⇒ String
Output only.
-
#plan ⇒ String
Optional.
-
#renewal_plan ⇒ String
Optional.
-
#slot_count ⇒ Fixnum
Optional.
-
#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.
Constructor Details
#initialize(**args) ⇒ CapacityCommitment
Returns a new instance of CapacityCommitment.
430 431 432 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 430 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. Note after renewal, commitment_end_time is
the time the renewed commitment expires. So itwould be at a time after
commitment_start_time + committed period, because we don't change
commitment_start_time ,
Corresponds to the JSON property commitmentEndTime
356 357 358 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 356 def commitment_end_time @commitment_end_time end |
#commitment_start_time ⇒ String
Output only. The start of the current commitment period. It is applicable only
for ACTIVE capacity commitments. Note after the commitment is renewed,
commitment_start_time won't be changed. It refers to the start time of the
original commitment.
Corresponds to the JSON property commitmentStartTime
364 365 366 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 364 def commitment_start_time @commitment_start_time end |
#edition ⇒ String
Optional. Edition of the capacity commitment.
Corresponds to the JSON property edition
369 370 371 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 369 def edition @edition end |
#failure_status ⇒ Google::Apis::BigqueryreservationV1::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
379 380 381 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 379 def failure_status @failure_status end |
#is_flat_rate ⇒ Boolean Also known as: is_flat_rate?
Output only. If true, the commitment is a flat-rate commitment, otherwise, it'
s an edition commitment.
Corresponds to the JSON property isFlatRate
385 386 387 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 385 def is_flat_rate @is_flat_rate end |
#multi_region_auxiliary ⇒ Boolean 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. NOTE: this is a preview feature. Project must be allow-listed in order
to set this field.
Corresponds to the JSON property multiRegionAuxiliary
396 397 398 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 396 def multi_region_auxiliary @multi_region_auxiliary end |
#name ⇒ String
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
405 406 407 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 405 def name @name end |
#plan ⇒ String
Optional. Capacity commitment commitment plan.
Corresponds to the JSON property plan
410 411 412 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 410 def plan @plan end |
#renewal_plan ⇒ String
Optional. 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 and TRIAL
commitments.
Corresponds to the JSON property renewalPlan
418 419 420 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 418 def renewal_plan @renewal_plan end |
#slot_count ⇒ Fixnum
Optional. Number of slots in this commitment.
Corresponds to the JSON property slotCount
423 424 425 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 423 def slot_count @slot_count end |
#state ⇒ String
Output only. State of the commitment.
Corresponds to the JSON property state
428 429 430 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 428 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 435 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) @edition = args[:edition] if args.key?(:edition) @failure_status = args[:failure_status] if args.key?(:failure_status) @is_flat_rate = args[:is_flat_rate] if args.key?(:is_flat_rate) @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 |