LiveEventArgs

data class LiveEventArgs(val autoStartEnabled: Output<Boolean>? = null, val crossSiteAccessPolicy: Output<LiveEventCrossSiteAccessPolicyArgs>? = null, val description: Output<String>? = null, val encoding: Output<LiveEventEncodingArgs>? = null, val hostnamePrefix: Output<String>? = null, val input: Output<LiveEventInputArgs>? = null, val location: Output<String>? = null, val mediaServicesAccountName: Output<String>? = null, val name: Output<String>? = null, val preview: Output<LiveEventPreviewArgs>? = null, val resourceGroupName: Output<String>? = null, val streamOptions: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null, val transcriptionLanguages: Output<List<String>>? = null, val useStaticHostname: Output<Boolean>? = null) : ConvertibleToJava<LiveEventArgs>

Manages a Live Event.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "media-resources",
location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
name: "examplestoracc",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleServiceAccount = new azure.media.ServiceAccount("example", {
name: "examplemediaacc",
location: example.location,
resourceGroupName: example.name,
storageAccounts: [{
id: exampleAccount.id,
isPrimary: true,
}],
});
const exampleLiveEvent = new azure.media.LiveEvent("example", {
name: "example",
resourceGroupName: example.name,
location: example.location,
mediaServicesAccountName: exampleServiceAccount.name,
description: "My Event Description",
input: {
streamingProtocol: "RTMP",
ipAccessControlAllows: [{
name: "AllowAll",
address: "0.0.0.0",
subnetPrefixLength: 0,
}],
},
encoding: {
type: "Standard",
presetName: "Default720p",
stretchMode: "AutoFit",
keyFrameInterval: "PT2S",
},
preview: {
ipAccessControlAllows: [{
name: "AllowAll",
address: "0.0.0.0",
subnetPrefixLength: 0,
}],
},
streamOptions: ["LowLatency"],
useStaticHostname: true,
hostnamePrefix: "special-event",
transcriptionLanguages: ["en-US"],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="media-resources",
location="West Europe")
example_account = azure.storage.Account("example",
name="examplestoracc",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="GRS")
example_service_account = azure.media.ServiceAccount("example",
name="examplemediaacc",
location=example.location,
resource_group_name=example.name,
storage_accounts=[{
"id": example_account.id,
"is_primary": True,
}])
example_live_event = azure.media.LiveEvent("example",
name="example",
resource_group_name=example.name,
location=example.location,
media_services_account_name=example_service_account.name,
description="My Event Description",
input={
"streaming_protocol": "RTMP",
"ip_access_control_allows": [{
"name": "AllowAll",
"address": "0.0.0.0",
"subnet_prefix_length": 0,
}],
},
encoding={
"type": "Standard",
"preset_name": "Default720p",
"stretch_mode": "AutoFit",
"key_frame_interval": "PT2S",
},
preview={
"ip_access_control_allows": [{
"name": "AllowAll",
"address": "0.0.0.0",
"subnet_prefix_length": 0,
}],
},
stream_options=["LowLatency"],
use_static_hostname=True,
hostname_prefix="special-event",
transcription_languages=["en-US"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "media-resources",
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "examplestoracc",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "GRS",
});
var exampleServiceAccount = new Azure.Media.ServiceAccount("example", new()
{
Name = "examplemediaacc",
Location = example.Location,
ResourceGroupName = example.Name,
StorageAccounts = new[]
{
new Azure.Media.Inputs.ServiceAccountStorageAccountArgs
{
Id = exampleAccount.Id,
IsPrimary = true,
},
},
});
var exampleLiveEvent = new Azure.Media.LiveEvent("example", new()
{
Name = "example",
ResourceGroupName = example.Name,
Location = example.Location,
MediaServicesAccountName = exampleServiceAccount.Name,
Description = "My Event Description",
Input = new Azure.Media.Inputs.LiveEventInputArgs
{
StreamingProtocol = "RTMP",
IpAccessControlAllows = new[]
{
new Azure.Media.Inputs.LiveEventInputIpAccessControlAllowArgs
{
Name = "AllowAll",
Address = "0.0.0.0",
SubnetPrefixLength = 0,
},
},
},
Encoding = new Azure.Media.Inputs.LiveEventEncodingArgs
{
Type = "Standard",
PresetName = "Default720p",
StretchMode = "AutoFit",
KeyFrameInterval = "PT2S",
},
Preview = new Azure.Media.Inputs.LiveEventPreviewArgs
{
IpAccessControlAllows = new[]
{
new Azure.Media.Inputs.LiveEventPreviewIpAccessControlAllowArgs
{
Name = "AllowAll",
Address = "0.0.0.0",
SubnetPrefixLength = 0,
},
},
},
StreamOptions = new[]
{
"LowLatency",
},
UseStaticHostname = true,
HostnamePrefix = "special-event",
TranscriptionLanguages = new[]
{
"en-US",
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/media"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("media-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("examplestoracc"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("GRS"),
})
if err != nil {
return err
}
exampleServiceAccount, err := media.NewServiceAccount(ctx, "example", &media.ServiceAccountArgs{
Name: pulumi.String("examplemediaacc"),
Location: example.Location,
ResourceGroupName: example.Name,
StorageAccounts: media.ServiceAccountStorageAccountArray{
&media.ServiceAccountStorageAccountArgs{
Id: exampleAccount.ID(),
IsPrimary: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
_, err = media.NewLiveEvent(ctx, "example", &media.LiveEventArgs{
Name: pulumi.String("example"),
ResourceGroupName: example.Name,
Location: example.Location,
MediaServicesAccountName: exampleServiceAccount.Name,
Description: pulumi.String("My Event Description"),
Input: &media.LiveEventInputTypeArgs{
StreamingProtocol: pulumi.String("RTMP"),
IpAccessControlAllows: media.LiveEventInputIpAccessControlAllowArray{
&media.LiveEventInputIpAccessControlAllowArgs{
Name: pulumi.String("AllowAll"),
Address: pulumi.String("0.0.0.0"),
SubnetPrefixLength: pulumi.Int(0),
},
},
},
Encoding: &media.LiveEventEncodingArgs{
Type: pulumi.String("Standard"),
PresetName: pulumi.String("Default720p"),
StretchMode: pulumi.String("AutoFit"),
KeyFrameInterval: pulumi.String("PT2S"),
},
Preview: &media.LiveEventPreviewArgs{
IpAccessControlAllows: media.LiveEventPreviewIpAccessControlAllowArray{
&media.LiveEventPreviewIpAccessControlAllowArgs{
Name: pulumi.String("AllowAll"),
Address: pulumi.String("0.0.0.0"),
SubnetPrefixLength: pulumi.Int(0),
},
},
},
StreamOptions: pulumi.StringArray{
pulumi.String("LowLatency"),
},
UseStaticHostname: pulumi.Bool(true),
HostnamePrefix: pulumi.String("special-event"),
TranscriptionLanguages: pulumi.StringArray{
pulumi.String("en-US"),
},
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.media.ServiceAccount;
import com.pulumi.azure.media.ServiceAccountArgs;
import com.pulumi.azure.media.inputs.ServiceAccountStorageAccountArgs;
import com.pulumi.azure.media.LiveEvent;
import com.pulumi.azure.media.LiveEventArgs;
import com.pulumi.azure.media.inputs.LiveEventInputArgs;
import com.pulumi.azure.media.inputs.LiveEventEncodingArgs;
import com.pulumi.azure.media.inputs.LiveEventPreviewArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("media-resources")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("examplestoracc")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("GRS")
.build());
var exampleServiceAccount = new ServiceAccount("exampleServiceAccount", ServiceAccountArgs.builder()
.name("examplemediaacc")
.location(example.location())
.resourceGroupName(example.name())
.storageAccounts(ServiceAccountStorageAccountArgs.builder()
.id(exampleAccount.id())
.isPrimary(true)
.build())
.build());
var exampleLiveEvent = new LiveEvent("exampleLiveEvent", LiveEventArgs.builder()
.name("example")
.resourceGroupName(example.name())
.location(example.location())
.mediaServicesAccountName(exampleServiceAccount.name())
.description("My Event Description")
.input(LiveEventInputArgs.builder()
.streamingProtocol("RTMP")
.ipAccessControlAllows(LiveEventInputIpAccessControlAllowArgs.builder()
.name("AllowAll")
.address("0.0.0.0")
.subnetPrefixLength(0)
.build())
.build())
.encoding(LiveEventEncodingArgs.builder()
.type("Standard")
.presetName("Default720p")
.stretchMode("AutoFit")
.keyFrameInterval("PT2S")
.build())
.preview(LiveEventPreviewArgs.builder()
.ipAccessControlAllows(LiveEventPreviewIpAccessControlAllowArgs.builder()
.name("AllowAll")
.address("0.0.0.0")
.subnetPrefixLength(0)
.build())
.build())
.streamOptions("LowLatency")
.useStaticHostname(true)
.hostnamePrefix("special-event")
.transcriptionLanguages("en-US")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: media-resources
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: examplestoracc
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: GRS
exampleServiceAccount:
type: azure:media:ServiceAccount
name: example
properties:
name: examplemediaacc
location: ${example.location}
resourceGroupName: ${example.name}
storageAccounts:
- id: ${exampleAccount.id}
isPrimary: true
exampleLiveEvent:
type: azure:media:LiveEvent
name: example
properties:
name: example
resourceGroupName: ${example.name}
location: ${example.location}
mediaServicesAccountName: ${exampleServiceAccount.name}
description: My Event Description
input:
streamingProtocol: RTMP
ipAccessControlAllows:
- name: AllowAll
address: 0.0.0.0
subnetPrefixLength: 0
encoding:
type: Standard
presetName: Default720p
stretchMode: AutoFit
keyFrameInterval: PT2S
preview:
ipAccessControlAllows:
- name: AllowAll
address: 0.0.0.0
subnetPrefixLength: 0
streamOptions:
- LowLatency
useStaticHostname: true
hostnamePrefix: special-event
transcriptionLanguages:
- en-US

Import

Live Events can be imported using the resource id, e.g.

$ pulumi import azure:media/liveEvent:LiveEvent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Media/mediaServices/account1/liveEvents/event1

Constructors

Link copied to clipboard
constructor(autoStartEnabled: Output<Boolean>? = null, crossSiteAccessPolicy: Output<LiveEventCrossSiteAccessPolicyArgs>? = null, description: Output<String>? = null, encoding: Output<LiveEventEncodingArgs>? = null, hostnamePrefix: Output<String>? = null, input: Output<LiveEventInputArgs>? = null, location: Output<String>? = null, mediaServicesAccountName: Output<String>? = null, name: Output<String>? = null, preview: Output<LiveEventPreviewArgs>? = null, resourceGroupName: Output<String>? = null, streamOptions: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null, transcriptionLanguages: Output<List<String>>? = null, useStaticHostname: Output<Boolean>? = null)

Properties

Link copied to clipboard
val autoStartEnabled: Output<Boolean>? = null

The flag indicates if the resource should be automatically started on creation. Changing this forces a new resource to be created.

Link copied to clipboard

A cross_site_access_policy block as defined below.

Link copied to clipboard
val description: Output<String>? = null

A description for the live event.

Link copied to clipboard
val encoding: Output<LiveEventEncodingArgs>? = null

A encoding block as defined below.

Link copied to clipboard
val hostnamePrefix: Output<String>? = null

When use_static_hostname is set to true, the hostname_prefix 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
val input: Output<LiveEventInputArgs>? = null

A input block as defined below.

Link copied to clipboard
val location: Output<String>? = null

The Azure Region where the Live Event should exist. Changing this forces a new Live Event to be created.

Link copied to clipboard
val mediaServicesAccountName: Output<String>? = null

The Media Services account name. Changing this forces a new Live Event to be created.

Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this Live Event. Changing this forces a new Live Event to be created.

Link copied to clipboard
val preview: Output<LiveEventPreviewArgs>? = null

A preview block as defined below.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the Resource Group where the Live Event should exist. Changing this forces a new Live Event to be created.

Link copied to clipboard
val streamOptions: Output<List<String>>? = null

A list of options to use for the LiveEvent. Possible values are Default, LowLatency, LowLatencyV2. Please see more at this document. Changing this forces a new resource to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags which should be assigned to the Live Event.

Link copied to clipboard
val transcriptionLanguages: Output<List<String>>? = null

Specifies a list of languages (locale) to be used for speech-to-text transcription – it should match the spoken language in the audio track. The value should be in BCP-47 format (e.g: en-US). See the Microsoft Documentation for more information about the live transcription feature and the list of supported languages.

Link copied to clipboard
val useStaticHostname: Output<Boolean>? = null

Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. Changing this forces a new Live Event to be created.

Functions

Link copied to clipboard
open override fun toJava(): LiveEventArgs