Live Event
The live event. Azure REST API version: 2022-11-01. Prior API version in Azure Native 1.x: 2020-05-01. Other available API versions: 2018-06-01-preview, 2019-05-01-preview.
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 = "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" },
},
});
});
Content copied to clipboard
package main
import (
"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.LiveEventInputResponse{
AccessControl: interface{}{
Ip: interface{}{
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("RTMP"),
},
LiveEventName: pulumi.String("myLiveEvent1"),
Location: pulumi.String("West US"),
Preview: media.LiveEventPreviewResponse{
AccessControl: interface{}{
Ip: interface{}{
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
})
}
Content copied to clipboard
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 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(Map.ofEntries(
Map.entry("accessControl", Map.of("ip", Map.of("allow", Map.ofEntries(
Map.entry("address", "0.0.0.0"),
Map.entry("name", "AllowAll"),
Map.entry("subnetPrefixLength", 0)
)))),
Map.entry("keyFrameIntervalDuration", "PT6S"),
Map.entry("streamingProtocol", "RTMP")
))
.liveEventName("myLiveEvent1")
.location("West US")
.preview(Map.of("accessControl", Map.of("ip", Map.of("allow", Map.ofEntries(
Map.entry("address", "0.0.0.0"),
Map.entry("name", "AllowAll"),
Map.entry("subnetPrefixLength", 0)
)))))
.resourceGroupName("mediaresources")
.tags(Map.ofEntries(
Map.entry("tag1", "value1"),
Map.entry("tag2", "value2")
))
.build());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
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.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard