SizeConversionOptions

class aws_cdk.core.SizeConversionOptions(*, rounding=None)

Bases: object

Options for how to convert time to a different unit.

Parameters:

rounding (Optional[SizeRoundingBehavior]) – How conversions should behave when it encounters a non-integer result. Default: SizeRoundingBehavior.FAIL

ExampleMetadata:

infused

Example:

Size.mebibytes(2).to_kibibytes() # yields 2048
Size.kibibytes(2050).to_mebibytes(rounding=SizeRoundingBehavior.FLOOR)

Attributes

rounding

How conversions should behave when it encounters a non-integer result.

Default:

SizeRoundingBehavior.FAIL