1. Packages
  2. AWS
  3. API Docs
  4. medialive
  5. Multiplex
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.medialive.Multiplex

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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={
            "transport_stream_bitrate": 1000000,
            "transport_stream_id": 1,
            "transport_stream_reserved_bitrate": 1,
            "maximum_video_buffer_delay_milliseconds": 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={
            "transport_stream_bitrate": 0,
            "transport_stream_id": 0,
            "maximum_video_buffer_delay_milliseconds": 0,
            "transport_stream_reserved_bitrate": 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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Multiplex resource accepts the following input properties:

    AvailabilityZones List<string>
    A list of availability zones. You must specify exactly two.
    MultiplexSettings MultiplexMultiplexSettings
    Multiplex settings. See Multiplex Settings for more details.
    Name string

    name of Multiplex.

    The following arguments are optional:

    StartMultiplex bool
    Whether to start the Multiplex. Defaults to false.
    Tags 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.
    AvailabilityZones []string
    A list of availability zones. You must specify exactly two.
    MultiplexSettings MultiplexMultiplexSettingsArgs
    Multiplex settings. See Multiplex Settings for more details.
    Name string

    name of Multiplex.

    The following arguments are optional:

    StartMultiplex bool
    Whether to start the Multiplex. Defaults to false.
    Tags 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.
    availabilityZones List<String>
    A list of availability zones. You must specify exactly two.
    multiplexSettings MultiplexMultiplexSettings
    Multiplex settings. See Multiplex Settings for more details.
    name String

    name of Multiplex.

    The following arguments are optional:

    startMultiplex Boolean
    Whether to start the Multiplex. Defaults to false.
    tags 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.
    availabilityZones string[]
    A list of availability zones. You must specify exactly two.
    multiplexSettings MultiplexMultiplexSettings
    Multiplex settings. See Multiplex Settings for more details.
    name string

    name of Multiplex.

    The following arguments are optional:

    startMultiplex boolean
    Whether to start the Multiplex. Defaults to false.
    tags {[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 MultiplexMultiplexSettingsArgs
    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.
    tags 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.
    availabilityZones List<String>
    A list of availability zones. You must specify exactly two.
    multiplexSettings Property Map
    Multiplex settings. See Multiplex Settings for more details.
    name String

    name of Multiplex.

    The following arguments are optional:

    startMultiplex Boolean
    Whether to start the Multiplex. Defaults to false.
    tags 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:

    Arn string
    ARN of the Multiplex.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    ARN of the Multiplex.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    ARN of the Multiplex.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    ARN of the Multiplex.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    ARN of the Multiplex.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    ARN of the Multiplex.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    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.
    The following state arguments are supported:
    Arn string
    ARN of the Multiplex.
    AvailabilityZones List<string>
    A list of availability zones. You must specify exactly two.
    MultiplexSettings MultiplexMultiplexSettings
    Multiplex settings. See Multiplex Settings for more details.
    Name string

    name of Multiplex.

    The following arguments are optional:

    StartMultiplex bool
    Whether to start the Multiplex. Defaults to false.
    Tags 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.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    ARN of the Multiplex.
    AvailabilityZones []string
    A list of availability zones. You must specify exactly two.
    MultiplexSettings MultiplexMultiplexSettingsArgs
    Multiplex settings. See Multiplex Settings for more details.
    Name string

    name of Multiplex.

    The following arguments are optional:

    StartMultiplex bool
    Whether to start the Multiplex. Defaults to false.
    Tags 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.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    ARN of the Multiplex.
    availabilityZones List<String>
    A list of availability zones. You must specify exactly two.
    multiplexSettings MultiplexMultiplexSettings
    Multiplex settings. See Multiplex Settings for more details.
    name String

    name of Multiplex.

    The following arguments are optional:

    startMultiplex Boolean
    Whether to start the Multiplex. Defaults to false.
    tags 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.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    ARN of the Multiplex.
    availabilityZones string[]
    A list of availability zones. You must specify exactly two.
    multiplexSettings MultiplexMultiplexSettings
    Multiplex settings. See Multiplex Settings for more details.
    name string

    name of Multiplex.

    The following arguments are optional:

    startMultiplex boolean
    Whether to start the Multiplex. Defaults to false.
    tags {[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.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    ARN of the Multiplex.
    availability_zones Sequence[str]
    A list of availability zones. You must specify exactly two.
    multiplex_settings MultiplexMultiplexSettingsArgs
    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.
    tags 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.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    ARN of the Multiplex.
    availabilityZones List<String>
    A list of availability zones. You must specify exactly two.
    multiplexSettings Property Map
    Multiplex settings. See Multiplex Settings for more details.
    name String

    name of Multiplex.

    The following arguments are optional:

    startMultiplex Boolean
    Whether to start the Multiplex. Defaults to false.
    tags 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.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Supporting Types

    MultiplexMultiplexSettings, MultiplexMultiplexSettingsArgs

    TransportStreamBitrate int
    Transport stream bit rate.
    TransportStreamId int
    Unique ID for each multiplex.
    MaximumVideoBufferDelayMilliseconds int
    Maximum video buffer delay.
    TransportStreamReservedBitrate int
    Transport stream reserved bit rate.
    TransportStreamBitrate int
    Transport stream bit rate.
    TransportStreamId int
    Unique ID for each multiplex.
    MaximumVideoBufferDelayMilliseconds int
    Maximum video buffer delay.
    TransportStreamReservedBitrate int
    Transport stream reserved bit rate.
    transportStreamBitrate Integer
    Transport stream bit rate.
    transportStreamId Integer
    Unique ID for each multiplex.
    maximumVideoBufferDelayMilliseconds Integer
    Maximum video buffer delay.
    transportStreamReservedBitrate Integer
    Transport stream reserved bit rate.
    transportStreamBitrate number
    Transport stream bit rate.
    transportStreamId number
    Unique ID for each multiplex.
    maximumVideoBufferDelayMilliseconds number
    Maximum video buffer delay.
    transportStreamReservedBitrate number
    Transport stream reserved bit rate.
    transport_stream_bitrate int
    Transport stream bit rate.
    transport_stream_id int
    Unique ID for each multiplex.
    maximum_video_buffer_delay_milliseconds int
    Maximum video buffer delay.
    transport_stream_reserved_bitrate int
    Transport stream reserved bit rate.
    transportStreamBitrate Number
    Transport stream bit rate.
    transportStreamId Number
    Unique ID for each multiplex.
    maximumVideoBufferDelayMilliseconds Number
    Maximum video buffer delay.
    transportStreamReservedBitrate Number
    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.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi