# 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.

- Source: [`core/lib/bitrate.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/bitrate.ts#L13)
- Type last changed: v2.244.0 · 19 Mar 2026

## Example

```ts
declare const stack: Stack;
declare const networkInterface: RouterNetworkInterface;

const input = new RouterInput(stack, 'FailoverInput', {
  routerInputName: 'failover-input',
  maximumBitrate: Bitrate.mbps(10),
  routingScope: RoutingScope.REGIONAL,
  tier: RouterInputTier.INPUT_20,
  configuration: RouterInputConfiguration.failover({
    networkInterface: networkInterface,
    protocols: [
      RouterInputProtocol.rist({
        port: 5000,
        recoveryLatency: Duration.millis(1000),
      }),
      RouterInputProtocol.rist({
        port: 5002, // Must not be consecutive with primary port
        recoveryLatency: Duration.millis(1000),
      }),
    ],
    sourcePriority: SourcePriorityConfig.primarySecondary(PrimarySource.FIRST_SOURCE),
  }),
});
```

## Methods

- `bps(amount: number): Bitrate // chainable` (static) — Create a Bitrate representing an amount of bits per second.

  **Parameters**

  - `amount` — the amount of bits per second.

- `gbps(amount: number): Bitrate // chainable` (static) — Create a Bitrate representing an amount of gigabits per second.

  **Parameters**

  - `amount` — the amount of gigabits per second.

- `isUnresolved(): boolean` — Checks if bitrate is a token or a resolvable object.

- `kbps(amount: number): Bitrate // chainable` (static) — Create a Bitrate representing an amount of kilobits per second.

  **Parameters**

  - `amount` — the amount of kilobits per second.

- `mbps(amount: number): Bitrate // chainable` (static) — Create a Bitrate representing an amount of megabits per second.

  **Parameters**

  - `amount` — the amount of megabits per second.

- `toBps(): number` — Return the total number of bits per second.

- `toGbps(): number` — Return the total number of gigabits per second.

- `toKbps(): number` — Return the total number of kilobits per second.

- `toMbps(): number` — Return the total number of megabits per second.
