All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.media.kotlin.AssetArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.media.kotlin

import com.pulumi.azure.media.AssetArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Manages a Media Asset.
 * ## 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: "Asset1",
 *     resourceGroupName: example.name,
 *     mediaServicesAccountName: exampleServiceAccount.name,
 *     description: "Asset description",
 * });
 * ```
 * ```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="Asset1",
 *     resource_group_name=example.name,
 *     media_services_account_name=example_service_account.name,
 *     description="Asset description")
 * ```
 * ```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 = "Asset1",
 *         ResourceGroupName = example.Name,
 *         MediaServicesAccountName = exampleServiceAccount.Name,
 *         Description = "Asset description",
 *     });
 * });
 * ```
 * ```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
 * 		}
 * 		_, err = media.NewAsset(ctx, "example", &media.AssetArgs{
 * 			Name:                     pulumi.String("Asset1"),
 * 			ResourceGroupName:        example.Name,
 * 			MediaServicesAccountName: exampleServiceAccount.Name,
 * 			Description:              pulumi.String("Asset description"),
 * 		})
 * 		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 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("Asset1")
 *             .resourceGroupName(example.name())
 *             .mediaServicesAccountName(exampleServiceAccount.name())
 *             .description("Asset description")
 *             .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: Asset1
 *       resourceGroupName: ${example.name}
 *       mediaServicesAccountName: ${exampleServiceAccount.name}
 *       description: Asset description
 * ```
 * 
 * ## Import
 * Media Assets can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:media/asset:Asset example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/assets/asset1
 * ```
 * @property alternateId The alternate ID of the Asset.
 * @property container The name of the asset blob container. Changing this forces a new Media Asset to be created.
 * @property description The Asset description.
 * @property mediaServicesAccountName Specifies the name of the Media Services Account. Changing this forces a new Media Asset to be created.
 * @property name The name which should be used for this Media Asset. Changing this forces a new Media Asset to be created.
 * @property resourceGroupName The name of the Resource Group where the Media Asset should exist. Changing this forces a new Media Asset to be created.
 * @property storageAccountName The name of the storage account where to store the media asset. Changing this forces a new Media Asset to be created.
 */
public data class AssetArgs(
    public val alternateId: Output? = null,
    public val container: Output? = null,
    public val description: Output? = null,
    public val mediaServicesAccountName: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val storageAccountName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.media.AssetArgs =
        com.pulumi.azure.media.AssetArgs.builder()
            .alternateId(alternateId?.applyValue({ args0 -> args0 }))
            .container(container?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .mediaServicesAccountName(mediaServicesAccountName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .storageAccountName(storageAccountName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AssetArgs].
 */
@PulumiTagMarker
public class AssetArgsBuilder internal constructor() {
    private var alternateId: Output? = null

    private var container: Output? = null

    private var description: Output? = null

    private var mediaServicesAccountName: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var storageAccountName: Output? = null

    /**
     * @param value The alternate ID of the Asset.
     */
    @JvmName("owvdnareewfncsxx")
    public suspend fun alternateId(`value`: Output) {
        this.alternateId = value
    }

    /**
     * @param value The name of the asset blob container. Changing this forces a new Media Asset to be created.
     */
    @JvmName("ygajbeghrbmbidlw")
    public suspend fun container(`value`: Output) {
        this.container = value
    }

    /**
     * @param value The Asset description.
     */
    @JvmName("oqudvpdlovkvsvrl")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Specifies the name of the Media Services Account. Changing this forces a new Media Asset to be created.
     */
    @JvmName("wlbqerwuuhaukaiq")
    public suspend fun mediaServicesAccountName(`value`: Output) {
        this.mediaServicesAccountName = value
    }

    /**
     * @param value The name which should be used for this Media Asset. Changing this forces a new Media Asset to be created.
     */
    @JvmName("tolqnbkllociruxu")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the Resource Group where the Media Asset should exist. Changing this forces a new Media Asset to be created.
     */
    @JvmName("qdelrnuwrbuedrpg")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the storage account where to store the media asset. Changing this forces a new Media Asset to be created.
     */
    @JvmName("wnuylyebyyagepma")
    public suspend fun storageAccountName(`value`: Output) {
        this.storageAccountName = value
    }

    /**
     * @param value The alternate ID of the Asset.
     */
    @JvmName("hcaivmjyasxknljx")
    public suspend fun alternateId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alternateId = mapped
    }

    /**
     * @param value The name of the asset blob container. Changing this forces a new Media Asset to be created.
     */
    @JvmName("kykeyuvpuigmgxln")
    public suspend fun container(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.container = mapped
    }

    /**
     * @param value The Asset description.
     */
    @JvmName("oeygeahwhrrgjuwo")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Specifies the name of the Media Services Account. Changing this forces a new Media Asset to be created.
     */
    @JvmName("texkpsruxhyyqngw")
    public suspend fun mediaServicesAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mediaServicesAccountName = mapped
    }

    /**
     * @param value The name which should be used for this Media Asset. Changing this forces a new Media Asset to be created.
     */
    @JvmName("vbegoekpvocqfbuk")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The name of the Resource Group where the Media Asset should exist. Changing this forces a new Media Asset to be created.
     */
    @JvmName("lnowbwllacvfkthy")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The name of the storage account where to store the media asset. Changing this forces a new Media Asset to be created.
     */
    @JvmName("hypheaxyumqqlpuh")
    public suspend fun storageAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountName = mapped
    }

    internal fun build(): AssetArgs = AssetArgs(
        alternateId = alternateId,
        container = container,
        description = description,
        mediaServicesAccountName = mediaServicesAccountName,
        name = name,
        resourceGroupName = resourceGroupName,
        storageAccountName = storageAccountName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy