class Bitrate
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Bitrate |
Go | github.com/aws/aws-cdk-go/awscdk/v2#Bitrate |
Java | software.amazon.awscdk.Bitrate |
Python | aws_cdk.Bitrate |
TypeScript (source) | aws-cdk-lib » Bitrate |
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.
Example
declare const stack: Stack;
declare const networkInterface: RouterNetworkInterface;
const output = new RouterOutput(stack, 'SrtOutput', {
routerOutputName: 'srt-output',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
// tier defaults to RouterOutputTier.OUTPUT_20 (lowest cost)
configuration: RouterOutputConfiguration.standard({
protocol: RouterOutputProtocol.srtListener({
port: 9001,
minimumLatency: Duration.millis(200),
}),
networkInterface: networkInterface,
}),
});
Methods
| Name | Description |
|---|---|
| is | Checks if bitrate is a token or a resolvable object. |
| to | Return the total number of bits per second. |
| to | Return the total number of gigabits per second. |
| to | Return the total number of kilobits per second. |
| to | Return the total number of megabits per second. |
| static bps(amount) | Create a Bitrate representing an amount of bits per second. |
| static gbps(amount) | Create a Bitrate representing an amount of gigabits per second. |
| static kbps(amount) | Create a Bitrate representing an amount of kilobits per second. |
| static mbps(amount) | Create a Bitrate representing an amount of megabits per second. |
isUnresolved()
public isUnresolved(): boolean
Returns
boolean
Checks if bitrate is a token or a resolvable object.
toBps()
public toBps(): number
Returns
number
Return the total number of bits per second.
toGbps()
public toGbps(): number
Returns
number
Return the total number of gigabits per second.
toKbps()
public toKbps(): number
Returns
number
Return the total number of kilobits per second.
toMbps()
public toMbps(): number
Returns
number
Return the total number of megabits per second.
static bps(amount)
public static bps(amount: number): Bitrate
Parameters
- amount
number— the amount of bits per second.
Returns
Create a Bitrate representing an amount of bits per second.
static gbps(amount)
public static gbps(amount: number): Bitrate
Parameters
- amount
number— the amount of gigabits per second.
Returns
Create a Bitrate representing an amount of gigabits per second.
static kbps(amount)
public static kbps(amount: number): Bitrate
Parameters
- amount
number— the amount of kilobits per second.
Returns
Create a Bitrate representing an amount of kilobits per second.
static mbps(amount)
public static mbps(amount: number): Bitrate
Parameters
- amount
number— the amount of megabits per second.
Returns
Create a Bitrate representing an amount of megabits per second.

.NET
Go
Java
Python
TypeScript (