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.mediaservices.kotlin.AccountArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.mediaservices.kotlin
import com.pulumi.azure.mediaservices.AccountArgs.builder
import com.pulumi.azure.mediaservices.kotlin.inputs.AccountEncryptionArgs
import com.pulumi.azure.mediaservices.kotlin.inputs.AccountEncryptionArgsBuilder
import com.pulumi.azure.mediaservices.kotlin.inputs.AccountIdentityArgs
import com.pulumi.azure.mediaservices.kotlin.inputs.AccountIdentityArgsBuilder
import com.pulumi.azure.mediaservices.kotlin.inputs.AccountKeyDeliveryAccessControlArgs
import com.pulumi.azure.mediaservices.kotlin.inputs.AccountKeyDeliveryAccessControlArgsBuilder
import com.pulumi.azure.mediaservices.kotlin.inputs.AccountStorageAccountArgs
import com.pulumi.azure.mediaservices.kotlin.inputs.AccountStorageAccountArgsBuilder
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.Boolean
import kotlin.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Media Services Account.
* ## 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,
* }],
* });
* ```
* ```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,
* }])
* ```
* ```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,
* },
* },
* });
* });
* ```
* ```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
* }
* _, 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
* }
* 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 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());
* }
* }
* ```
* ```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
* ```
*
* ## Import
* Media Services Accounts can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:mediaservices/account:Account account /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/mediaServices/account1
* ```
* @property encryption An `encryption` block as defined below.
* @property identity An `identity` block as defined below.
* @property keyDeliveryAccessControl A `key_delivery_access_control` block as defined below.
* @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
* @property name Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
* @property publicNetworkAccessEnabled Whether public network access is allowed for this server. Defaults to `true`.
* @property resourceGroupName The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.
* @property storageAccounts One or more `storage_account` blocks as defined below.
* @property storageAuthenticationType Specifies the storage authentication type. Possible value is `ManagedIdentity` or `System`.
* @property tags A mapping of tags assigned to the resource.
*/
public data class AccountArgs
@Deprecated(
message = """
azure.mediaservices.Account has been deprecated in favor of azure.media.ServiceAccount
""",
)
constructor(
public val encryption: Output? = null,
public val identity: Output? = null,
public val keyDeliveryAccessControl: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val publicNetworkAccessEnabled: Output? = null,
public val resourceGroupName: Output? = null,
public val storageAccounts: Output>? = null,
public val storageAuthenticationType: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.mediaservices.AccountArgs =
com.pulumi.azure.mediaservices.AccountArgs.builder()
.encryption(encryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.keyDeliveryAccessControl(
keyDeliveryAccessControl?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.storageAccounts(
storageAccounts?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.storageAuthenticationType(storageAuthenticationType?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [AccountArgs].
*/
@PulumiTagMarker
@Deprecated(
message = """
azure.mediaservices.Account has been deprecated in favor of azure.media.ServiceAccount
""",
)
public class AccountArgsBuilder internal constructor() {
private var encryption: Output? = null
private var identity: Output? = null
private var keyDeliveryAccessControl: Output? = null
private var location: Output? = null
private var name: Output? = null
private var publicNetworkAccessEnabled: Output? = null
private var resourceGroupName: Output? = null
private var storageAccounts: Output>? = null
private var storageAuthenticationType: Output? = null
private var tags: Output>? = null
/**
* @param value An `encryption` block as defined below.
*/
@JvmName("gmbgildympkpfknp")
public suspend fun encryption(`value`: Output) {
this.encryption = value
}
/**
* @param value An `identity` block as defined below.
*/
@JvmName("uvkyynmvshiiyhsy")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value A `key_delivery_access_control` block as defined below.
*/
@JvmName("demtvivikyttosrj")
public suspend fun keyDeliveryAccessControl(`value`: Output) {
this.keyDeliveryAccessControl = value
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("kdibrfkdcpvcrocx")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
*/
@JvmName("smewkxulofbufxfy")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Whether public network access is allowed for this server. Defaults to `true`.
*/
@JvmName("ioccwojhdmoodjpg")
public suspend fun publicNetworkAccessEnabled(`value`: Output) {
this.publicNetworkAccessEnabled = value
}
/**
* @param value The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.
*/
@JvmName("carbwtcbiwlhmbje")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value One or more `storage_account` blocks as defined below.
*/
@JvmName("gowtiwarvbmkyfjn")
public suspend fun storageAccounts(`value`: Output>) {
this.storageAccounts = value
}
@JvmName("nbtpybfnunqkqwnn")
public suspend fun storageAccounts(vararg values: Output) {
this.storageAccounts = Output.all(values.asList())
}
/**
* @param values One or more `storage_account` blocks as defined below.
*/
@JvmName("lodorbhkosqeqqni")
public suspend fun storageAccounts(values: List>) {
this.storageAccounts = Output.all(values)
}
/**
* @param value Specifies the storage authentication type. Possible value is `ManagedIdentity` or `System`.
*/
@JvmName("wmevjayuuqahivhf")
public suspend fun storageAuthenticationType(`value`: Output) {
this.storageAuthenticationType = value
}
/**
* @param value A mapping of tags assigned to the resource.
*/
@JvmName("vvyyahbijmcvcqki")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value An `encryption` block as defined below.
*/
@JvmName("vpsthdwsqsasyinn")
public suspend fun encryption(`value`: AccountEncryptionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.encryption = mapped
}
/**
* @param argument An `encryption` block as defined below.
*/
@JvmName("vyrbxlmognveiubv")
public suspend fun encryption(argument: suspend AccountEncryptionArgsBuilder.() -> Unit) {
val toBeMapped = AccountEncryptionArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.encryption = mapped
}
/**
* @param value An `identity` block as defined below.
*/
@JvmName("tpcasmxdoepefivk")
public suspend fun identity(`value`: AccountIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument An `identity` block as defined below.
*/
@JvmName("hiieymjamgadwclx")
public suspend fun identity(argument: suspend AccountIdentityArgsBuilder.() -> Unit) {
val toBeMapped = AccountIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value A `key_delivery_access_control` block as defined below.
*/
@JvmName("kkpwcooxqwwudpjh")
public suspend fun keyDeliveryAccessControl(`value`: AccountKeyDeliveryAccessControlArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keyDeliveryAccessControl = mapped
}
/**
* @param argument A `key_delivery_access_control` block as defined below.
*/
@JvmName("rjqrqmohwsihcvnx")
public suspend fun keyDeliveryAccessControl(argument: suspend AccountKeyDeliveryAccessControlArgsBuilder.() -> Unit) {
val toBeMapped = AccountKeyDeliveryAccessControlArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.keyDeliveryAccessControl = mapped
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("tfkrtewiopxqgqak")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
*/
@JvmName("idducrmfhdefagmw")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Whether public network access is allowed for this server. Defaults to `true`.
*/
@JvmName("hydjmribpahhmotm")
public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicNetworkAccessEnabled = mapped
}
/**
* @param value The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.
*/
@JvmName("rfvwktduvghvttnw")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value One or more `storage_account` blocks as defined below.
*/
@JvmName("qkfhgtxccsychfhw")
public suspend fun storageAccounts(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storageAccounts = mapped
}
/**
* @param argument One or more `storage_account` blocks as defined below.
*/
@JvmName("dtojsftvvkhqvlyp")
public suspend fun storageAccounts(argument: List Unit>) {
val toBeMapped = argument.toList().map {
AccountStorageAccountArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.storageAccounts = mapped
}
/**
* @param argument One or more `storage_account` blocks as defined below.
*/
@JvmName("jnhmtdhsvrlkyhsn")
public suspend fun storageAccounts(vararg argument: suspend AccountStorageAccountArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
AccountStorageAccountArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.storageAccounts = mapped
}
/**
* @param argument One or more `storage_account` blocks as defined below.
*/
@JvmName("jnjfgabaixdumqyv")
public suspend fun storageAccounts(argument: suspend AccountStorageAccountArgsBuilder.() -> Unit) {
val toBeMapped = listOf(AccountStorageAccountArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.storageAccounts = mapped
}
/**
* @param values One or more `storage_account` blocks as defined below.
*/
@JvmName("xrknfvjdhfasqplu")
public suspend fun storageAccounts(vararg values: AccountStorageAccountArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.storageAccounts = mapped
}
/**
* @param value Specifies the storage authentication type. Possible value is `ManagedIdentity` or `System`.
*/
@JvmName("qtrfeqjucyaxxlms")
public suspend fun storageAuthenticationType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storageAuthenticationType = mapped
}
/**
* @param value A mapping of tags assigned to the resource.
*/
@JvmName("hskgxpjhtfemehha")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags assigned to the resource.
*/
@JvmName("opslmobdgtprjlpt")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): AccountArgs = AccountArgs(
encryption = encryption,
identity = identity,
keyDeliveryAccessControl = keyDeliveryAccessControl,
location = location,
name = name,
publicNetworkAccessEnabled = publicNetworkAccessEnabled,
resourceGroupName = resourceGroupName,
storageAccounts = storageAccounts,
storageAuthenticationType = storageAuthenticationType,
tags = tags,
)
}