Class: AWSCDK::Sagemaker::CfnFeatureGroup::ThroughputConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_feature_group.rb

Overview

Used to set feature group throughput configuration.

There are two modes: ON_DEMAND and PROVISIONED . With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled.

Note: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the Standard tier online store.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(throughput_mode:, provisioned_read_capacity_units: nil, provisioned_write_capacity_units: nil) ⇒ ThroughputConfigProperty

Returns a new instance of ThroughputConfigProperty.

Parameters:

  • throughput_mode (String)

    The mode used for your feature group throughput: ON_DEMAND or PROVISIONED .

  • provisioned_read_capacity_units (Numeric, nil) (defaults to: nil)

    For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling.

  • provisioned_write_capacity_units (Numeric, nil) (defaults to: nil)

    For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling.



1026
1027
1028
1029
1030
1031
1032
1033
# File 'sagemaker/cfn_feature_group.rb', line 1026

def initialize(throughput_mode:, provisioned_read_capacity_units: nil, provisioned_write_capacity_units: nil)
  @throughput_mode = throughput_mode
  Jsii::Type.check_type(@throughput_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "throughputMode")
  @provisioned_read_capacity_units = provisioned_read_capacity_units
  Jsii::Type.check_type(@provisioned_read_capacity_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "provisionedReadCapacityUnits") unless @provisioned_read_capacity_units.nil?
  @provisioned_write_capacity_units = provisioned_write_capacity_units
  Jsii::Type.check_type(@provisioned_write_capacity_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "provisionedWriteCapacityUnits") unless @provisioned_write_capacity_units.nil?
end

Instance Attribute Details

#provisioned_read_capacity_unitsNumeric? (readonly)

For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling.

This field is not applicable for on-demand feature groups.



1046
1047
1048
# File 'sagemaker/cfn_feature_group.rb', line 1046

def provisioned_read_capacity_units
  @provisioned_read_capacity_units
end

#provisioned_write_capacity_unitsNumeric? (readonly)

For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling.

This field is not applicable for on-demand feature groups.



1053
1054
1055
# File 'sagemaker/cfn_feature_group.rb', line 1053

def provisioned_write_capacity_units
  @provisioned_write_capacity_units
end

#throughput_modeString (readonly)

The mode used for your feature group throughput: ON_DEMAND or PROVISIONED .



1039
1040
1041
# File 'sagemaker/cfn_feature_group.rb', line 1039

def throughput_mode
  @throughput_mode
end

Class Method Details

.jsii_propertiesObject



1055
1056
1057
1058
1059
1060
1061
# File 'sagemaker/cfn_feature_group.rb', line 1055

def self.jsii_properties
  {
    :throughput_mode => "throughputMode",
    :provisioned_read_capacity_units => "provisionedReadCapacityUnits",
    :provisioned_write_capacity_units => "provisionedWriteCapacityUnits",
  }
end

Instance Method Details

#to_jsiiObject



1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'sagemaker/cfn_feature_group.rb', line 1063

def to_jsii
  result = {}
  result.merge!({
    "throughputMode" => @throughput_mode,
    "provisionedReadCapacityUnits" => @provisioned_read_capacity_units,
    "provisionedWriteCapacityUnits" => @provisioned_write_capacity_units,
  })
  result.compact
end