Class: Google::Apis::ComposerV1::WorkerResource

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/composer_v1/classes.rb,
lib/google/apis/composer_v1/representations.rb,
lib/google/apis/composer_v1/representations.rb

Overview

Configuration for resources used by Airflow workers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WorkerResource

Returns a new instance of WorkerResource.



1251
1252
1253
# File 'lib/google/apis/composer_v1/classes.rb', line 1251

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

Instance Attribute Details

#cpuFloat

Optional. CPU request and limit for a single Airflow worker replica. Corresponds to the JSON property cpu

Returns:

  • (Float)


1229
1230
1231
# File 'lib/google/apis/composer_v1/classes.rb', line 1229

def cpu
  @cpu
end

#max_countFixnum

Optional. Maximum number of workers for autoscaling. Corresponds to the JSON property maxCount

Returns:

  • (Fixnum)


1234
1235
1236
# File 'lib/google/apis/composer_v1/classes.rb', line 1234

def max_count
  @max_count
end

#memory_gbFloat

Optional. Memory (GB) request and limit for a single Airflow worker replica. Corresponds to the JSON property memoryGb

Returns:

  • (Float)


1239
1240
1241
# File 'lib/google/apis/composer_v1/classes.rb', line 1239

def memory_gb
  @memory_gb
end

#min_countFixnum

Optional. Minimum number of workers for autoscaling. Corresponds to the JSON property minCount

Returns:

  • (Fixnum)


1244
1245
1246
# File 'lib/google/apis/composer_v1/classes.rb', line 1244

def min_count
  @min_count
end

#storage_gbFloat

Optional. Storage (GB) request and limit for a single Airflow worker replica. Corresponds to the JSON property storageGb

Returns:

  • (Float)


1249
1250
1251
# File 'lib/google/apis/composer_v1/classes.rb', line 1249

def storage_gb
  @storage_gb
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1256
1257
1258
1259
1260
1261
1262
# File 'lib/google/apis/composer_v1/classes.rb', line 1256

def update!(**args)
  @cpu = args[:cpu] if args.key?(:cpu)
  @max_count = args[:max_count] if args.key?(:max_count)
  @memory_gb = args[:memory_gb] if args.key?(:memory_gb)
  @min_count = args[:min_count] if args.key?(:min_count)
  @storage_gb = args[:storage_gb] if args.key?(:storage_gb)
end