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.azurenative.media.kotlin.MediaServiceArgs.kt Maven / Gradle / Ivy
Go to download
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.media.kotlin
import com.pulumi.azurenative.media.MediaServiceArgs.builder
import com.pulumi.azurenative.media.kotlin.enums.MinimumTlsVersion
import com.pulumi.azurenative.media.kotlin.enums.PublicNetworkAccess
import com.pulumi.azurenative.media.kotlin.enums.StorageAuthentication
import com.pulumi.azurenative.media.kotlin.inputs.AccountEncryptionArgs
import com.pulumi.azurenative.media.kotlin.inputs.AccountEncryptionArgsBuilder
import com.pulumi.azurenative.media.kotlin.inputs.KeyDeliveryArgs
import com.pulumi.azurenative.media.kotlin.inputs.KeyDeliveryArgsBuilder
import com.pulumi.azurenative.media.kotlin.inputs.MediaServiceIdentityArgs
import com.pulumi.azurenative.media.kotlin.inputs.MediaServiceIdentityArgsBuilder
import com.pulumi.azurenative.media.kotlin.inputs.StorageAccountArgs
import com.pulumi.azurenative.media.kotlin.inputs.StorageAccountArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* A Media Services account.
* Azure REST API version: 2023-01-01. Prior API version in Azure Native 1.x: 2020-05-01.
* Other available API versions: 2015-10-01.
* ## Example Usage
* ### Create a Media Services account
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var mediaService = new AzureNative.Media.MediaService("mediaService", new()
* {
* AccountName = "contososports",
* Location = "South Central US",
* ResourceGroupName = "contosorg",
* StorageAccounts = new[]
* {
* new AzureNative.Media.Inputs.StorageAccountArgs
* {
* Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/teststorageaccount",
* Type = AzureNative.Media.StorageAccountType.Primary,
* },
* },
* Tags =
* {
* { "key1", "value1" },
* { "key2", "value2" },
* },
* });
* });
* ```
* ```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.NewMediaService(ctx, "mediaService", &media.MediaServiceArgs{
* AccountName: pulumi.String("contososports"),
* Location: pulumi.String("South Central US"),
* ResourceGroupName: pulumi.String("contosorg"),
* StorageAccounts: media.StorageAccountArray{
* &media.StorageAccountArgs{
* Id: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/teststorageaccount"),
* Type: pulumi.String(media.StorageAccountTypePrimary),
* },
* },
* Tags: pulumi.StringMap{
* "key1": pulumi.String("value1"),
* "key2": pulumi.String("value2"),
* },
* })
* 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.MediaService;
* import com.pulumi.azurenative.media.MediaServiceArgs;
* import com.pulumi.azurenative.media.inputs.StorageAccountArgs;
* 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 mediaService = new MediaService("mediaService", MediaServiceArgs.builder()
* .accountName("contososports")
* .location("South Central US")
* .resourceGroupName("contosorg")
* .storageAccounts(StorageAccountArgs.builder()
* .id("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/teststorageaccount")
* .type("Primary")
* .build())
* .tags(Map.ofEntries(
* Map.entry("key1", "value1"),
* Map.entry("key2", "value2")
* ))
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:media:MediaService contososports /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}
* ```
* @property accountName The Media Services account name.
* @property encryption The account encryption properties.
* @property identity The Managed Identity for the Media Services account.
* @property keyDelivery The Key Delivery properties for Media Services account.
* @property location The geo-location where the resource lives
* @property minimumTlsVersion The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used.
* @property publicNetworkAccess Whether or not public network access is allowed for resources under the Media Services account.
* @property resourceGroupName The name of the resource group within the Azure subscription.
* @property storageAccounts The storage accounts for this resource.
* @property storageAuthentication
* @property tags Resource tags.
*/
public data class MediaServiceArgs(
public val accountName: Output? = null,
public val encryption: Output? = null,
public val identity: Output? = null,
public val keyDelivery: Output? = null,
public val location: Output? = null,
public val minimumTlsVersion: Output>? = null,
public val publicNetworkAccess: Output>? = null,
public val resourceGroupName: Output? = null,
public val storageAccounts: Output>? = null,
public val storageAuthentication: Output>? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.media.MediaServiceArgs =
com.pulumi.azurenative.media.MediaServiceArgs.builder()
.accountName(accountName?.applyValue({ args0 -> args0 }))
.encryption(encryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.keyDelivery(keyDelivery?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.minimumTlsVersion(
minimumTlsVersion?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.publicNetworkAccess(
publicNetworkAccess?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.storageAccounts(
storageAccounts?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.storageAuthentication(
storageAuthentication?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [MediaServiceArgs].
*/
@PulumiTagMarker
public class MediaServiceArgsBuilder internal constructor() {
private var accountName: Output? = null
private var encryption: Output? = null
private var identity: Output? = null
private var keyDelivery: Output? = null
private var location: Output? = null
private var minimumTlsVersion: Output>? = null
private var publicNetworkAccess: Output>? = null
private var resourceGroupName: Output? = null
private var storageAccounts: Output>? = null
private var storageAuthentication: Output>? = null
private var tags: Output>? = null
/**
* @param value The Media Services account name.
*/
@JvmName("dolkfvxtyglyfxpm")
public suspend fun accountName(`value`: Output) {
this.accountName = value
}
/**
* @param value The account encryption properties.
*/
@JvmName("rxqmbaiqjdsbmndf")
public suspend fun encryption(`value`: Output) {
this.encryption = value
}
/**
* @param value The Managed Identity for the Media Services account.
*/
@JvmName("cypheppyxrqcmwtg")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value The Key Delivery properties for Media Services account.
*/
@JvmName("njxahpjggjrwhuhx")
public suspend fun keyDelivery(`value`: Output) {
this.keyDelivery = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("fatswocyrjtjturt")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used.
*/
@JvmName("bjyjhrwnfcoatakd")
public suspend fun minimumTlsVersion(`value`: Output>) {
this.minimumTlsVersion = value
}
/**
* @param value Whether or not public network access is allowed for resources under the Media Services account.
*/
@JvmName("nwmsgnxbpdkoijwg")
public suspend fun publicNetworkAccess(`value`: Output>) {
this.publicNetworkAccess = value
}
/**
* @param value The name of the resource group within the Azure subscription.
*/
@JvmName("rmkdkakvyvhvncoh")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The storage accounts for this resource.
*/
@JvmName("icuhitcesxnxsbkx")
public suspend fun storageAccounts(`value`: Output>) {
this.storageAccounts = value
}
@JvmName("wthrvdntencktrpu")
public suspend fun storageAccounts(vararg values: Output) {
this.storageAccounts = Output.all(values.asList())
}
/**
* @param values The storage accounts for this resource.
*/
@JvmName("pkiudbkjyuhyspng")
public suspend fun storageAccounts(values: List>) {
this.storageAccounts = Output.all(values)
}
/**
* @param value
*/
@JvmName("ngmulmiomppcjrfh")
public suspend fun storageAuthentication(`value`: Output>) {
this.storageAuthentication = value
}
/**
* @param value Resource tags.
*/
@JvmName("dmnsxkcwktrfrflq")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The Media Services account name.
*/
@JvmName("wofibhjlsrvcyxrn")
public suspend fun accountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountName = mapped
}
/**
* @param value The account encryption properties.
*/
@JvmName("wpaqoqvxcxlmkiwi")
public suspend fun encryption(`value`: AccountEncryptionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.encryption = mapped
}
/**
* @param argument The account encryption properties.
*/
@JvmName("yqmporhssfjhkglr")
public suspend fun encryption(argument: suspend AccountEncryptionArgsBuilder.() -> Unit) {
val toBeMapped = AccountEncryptionArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.encryption = mapped
}
/**
* @param value The Managed Identity for the Media Services account.
*/
@JvmName("oullnouglqmytfcq")
public suspend fun identity(`value`: MediaServiceIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument The Managed Identity for the Media Services account.
*/
@JvmName("bcykibhjwihdrlvn")
public suspend fun identity(argument: suspend MediaServiceIdentityArgsBuilder.() -> Unit) {
val toBeMapped = MediaServiceIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value The Key Delivery properties for Media Services account.
*/
@JvmName("tkufdfuljchcfkqm")
public suspend fun keyDelivery(`value`: KeyDeliveryArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keyDelivery = mapped
}
/**
* @param argument The Key Delivery properties for Media Services account.
*/
@JvmName("etnhnwjodqcyhxhu")
public suspend fun keyDelivery(argument: suspend KeyDeliveryArgsBuilder.() -> Unit) {
val toBeMapped = KeyDeliveryArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.keyDelivery = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("thdpvnnxidshodfk")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used.
*/
@JvmName("skjwkighfcdrnusm")
public suspend fun minimumTlsVersion(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.minimumTlsVersion = mapped
}
/**
* @param value The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used.
*/
@JvmName("dekxnpvfxrpqdwri")
public fun minimumTlsVersion(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.minimumTlsVersion = mapped
}
/**
* @param value The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used.
*/
@JvmName("wgkexmttahwwxtrn")
public fun minimumTlsVersion(`value`: MinimumTlsVersion) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.minimumTlsVersion = mapped
}
/**
* @param value Whether or not public network access is allowed for resources under the Media Services account.
*/
@JvmName("cahamumkpqrgtmff")
public suspend fun publicNetworkAccess(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicNetworkAccess = mapped
}
/**
* @param value Whether or not public network access is allowed for resources under the Media Services account.
*/
@JvmName("lsbugibdxysapbkg")
public fun publicNetworkAccess(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.publicNetworkAccess = mapped
}
/**
* @param value Whether or not public network access is allowed for resources under the Media Services account.
*/
@JvmName("qtmvisrjwmppdveq")
public fun publicNetworkAccess(`value`: PublicNetworkAccess) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.publicNetworkAccess = mapped
}
/**
* @param value The name of the resource group within the Azure subscription.
*/
@JvmName("rddkxqcqxwqubvvf")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The storage accounts for this resource.
*/
@JvmName("sjgsjflrgieijrbe")
public suspend fun storageAccounts(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storageAccounts = mapped
}
/**
* @param argument The storage accounts for this resource.
*/
@JvmName("lchkhhvfrllpnlcl")
public suspend fun storageAccounts(argument: List Unit>) {
val toBeMapped = argument.toList().map {
StorageAccountArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.storageAccounts = mapped
}
/**
* @param argument The storage accounts for this resource.
*/
@JvmName("hjheatsmxungtyix")
public suspend fun storageAccounts(vararg argument: suspend StorageAccountArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
StorageAccountArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.storageAccounts = mapped
}
/**
* @param argument The storage accounts for this resource.
*/
@JvmName("quyikhdkatlrlxnr")
public suspend fun storageAccounts(argument: suspend StorageAccountArgsBuilder.() -> Unit) {
val toBeMapped = listOf(StorageAccountArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.storageAccounts = mapped
}
/**
* @param values The storage accounts for this resource.
*/
@JvmName("cltitipecdecgxmp")
public suspend fun storageAccounts(vararg values: StorageAccountArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.storageAccounts = mapped
}
/**
* @param value
*/
@JvmName("cnystdjioemiiulr")
public suspend fun storageAuthentication(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storageAuthentication = mapped
}
/**
* @param value
*/
@JvmName("veolhjuteegdphib")
public fun storageAuthentication(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.storageAuthentication = mapped
}
/**
* @param value
*/
@JvmName("exiskpamwicxvyeg")
public fun storageAuthentication(`value`: StorageAuthentication) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.storageAuthentication = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("qqvieepovembjyyq")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("fhrthtujybmtglmc")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): MediaServiceArgs = MediaServiceArgs(
accountName = accountName,
encryption = encryption,
identity = identity,
keyDelivery = keyDelivery,
location = location,
minimumTlsVersion = minimumTlsVersion,
publicNetworkAccess = publicNetworkAccess,
resourceGroupName = resourceGroupName,
storageAccounts = storageAccounts,
storageAuthentication = storageAuthentication,
tags = tags,
)
}