Try AWS Native preview for resources not in the classic version.
aws.medialive.Multiplex
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Resource for managing an AWS MediaLive Multiplex.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const available = aws.getAvailabilityZones({
state: "available",
});
const example = new aws.medialive.Multiplex("example", {
name: "example-multiplex-changed",
availabilityZones: [
available.then(available => available.names?.[0]),
available.then(available => available.names?.[1]),
],
multiplexSettings: {
transportStreamBitrate: 1000000,
transportStreamId: 1,
transportStreamReservedBitrate: 1,
maximumVideoBufferDelayMilliseconds: 1000,
},
startMultiplex: true,
tags: {
tag1: "value1",
},
});
import pulumi
import pulumi_aws as aws
available = aws.get_availability_zones(state="available")
example = aws.medialive.Multiplex("example",
name="example-multiplex-changed",
availability_zones=[
available.names[0],
available.names[1],
],
multiplex_settings={
"transportStreamBitrate": 1000000,
"transportStreamId": 1,
"transportStreamReservedBitrate": 1,
"maximumVideoBufferDelayMilliseconds": 1000,
},
start_multiplex=True,
tags={
"tag1": "value1",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/medialive"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
available, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{
State: pulumi.StringRef("available"),
}, nil)
if err != nil {
return err
}
_, err = medialive.NewMultiplex(ctx, "example", &medialive.MultiplexArgs{
Name: pulumi.String("example-multiplex-changed"),
AvailabilityZones: pulumi.StringArray{
pulumi.String(available.Names[0]),
pulumi.String(available.Names[1]),
},
MultiplexSettings: &medialive.MultiplexMultiplexSettingsArgs{
TransportStreamBitrate: pulumi.Int(1000000),
TransportStreamId: pulumi.Int(1),
TransportStreamReservedBitrate: pulumi.Int(1),
MaximumVideoBufferDelayMilliseconds: pulumi.Int(1000),
},
StartMultiplex: pulumi.Bool(true),
Tags: pulumi.StringMap{
"tag1": pulumi.String("value1"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var available = Aws.GetAvailabilityZones.Invoke(new()
{
State = "available",
});
var example = new Aws.MediaLive.Multiplex("example", new()
{
Name = "example-multiplex-changed",
AvailabilityZones = new[]
{
available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names[0]),
available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names[1]),
},
MultiplexSettings = new Aws.MediaLive.Inputs.MultiplexMultiplexSettingsArgs
{
TransportStreamBitrate = 1000000,
TransportStreamId = 1,
TransportStreamReservedBitrate = 1,
MaximumVideoBufferDelayMilliseconds = 1000,
},
StartMultiplex = true,
Tags =
{
{ "tag1", "value1" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
import com.pulumi.aws.medialive.Multiplex;
import com.pulumi.aws.medialive.MultiplexArgs;
import com.pulumi.aws.medialive.inputs.MultiplexMultiplexSettingsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
.state("available")
.build());
var example = new Multiplex("example", MultiplexArgs.builder()
.name("example-multiplex-changed")
.availabilityZones(
available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]),
available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[1]))
.multiplexSettings(MultiplexMultiplexSettingsArgs.builder()
.transportStreamBitrate(1000000)
.transportStreamId(1)
.transportStreamReservedBitrate(1)
.maximumVideoBufferDelayMilliseconds(1000)
.build())
.startMultiplex(true)
.tags(Map.of("tag1", "value1"))
.build());
}
}
resources:
example:
type: aws:medialive:Multiplex
properties:
name: example-multiplex-changed
availabilityZones:
- ${available.names[0]}
- ${available.names[1]}
multiplexSettings:
transportStreamBitrate: 1e+06
transportStreamId: 1
transportStreamReservedBitrate: 1
maximumVideoBufferDelayMilliseconds: 1000
startMultiplex: true
tags:
tag1: value1
variables:
available:
fn::invoke:
Function: aws:getAvailabilityZones
Arguments:
state: available
Create Multiplex Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Multiplex(name: string, args: MultiplexArgs, opts?: CustomResourceOptions);
@overload
def Multiplex(resource_name: str,
args: MultiplexArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Multiplex(resource_name: str,
opts: Optional[ResourceOptions] = None,
availability_zones: Optional[Sequence[str]] = None,
multiplex_settings: Optional[MultiplexMultiplexSettingsArgs] = None,
name: Optional[str] = None,
start_multiplex: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None)
func NewMultiplex(ctx *Context, name string, args MultiplexArgs, opts ...ResourceOption) (*Multiplex, error)
public Multiplex(string name, MultiplexArgs args, CustomResourceOptions? opts = null)
public Multiplex(String name, MultiplexArgs args)
public Multiplex(String name, MultiplexArgs args, CustomResourceOptions options)
type: aws:medialive:Multiplex
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MultiplexArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MultiplexArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MultiplexArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MultiplexArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MultiplexArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var multiplexResource = new Aws.MediaLive.Multiplex("multiplexResource", new()
{
AvailabilityZones = new[]
{
"string",
},
MultiplexSettings = new Aws.MediaLive.Inputs.MultiplexMultiplexSettingsArgs
{
TransportStreamBitrate = 0,
TransportStreamId = 0,
MaximumVideoBufferDelayMilliseconds = 0,
TransportStreamReservedBitrate = 0,
},
Name = "string",
StartMultiplex = false,
Tags =
{
{ "string", "string" },
},
});
example, err := medialive.NewMultiplex(ctx, "multiplexResource", &medialive.MultiplexArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("string"),
},
MultiplexSettings: &medialive.MultiplexMultiplexSettingsArgs{
TransportStreamBitrate: pulumi.Int(0),
TransportStreamId: pulumi.Int(0),
MaximumVideoBufferDelayMilliseconds: pulumi.Int(0),
TransportStreamReservedBitrate: pulumi.Int(0),
},
Name: pulumi.String("string"),
StartMultiplex: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var multiplexResource = new Multiplex("multiplexResource", MultiplexArgs.builder()
.availabilityZones("string")
.multiplexSettings(MultiplexMultiplexSettingsArgs.builder()
.transportStreamBitrate(0)
.transportStreamId(0)
.maximumVideoBufferDelayMilliseconds(0)
.transportStreamReservedBitrate(0)
.build())
.name("string")
.startMultiplex(false)
.tags(Map.of("string", "string"))
.build());
multiplex_resource = aws.medialive.Multiplex("multiplexResource",
availability_zones=["string"],
multiplex_settings={
"transportStreamBitrate": 0,
"transportStreamId": 0,
"maximumVideoBufferDelayMilliseconds": 0,
"transportStreamReservedBitrate": 0,
},
name="string",
start_multiplex=False,
tags={
"string": "string",
})
const multiplexResource = new aws.medialive.Multiplex("multiplexResource", {
availabilityZones: ["string"],
multiplexSettings: {
transportStreamBitrate: 0,
transportStreamId: 0,
maximumVideoBufferDelayMilliseconds: 0,
transportStreamReservedBitrate: 0,
},
name: "string",
startMultiplex: false,
tags: {
string: "string",
},
});
type: aws:medialive:Multiplex
properties:
availabilityZones:
- string
multiplexSettings:
maximumVideoBufferDelayMilliseconds: 0
transportStreamBitrate: 0
transportStreamId: 0
transportStreamReservedBitrate: 0
name: string
startMultiplex: false
tags:
string: string
Multiplex Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Multiplex resource accepts the following input properties:
- Availability
Zones List<string> - A list of availability zones. You must specify exactly two.
- Multiplex
Settings MultiplexMultiplex Settings - Multiplex settings. See Multiplex Settings for more details.
- Name string
name of Multiplex.
The following arguments are optional:
- Start
Multiplex bool - Whether to start the Multiplex. Defaults to
false
. - Dictionary<string, string>
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Availability
Zones []string - A list of availability zones. You must specify exactly two.
- Multiplex
Settings MultiplexMultiplex Settings Args - Multiplex settings. See Multiplex Settings for more details.
- Name string
name of Multiplex.
The following arguments are optional:
- Start
Multiplex bool - Whether to start the Multiplex. Defaults to
false
. - map[string]string
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- availability
Zones List<String> - A list of availability zones. You must specify exactly two.
- multiplex
Settings MultiplexMultiplex Settings - Multiplex settings. See Multiplex Settings for more details.
- name String
name of Multiplex.
The following arguments are optional:
- start
Multiplex Boolean - Whether to start the Multiplex. Defaults to
false
. - Map<String,String>
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- availability
Zones string[] - A list of availability zones. You must specify exactly two.
- multiplex
Settings MultiplexMultiplex Settings - Multiplex settings. See Multiplex Settings for more details.
- name string
name of Multiplex.
The following arguments are optional:
- start
Multiplex boolean - Whether to start the Multiplex. Defaults to
false
. - {[key: string]: string}
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- availability_
zones Sequence[str] - A list of availability zones. You must specify exactly two.
- multiplex_
settings MultiplexMultiplex Settings Args - Multiplex settings. See Multiplex Settings for more details.
- name str
name of Multiplex.
The following arguments are optional:
- start_
multiplex bool - Whether to start the Multiplex. Defaults to
false
. - Mapping[str, str]
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- availability
Zones List<String> - A list of availability zones. You must specify exactly two.
- multiplex
Settings Property Map - Multiplex settings. See Multiplex Settings for more details.
- name String
name of Multiplex.
The following arguments are optional:
- start
Multiplex Boolean - Whether to start the Multiplex. Defaults to
false
. - Map<String>
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the Multiplex resource produces the following output properties:
Look up Existing Multiplex Resource
Get an existing Multiplex resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MultiplexState, opts?: CustomResourceOptions): Multiplex
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
availability_zones: Optional[Sequence[str]] = None,
multiplex_settings: Optional[MultiplexMultiplexSettingsArgs] = None,
name: Optional[str] = None,
start_multiplex: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> Multiplex
func GetMultiplex(ctx *Context, name string, id IDInput, state *MultiplexState, opts ...ResourceOption) (*Multiplex, error)
public static Multiplex Get(string name, Input<string> id, MultiplexState? state, CustomResourceOptions? opts = null)
public static Multiplex get(String name, Output<String> id, MultiplexState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- ARN of the Multiplex.
- Availability
Zones List<string> - A list of availability zones. You must specify exactly two.
- Multiplex
Settings MultiplexMultiplex Settings - Multiplex settings. See Multiplex Settings for more details.
- Name string
name of Multiplex.
The following arguments are optional:
- Start
Multiplex bool - Whether to start the Multiplex. Defaults to
false
. - Dictionary<string, string>
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Arn string
- ARN of the Multiplex.
- Availability
Zones []string - A list of availability zones. You must specify exactly two.
- Multiplex
Settings MultiplexMultiplex Settings Args - Multiplex settings. See Multiplex Settings for more details.
- Name string
name of Multiplex.
The following arguments are optional:
- Start
Multiplex bool - Whether to start the Multiplex. Defaults to
false
. - map[string]string
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- arn String
- ARN of the Multiplex.
- availability
Zones List<String> - A list of availability zones. You must specify exactly two.
- multiplex
Settings MultiplexMultiplex Settings - Multiplex settings. See Multiplex Settings for more details.
- name String
name of Multiplex.
The following arguments are optional:
- start
Multiplex Boolean - Whether to start the Multiplex. Defaults to
false
. - Map<String,String>
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- arn string
- ARN of the Multiplex.
- availability
Zones string[] - A list of availability zones. You must specify exactly two.
- multiplex
Settings MultiplexMultiplex Settings - Multiplex settings. See Multiplex Settings for more details.
- name string
name of Multiplex.
The following arguments are optional:
- start
Multiplex boolean - Whether to start the Multiplex. Defaults to
false
. - {[key: string]: string}
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- arn str
- ARN of the Multiplex.
- availability_
zones Sequence[str] - A list of availability zones. You must specify exactly two.
- multiplex_
settings MultiplexMultiplex Settings Args - Multiplex settings. See Multiplex Settings for more details.
- name str
name of Multiplex.
The following arguments are optional:
- start_
multiplex bool - Whether to start the Multiplex. Defaults to
false
. - Mapping[str, str]
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- arn String
- ARN of the Multiplex.
- availability
Zones List<String> - A list of availability zones. You must specify exactly two.
- multiplex
Settings Property Map - Multiplex settings. See Multiplex Settings for more details.
- name String
name of Multiplex.
The following arguments are optional:
- start
Multiplex Boolean - Whether to start the Multiplex. Defaults to
false
. - Map<String>
- A map of tags to assign to the Multiplex. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
Supporting Types
MultiplexMultiplexSettings, MultiplexMultiplexSettingsArgs
- Transport
Stream intBitrate - Transport stream bit rate.
- Transport
Stream intId - Unique ID for each multiplex.
- Maximum
Video intBuffer Delay Milliseconds - Maximum video buffer delay.
- Transport
Stream intReserved Bitrate - Transport stream reserved bit rate.
- Transport
Stream intBitrate - Transport stream bit rate.
- Transport
Stream intId - Unique ID for each multiplex.
- Maximum
Video intBuffer Delay Milliseconds - Maximum video buffer delay.
- Transport
Stream intReserved Bitrate - Transport stream reserved bit rate.
- transport
Stream IntegerBitrate - Transport stream bit rate.
- transport
Stream IntegerId - Unique ID for each multiplex.
- maximum
Video IntegerBuffer Delay Milliseconds - Maximum video buffer delay.
- transport
Stream IntegerReserved Bitrate - Transport stream reserved bit rate.
- transport
Stream numberBitrate - Transport stream bit rate.
- transport
Stream numberId - Unique ID for each multiplex.
- maximum
Video numberBuffer Delay Milliseconds - Maximum video buffer delay.
- transport
Stream numberReserved Bitrate - Transport stream reserved bit rate.
- transport_
stream_ intbitrate - Transport stream bit rate.
- transport_
stream_ intid - Unique ID for each multiplex.
- maximum_
video_ intbuffer_ delay_ milliseconds - Maximum video buffer delay.
- transport_
stream_ intreserved_ bitrate - Transport stream reserved bit rate.
- transport
Stream NumberBitrate - Transport stream bit rate.
- transport
Stream NumberId - Unique ID for each multiplex.
- maximum
Video NumberBuffer Delay Milliseconds - Maximum video buffer delay.
- transport
Stream NumberReserved Bitrate - Transport stream reserved bit rate.
Import
Using pulumi import
, import MediaLive Multiplex using the id
. For example:
$ pulumi import aws:medialive/multiplex:Multiplex example 12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.