Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.media.kotlin.LiveEventOutput.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.media.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [LiveEventOutput].
*/
@PulumiTagMarker
public class LiveEventOutputResourceBuilder internal constructor() {
public var name: String? = null
public var args: LiveEventOutputArgs = LiveEventOutputArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend LiveEventOutputArgsBuilder.() -> Unit) {
val builder = LiveEventOutputArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): LiveEventOutput {
val builtJavaResource = com.pulumi.azure.media.LiveEventOutput(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return LiveEventOutput(builtJavaResource)
}
}
/**
* Manages a Azure Media Live Event Output.
* ## Example Usage
*
* ```typescript
* 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 exampleAsset = new azure.media.Asset("example", {
* name: "inputAsset",
* resourceGroupName: example.name,
* mediaServicesAccountName: exampleServiceAccount.name,
* });
* const exampleLiveEvent = new azure.media.LiveEvent("example", {
* name: "exampleevent",
* resourceGroupName: example.name,
* location: example.location,
* mediaServicesAccountName: exampleServiceAccount.name,
* description: "My Event Description",
* input: {
* streamingProtocol: "RTMP",
* keyFrameIntervalDuration: "PT6S",
* ipAccessControlAllows: [{
* name: "AllowAll",
* address: "0.0.0.0",
* subnetPrefixLength: 0,
* }],
* },
* });
* const exampleLiveEventOutput = new azure.media.LiveEventOutput("example", {
* name: "exampleoutput",
* liveEventId: exampleLiveEvent.id,
* archiveWindowDuration: "PT5M",
* assetName: exampleAsset.name,
* description: "Test live output 1",
* manifestName: "testmanifest",
* outputSnapTimeInSeconds: 0,
* hlsFragmentsPerTsSegment: 5,
* rewindWindowDuration: "PT5M",
* });
* ```
* ```python
* 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_asset = azure.media.Asset("example",
* name="inputAsset",
* resource_group_name=example.name,
* media_services_account_name=example_service_account.name)
* example_live_event = azure.media.LiveEvent("example",
* name="exampleevent",
* resource_group_name=example.name,
* location=example.location,
* media_services_account_name=example_service_account.name,
* description="My Event Description",
* input={
* "streaming_protocol": "RTMP",
* "key_frame_interval_duration": "PT6S",
* "ip_access_control_allows": [{
* "name": "AllowAll",
* "address": "0.0.0.0",
* "subnet_prefix_length": 0,
* }],
* })
* example_live_event_output = azure.media.LiveEventOutput("example",
* name="exampleoutput",
* live_event_id=example_live_event.id,
* archive_window_duration="PT5M",
* asset_name=example_asset.name,
* description="Test live output 1",
* manifest_name="testmanifest",
* output_snap_time_in_seconds=0,
* hls_fragments_per_ts_segment=5,
* rewind_window_duration="PT5M")
* ```
* ```csharp
* 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 exampleAsset = new Azure.Media.Asset("example", new()
* {
* Name = "inputAsset",
* ResourceGroupName = example.Name,
* MediaServicesAccountName = exampleServiceAccount.Name,
* });
* var exampleLiveEvent = new Azure.Media.LiveEvent("example", new()
* {
* Name = "exampleevent",
* ResourceGroupName = example.Name,
* Location = example.Location,
* MediaServicesAccountName = exampleServiceAccount.Name,
* Description = "My Event Description",
* Input = new Azure.Media.Inputs.LiveEventInputArgs
* {
* StreamingProtocol = "RTMP",
* KeyFrameIntervalDuration = "PT6S",
* IpAccessControlAllows = new[]
* {
* new Azure.Media.Inputs.LiveEventInputIpAccessControlAllowArgs
* {
* Name = "AllowAll",
* Address = "0.0.0.0",
* SubnetPrefixLength = 0,
* },
* },
* },
* });
* var exampleLiveEventOutput = new Azure.Media.LiveEventOutput("example", new()
* {
* Name = "exampleoutput",
* LiveEventId = exampleLiveEvent.Id,
* ArchiveWindowDuration = "PT5M",
* AssetName = exampleAsset.Name,
* Description = "Test live output 1",
* ManifestName = "testmanifest",
* OutputSnapTimeInSeconds = 0,
* HlsFragmentsPerTsSegment = 5,
* RewindWindowDuration = "PT5M",
* });
* });
* ```
* ```go
* 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
* }
* exampleAsset, err := media.NewAsset(ctx, "example", &media.AssetArgs{
* Name: pulumi.String("inputAsset"),
* ResourceGroupName: example.Name,
* MediaServicesAccountName: exampleServiceAccount.Name,
* })
* if err != nil {
* return err
* }
* exampleLiveEvent, err := media.NewLiveEvent(ctx, "example", &media.LiveEventArgs{
* Name: pulumi.String("exampleevent"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* MediaServicesAccountName: exampleServiceAccount.Name,
* Description: pulumi.String("My Event Description"),
* Input: &media.LiveEventInputTypeArgs{
* StreamingProtocol: pulumi.String("RTMP"),
* KeyFrameIntervalDuration: pulumi.String("PT6S"),
* IpAccessControlAllows: media.LiveEventInputIpAccessControlAllowArray{
* &media.LiveEventInputIpAccessControlAllowArgs{
* Name: pulumi.String("AllowAll"),
* Address: pulumi.String("0.0.0.0"),
* SubnetPrefixLength: pulumi.Int(0),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* _, err = media.NewLiveEventOutput(ctx, "example", &media.LiveEventOutputArgs{
* Name: pulumi.String("exampleoutput"),
* LiveEventId: exampleLiveEvent.ID(),
* ArchiveWindowDuration: pulumi.String("PT5M"),
* AssetName: exampleAsset.Name,
* Description: pulumi.String("Test live output 1"),
* ManifestName: pulumi.String("testmanifest"),
* OutputSnapTimeInSeconds: pulumi.Int(0),
* HlsFragmentsPerTsSegment: pulumi.Int(5),
* RewindWindowDuration: pulumi.String("PT5M"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.Asset;
* import com.pulumi.azure.media.AssetArgs;
* import com.pulumi.azure.media.LiveEvent;
* import com.pulumi.azure.media.LiveEventArgs;
* import com.pulumi.azure.media.inputs.LiveEventInputArgs;
* import com.pulumi.azure.media.LiveEventOutput;
* import com.pulumi.azure.media.LiveEventOutputArgs;
* 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 exampleAsset = new Asset("exampleAsset", AssetArgs.builder()
* .name("inputAsset")
* .resourceGroupName(example.name())
* .mediaServicesAccountName(exampleServiceAccount.name())
* .build());
* var exampleLiveEvent = new LiveEvent("exampleLiveEvent", LiveEventArgs.builder()
* .name("exampleevent")
* .resourceGroupName(example.name())
* .location(example.location())
* .mediaServicesAccountName(exampleServiceAccount.name())
* .description("My Event Description")
* .input(LiveEventInputArgs.builder()
* .streamingProtocol("RTMP")
* .keyFrameIntervalDuration("PT6S")
* .ipAccessControlAllows(LiveEventInputIpAccessControlAllowArgs.builder()
* .name("AllowAll")
* .address("0.0.0.0")
* .subnetPrefixLength(0)
* .build())
* .build())
* .build());
* var exampleLiveEventOutput = new LiveEventOutput("exampleLiveEventOutput", LiveEventOutputArgs.builder()
* .name("exampleoutput")
* .liveEventId(exampleLiveEvent.id())
* .archiveWindowDuration("PT5M")
* .assetName(exampleAsset.name())
* .description("Test live output 1")
* .manifestName("testmanifest")
* .outputSnapTimeInSeconds(0)
* .hlsFragmentsPerTsSegment(5)
* .rewindWindowDuration("PT5M")
* .build());
* }
* }
* ```
* ```yaml
* 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
* exampleAsset:
* type: azure:media:Asset
* name: example
* properties:
* name: inputAsset
* resourceGroupName: ${example.name}
* mediaServicesAccountName: ${exampleServiceAccount.name}
* exampleLiveEvent:
* type: azure:media:LiveEvent
* name: example
* properties:
* name: exampleevent
* resourceGroupName: ${example.name}
* location: ${example.location}
* mediaServicesAccountName: ${exampleServiceAccount.name}
* description: My Event Description
* input:
* streamingProtocol: RTMP
* keyFrameIntervalDuration: PT6S
* ipAccessControlAllows:
* - name: AllowAll
* address: 0.0.0.0
* subnetPrefixLength: 0
* exampleLiveEventOutput:
* type: azure:media:LiveEventOutput
* name: example
* properties:
* name: exampleoutput
* liveEventId: ${exampleLiveEvent.id}
* archiveWindowDuration: PT5M
* assetName: ${exampleAsset.name}
* description: Test live output 1
* manifestName: testmanifest
* outputSnapTimeInSeconds: 0
* hlsFragmentsPerTsSegment: 5
* rewindWindowDuration: PT5M
* ```
*
* ## Import
* Live Outputs can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:media/liveEventOutput:LiveEventOutput example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/liveEvents/event1/liveOutputs/output1
* ```
*/
public class LiveEventOutput internal constructor(
override val javaResource: com.pulumi.azure.media.LiveEventOutput,
) : KotlinCustomResource(javaResource, LiveEventOutputMapper) {
/**
* `ISO 8601` time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the asset for this live output. This also sets the maximum content length for the rewind window. For example, use `PT1H30M` to indicate 1 hour and 30 minutes of archive window. Changing this forces a new Live Output to be created.
*/
public val archiveWindowDuration: Output
get() = javaResource.archiveWindowDuration().applyValue({ args0 -> args0 })
/**
* The asset that the live output will write to. Changing this forces a new Live Output to be created.
*/
public val assetName: Output
get() = javaResource.assetName().applyValue({ args0 -> args0 })
/**
* The description of the live output. Changing this forces a new Live Output to be created.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not affect the packing ratio for HLS CMAF output. Changing this forces a new Live Output to be created.
*/
public val hlsFragmentsPerTsSegment: Output?
get() = javaResource.hlsFragmentsPerTsSegment().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The id of the live event. Changing this forces a new Live Output to be created.
*/
public val liveEventId: Output
get() = javaResource.liveEventId().applyValue({ args0 -> args0 })
/**
* The manifest file name. If not provided, the service will generate one automatically. Changing this forces a new Live Output to be created.
*/
public val manifestName: Output
get() = javaResource.manifestName().applyValue({ args0 -> args0 })
/**
* The name which should be used for this Live Event Output. Changing this forces a new Live Output to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The initial timestamp that the live output will start at, any content before this value will not be archived. Changing this forces a new Live Output to be created.
*/
public val outputSnapTimeInSeconds: Output?
get() = javaResource.outputSnapTimeInSeconds().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* `ISO 8601` time between 1 minute to the duration of `archive_window_duration` to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use `PT1H30M` to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL. Changing this forces a new Live Output to be created.
*/
public val rewindWindowDuration: Output?
get() = javaResource.rewindWindowDuration().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object LiveEventOutputMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.media.LiveEventOutput::class == javaResource::class
override fun map(javaResource: Resource): LiveEventOutput = LiveEventOutput(
javaResource as
com.pulumi.azure.media.LiveEventOutput,
)
}
/**
* @see [LiveEventOutput].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [LiveEventOutput].
*/
public suspend fun liveEventOutput(
name: String,
block: suspend LiveEventOutputResourceBuilder.() -> Unit,
): LiveEventOutput {
val builder = LiveEventOutputResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [LiveEventOutput].
* @param name The _unique_ name of the resulting resource.
*/
public fun liveEventOutput(name: String): LiveEventOutput {
val builder = LiveEventOutputResourceBuilder()
builder.name(name)
return builder.build()
}