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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.media.kotlin
import com.pulumi.azurenative.media.kotlin.outputs.SystemDataResponse
import com.pulumi.azurenative.media.kotlin.outputs.TransformOutputResponse
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.azurenative.media.kotlin.outputs.SystemDataResponse.Companion.toKotlin as systemDataResponseToKotlin
import com.pulumi.azurenative.media.kotlin.outputs.TransformOutputResponse.Companion.toKotlin as transformOutputResponseToKotlin
/**
* Builder for [Transform].
*/
@PulumiTagMarker
public class TransformResourceBuilder internal constructor() {
public var name: String? = null
public var args: TransformArgs = TransformArgs()
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 TransformArgsBuilder.() -> Unit) {
val builder = TransformArgsBuilder()
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(): Transform {
val builtJavaResource = com.pulumi.azurenative.media.Transform(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Transform(builtJavaResource)
}
}
/**
* A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs.
* Azure REST API version: 2022-07-01. Prior API version in Azure Native 1.x: 2020-05-01.
* ## Example Usage
* ### Create or update a Transform
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var transform = new AzureNative.Media.Transform("transform", new()
* {
* AccountName = "contosomedia",
* Description = "Example Transform to illustrate create and update.",
* Outputs = new[]
* {
* new AzureNative.Media.Inputs.TransformOutputArgs
* {
* Preset = new AzureNative.Media.Inputs.BuiltInStandardEncoderPresetArgs
* {
* OdataType = "#Microsoft.Media.BuiltInStandardEncoderPreset",
* PresetName = AzureNative.Media.EncoderNamedPreset.AdaptiveStreaming,
* },
* },
* },
* ResourceGroupName = "contosoresources",
* TransformName = "createdTransform",
* });
* });
* ```
* ```go
* 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.NewTransform(ctx, "transform", &media.TransformArgs{
* AccountName: pulumi.String("contosomedia"),
* Description: pulumi.String("Example Transform to illustrate create and update."),
* Outputs: media.TransformOutputTypeArray{
* &media.TransformOutputTypeArgs{
* Preset: media.BuiltInStandardEncoderPreset{
* OdataType: "#Microsoft.Media.BuiltInStandardEncoderPreset",
* PresetName: media.EncoderNamedPresetAdaptiveStreaming,
* },
* },
* },
* ResourceGroupName: pulumi.String("contosoresources"),
* TransformName: pulumi.String("createdTransform"),
* })
* 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.azurenative.media.Transform;
* import com.pulumi.azurenative.media.TransformArgs;
* import com.pulumi.azurenative.media.inputs.TransformOutputArgs;
* 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 transform = new Transform("transform", TransformArgs.builder()
* .accountName("contosomedia")
* .description("Example Transform to illustrate create and update.")
* .outputs(TransformOutputArgs.builder()
* .preset(AudioAnalyzerPresetArgs.builder()
* .odataType("#Microsoft.Media.BuiltInStandardEncoderPreset")
* .presetName("AdaptiveStreaming")
* .build())
* .build())
* .resourceGroupName("contosoresources")
* .transformName("createdTransform")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:media:Transform createdTransform /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}
* ```
*/
public class Transform internal constructor(
override val javaResource: com.pulumi.azurenative.media.Transform,
) : KotlinCustomResource(javaResource, TransformMapper) {
/**
* The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format.
*/
public val created: Output
get() = javaResource.created().applyValue({ args0 -> args0 })
/**
* An optional verbose description of the Transform.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format.
*/
public val lastModified: Output
get() = javaResource.lastModified().applyValue({ args0 -> args0 })
/**
* The name of the resource
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* An array of one or more TransformOutputs that the Transform should generate.
*/
public val outputs: Output>
get() = javaResource.outputs().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
transformOutputResponseToKotlin(args0)
})
})
})
/**
* The system metadata relating to this resource.
*/
public val systemData: Output
get() = javaResource.systemData().applyValue({ args0 ->
args0.let({ args0 ->
systemDataResponseToKotlin(args0)
})
})
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
}
public object TransformMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.media.Transform::class == javaResource::class
override fun map(javaResource: Resource): Transform = Transform(
javaResource as
com.pulumi.azurenative.media.Transform,
)
}
/**
* @see [Transform].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Transform].
*/
public suspend fun transform(name: String, block: suspend TransformResourceBuilder.() -> Unit): Transform {
val builder = TransformResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Transform].
* @param name The _unique_ name of the resulting resource.
*/
public fun transform(name: String): Transform {
val builder = TransformResourceBuilder()
builder.name(name)
return builder.build()
}