Bitrate

class aws_cdk.Bitrate(*args: Any, **kwargs)

Bases: object

Represents a bitrate value.

The amount can be specified either as a literal value (e.g: 10) which cannot be negative, or as an unresolved number token.

When the amount is passed as a token, unit conversion is not possible.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

bitrate = cdk.Bitrate.bps(123)

Methods

is_unresolved()

Checks if bitrate is a token or a resolvable object.

Return type:

bool

to_bps()

Return the total number of bits per second.

Return type:

Union[int, float]

to_gbps()

Return the total number of gigabits per second.

Return type:

Union[int, float]

to_kbps()

Return the total number of kilobits per second.

Return type:

Union[int, float]

to_mbps()

Return the total number of megabits per second.

Return type:

Union[int, float]

Static Methods

classmethod bps(amount)

Create a Bitrate representing an amount of bits per second.

Parameters:

amount (Union[int, float]) – the amount of bits per second.

Return type:

Bitrate

classmethod gbps(amount)

Create a Bitrate representing an amount of gigabits per second.

Parameters:

amount (Union[int, float]) – the amount of gigabits per second.

Return type:

Bitrate

classmethod kbps(amount)

Create a Bitrate representing an amount of kilobits per second.

Parameters:

amount (Union[int, float]) – the amount of kilobits per second.

Return type:

Bitrate

classmethod mbps(amount)

Create a Bitrate representing an amount of megabits per second.

Parameters:

amount (Union[int, float]) – the amount of megabits per second.

Return type:

Bitrate