Bitrate
- class aws_cdk.Bitrate(*args: Any, **kwargs)
Bases:
objectRepresents 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:
infused
Example:
# stack: Stack # network_interface: RouterNetworkInterface output = RouterOutput(stack, "SrtOutput", router_output_name="srt-output", maximum_bitrate=Bitrate.mbps(10), routing_scope=RoutingScope.REGIONAL, # tier defaults to RouterOutputTier.OUTPUT_20 (lowest cost) configuration=RouterOutputConfiguration.standard( protocol=RouterOutputProtocol.srt_listener( port=9001, minimum_latency=Duration.millis(200) ), network_interface=network_interface ) )
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:
- 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:
- 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: