Live Event Args
The live event. Uses Azure REST API version 2022-11-01. In version 2.x of the Azure Native provider, it used API version 2022-11-01. Other available API versions: 2018-03-30-preview, 2018-06-01-preview, 2018-07-01, 2019-05-01-preview, 2020-05-01, 2021-06-01, 2021-11-01, 2022-08-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native media [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create a LiveEvent
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var liveEvent = new AzureNative.Media.LiveEvent("liveEvent", new()
{
AccountName = "slitestmedia10",
Description = "test event 1",
Input = new AzureNative.Media.Inputs.LiveEventInputArgs
{
AccessControl = new AzureNative.Media.Inputs.LiveEventInputAccessControlArgs
{
Ip = new AzureNative.Media.Inputs.IPAccessControlArgs
{
Allow = new[]
{
new AzureNative.Media.Inputs.IPRangeArgs
{
Address = "0.0.0.0",
Name = "AllowAll",
SubnetPrefixLength = 0,
},
},
},
},
KeyFrameIntervalDuration = "PT6S",
StreamingProtocol = AzureNative.Media.LiveEventInputProtocol.RTMP,
},
LiveEventName = "myLiveEvent1",
Location = "West US",
Preview = new AzureNative.Media.Inputs.LiveEventPreviewArgs
{
AccessControl = new AzureNative.Media.Inputs.LiveEventPreviewAccessControlArgs
{
Ip = new AzureNative.Media.Inputs.IPAccessControlArgs
{
Allow = new[]
{
new AzureNative.Media.Inputs.IPRangeArgs
{
Address = "0.0.0.0",
Name = "AllowAll",
SubnetPrefixLength = 0,
},
},
},
},
},
ResourceGroupName = "mediaresources",
Tags =
{
{ "tag1", "value1" },
{ "tag2", "value2" },
},
});
});
package main
import (
media "github.com/pulumi/pulumi-azure-native-sdk/media/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := media.NewLiveEvent(ctx, "liveEvent", &media.LiveEventArgs{
AccountName: pulumi.String("slitestmedia10"),
Description: pulumi.String("test event 1"),
Input: &media.LiveEventInputTypeArgs{
AccessControl: &media.LiveEventInputAccessControlArgs{
Ip: &media.IPAccessControlArgs{
Allow: media.IPRangeArray{
&media.IPRangeArgs{
Address: pulumi.String("0.0.0.0"),
Name: pulumi.String("AllowAll"),
SubnetPrefixLength: pulumi.Int(0),
},
},
},
},
KeyFrameIntervalDuration: pulumi.String("PT6S"),
StreamingProtocol: pulumi.String(media.LiveEventInputProtocolRTMP),
},
LiveEventName: pulumi.String("myLiveEvent1"),
Location: pulumi.String("West US"),
Preview: &media.LiveEventPreviewArgs{
AccessControl: &media.LiveEventPreviewAccessControlArgs{
Ip: &media.IPAccessControlArgs{
Allow: media.IPRangeArray{
&media.IPRangeArgs{
Address: pulumi.String("0.0.0.0"),
Name: pulumi.String("AllowAll"),
SubnetPrefixLength: pulumi.Int(0),
},
},
},
},
},
ResourceGroupName: pulumi.String("mediaresources"),
Tags: pulumi.StringMap{
"tag1": pulumi.String("value1"),
"tag2": pulumi.String("value2"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.media.LiveEvent;
import com.pulumi.azurenative.media.LiveEventArgs;
import com.pulumi.azurenative.media.inputs.LiveEventInputArgs;
import com.pulumi.azurenative.media.inputs.LiveEventInputAccessControlArgs;
import com.pulumi.azurenative.media.inputs.IPAccessControlArgs;
import com.pulumi.azurenative.media.inputs.LiveEventPreviewArgs;
import com.pulumi.azurenative.media.inputs.LiveEventPreviewAccessControlArgs;
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) {
var liveEvent = new LiveEvent("liveEvent", LiveEventArgs.builder()
.accountName("slitestmedia10")
.description("test event 1")
.input(LiveEventInputArgs.builder()
.accessControl(LiveEventInputAccessControlArgs.builder()
.ip(IPAccessControlArgs.builder()
.allow(IPRangeArgs.builder()
.address("0.0.0.0")
.name("AllowAll")
.subnetPrefixLength(0)
.build())
.build())
.build())
.keyFrameIntervalDuration("PT6S")
.streamingProtocol("RTMP")
.build())
.liveEventName("myLiveEvent1")
.location("West US")
.preview(LiveEventPreviewArgs.builder()
.accessControl(LiveEventPreviewAccessControlArgs.builder()
.ip(IPAccessControlArgs.builder()
.allow(IPRangeArgs.builder()
.address("0.0.0.0")
.name("AllowAll")
.subnetPrefixLength(0)
.build())
.build())
.build())
.build())
.resourceGroupName("mediaresources")
.tags(Map.ofEntries(
Map.entry("tag1", "value1"),
Map.entry("tag2", "value2")
))
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:media:LiveEvent myLiveEvent1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}
Constructors
Properties
The Media Services account name.
Live event cross site access policies.
A description for the live event.
Encoding settings for the live event. It configures whether a live encoder is used for the live event and settings for the live encoder if it is used.
When useStaticHostname is set to true, the hostnamePrefix specifies the first part of the hostname assigned to the live event preview and ingest endpoints. The final hostname would be a combination of this prefix, the media service account name and a short code for the Azure Media Services data center.
Live event input settings. It defines how the live event receives input from a contribution encoder.
The name of the live event, maximum length is 32.
Live event preview settings. Preview allows live event producers to preview the live streaming content without creating any live output.
The name of the resource group within the Azure subscription.
The options to use for the LiveEvent. This value is specified at creation time and cannot be updated. The valid values for the array entry values are 'Default' and 'LowLatency'.
Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature.
Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. This value can only be updated if the live event is in Standby state