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

com.pulumi.azure.videoanalyzer.kotlin.EdgeModuleArgs.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.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.videoanalyzer.kotlin

import com.pulumi.azure.videoanalyzer.EdgeModuleArgs.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 Video Analyzer Edge Module.
 * !> Video Analyzer (Preview) is now Deprecated and will be Retired on 2022-11-30 - as such the `azure.videoanalyzer.EdgeModule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "video-analyzer-resources",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplestoracc",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "GRS",
 * });
 * const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
 *     name: "exampleidentity",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * const contributor = new azure.authorization.Assignment("contributor", {
 *     scope: exampleAccount.id,
 *     roleDefinitionName: "Storage Blob Data Contributor",
 *     principalId: exampleUserAssignedIdentity.principalId,
 * });
 * const reader = new azure.authorization.Assignment("reader", {
 *     scope: exampleAccount.id,
 *     roleDefinitionName: "Reader",
 *     principalId: exampleUserAssignedIdentity.principalId,
 * });
 * const exampleAnalyzer = new azure.videoanalyzer.Analyzer("example", {
 *     name: "exampleanalyzer",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     storageAccount: {
 *         id: exampleAccount.id,
 *         userAssignedIdentityId: exampleUserAssignedIdentity.id,
 *     },
 *     identity: {
 *         type: "UserAssigned",
 *         identityIds: [exampleUserAssignedIdentity.id],
 *     },
 *     tags: {
 *         environment: "staging",
 *     },
 * }, {
 *     dependsOn: [
 *         exampleUserAssignedIdentity,
 *         contributor,
 *         reader,
 *     ],
 * });
 * const exampleEdgeModule = new azure.videoanalyzer.EdgeModule("example", {
 *     name: "example-edge-module",
 *     resourceGroupName: example.name,
 *     videoAnalyzerName: exampleAnalyzer.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="video-analyzer-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_user_assigned_identity = azure.authorization.UserAssignedIdentity("example",
 *     name="exampleidentity",
 *     resource_group_name=example.name,
 *     location=example.location)
 * contributor = azure.authorization.Assignment("contributor",
 *     scope=example_account.id,
 *     role_definition_name="Storage Blob Data Contributor",
 *     principal_id=example_user_assigned_identity.principal_id)
 * reader = azure.authorization.Assignment("reader",
 *     scope=example_account.id,
 *     role_definition_name="Reader",
 *     principal_id=example_user_assigned_identity.principal_id)
 * example_analyzer = azure.videoanalyzer.Analyzer("example",
 *     name="exampleanalyzer",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     storage_account={
 *         "id": example_account.id,
 *         "user_assigned_identity_id": example_user_assigned_identity.id,
 *     },
 *     identity={
 *         "type": "UserAssigned",
 *         "identity_ids": [example_user_assigned_identity.id],
 *     },
 *     tags={
 *         "environment": "staging",
 *     },
 *     opts = pulumi.ResourceOptions(depends_on=[
 *             example_user_assigned_identity,
 *             contributor,
 *             reader,
 *         ]))
 * example_edge_module = azure.videoanalyzer.EdgeModule("example",
 *     name="example-edge-module",
 *     resource_group_name=example.name,
 *     video_analyzer_name=example_analyzer.name)
 * ```
 * ```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 = "video-analyzer-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 exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("example", new()
 *     {
 *         Name = "exampleidentity",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *     });
 *     var contributor = new Azure.Authorization.Assignment("contributor", new()
 *     {
 *         Scope = exampleAccount.Id,
 *         RoleDefinitionName = "Storage Blob Data Contributor",
 *         PrincipalId = exampleUserAssignedIdentity.PrincipalId,
 *     });
 *     var reader = new Azure.Authorization.Assignment("reader", new()
 *     {
 *         Scope = exampleAccount.Id,
 *         RoleDefinitionName = "Reader",
 *         PrincipalId = exampleUserAssignedIdentity.PrincipalId,
 *     });
 *     var exampleAnalyzer = new Azure.VideoAnalyzer.Analyzer("example", new()
 *     {
 *         Name = "exampleanalyzer",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         StorageAccount = new Azure.VideoAnalyzer.Inputs.AnalyzerStorageAccountArgs
 *         {
 *             Id = exampleAccount.Id,
 *             UserAssignedIdentityId = exampleUserAssignedIdentity.Id,
 *         },
 *         Identity = new Azure.VideoAnalyzer.Inputs.AnalyzerIdentityArgs
 *         {
 *             Type = "UserAssigned",
 *             IdentityIds = new[]
 *             {
 *                 exampleUserAssignedIdentity.Id,
 *             },
 *         },
 *         Tags =
 *         {
 *             { "environment", "staging" },
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             exampleUserAssignedIdentity,
 *             contributor,
 *             reader,
 *         },
 *     });
 *     var exampleEdgeModule = new Azure.VideoAnalyzer.EdgeModule("example", new()
 *     {
 *         Name = "example-edge-module",
 *         ResourceGroupName = example.Name,
 *         VideoAnalyzerName = exampleAnalyzer.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/videoanalyzer"
 * 	"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("video-analyzer-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
 * 		}
 * 		exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
 * 			Name:              pulumi.String("exampleidentity"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		contributor, err := authorization.NewAssignment(ctx, "contributor", &authorization.AssignmentArgs{
 * 			Scope:              exampleAccount.ID(),
 * 			RoleDefinitionName: pulumi.String("Storage Blob Data Contributor"),
 * 			PrincipalId:        exampleUserAssignedIdentity.PrincipalId,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		reader, err := authorization.NewAssignment(ctx, "reader", &authorization.AssignmentArgs{
 * 			Scope:              exampleAccount.ID(),
 * 			RoleDefinitionName: pulumi.String("Reader"),
 * 			PrincipalId:        exampleUserAssignedIdentity.PrincipalId,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAnalyzer, err := videoanalyzer.NewAnalyzer(ctx, "example", &videoanalyzer.AnalyzerArgs{
 * 			Name:              pulumi.String("exampleanalyzer"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			StorageAccount: &videoanalyzer.AnalyzerStorageAccountArgs{
 * 				Id:                     exampleAccount.ID(),
 * 				UserAssignedIdentityId: exampleUserAssignedIdentity.ID(),
 * 			},
 * 			Identity: &videoanalyzer.AnalyzerIdentityArgs{
 * 				Type: pulumi.String("UserAssigned"),
 * 				IdentityIds: pulumi.StringArray{
 * 					exampleUserAssignedIdentity.ID(),
 * 				},
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("staging"),
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			exampleUserAssignedIdentity,
 * 			contributor,
 * 			reader,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = videoanalyzer.NewEdgeModule(ctx, "example", &videoanalyzer.EdgeModuleArgs{
 * 			Name:              pulumi.String("example-edge-module"),
 * 			ResourceGroupName: example.Name,
 * 			VideoAnalyzerName: exampleAnalyzer.Name,
 * 		})
 * 		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.authorization.UserAssignedIdentity;
 * import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
 * import com.pulumi.azure.authorization.Assignment;
 * import com.pulumi.azure.authorization.AssignmentArgs;
 * import com.pulumi.azure.videoanalyzer.Analyzer;
 * import com.pulumi.azure.videoanalyzer.AnalyzerArgs;
 * import com.pulumi.azure.videoanalyzer.inputs.AnalyzerStorageAccountArgs;
 * import com.pulumi.azure.videoanalyzer.inputs.AnalyzerIdentityArgs;
 * import com.pulumi.azure.videoanalyzer.EdgeModule;
 * import com.pulumi.azure.videoanalyzer.EdgeModuleArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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("video-analyzer-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 exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
 *             .name("exampleidentity")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 *         var contributor = new Assignment("contributor", AssignmentArgs.builder()
 *             .scope(exampleAccount.id())
 *             .roleDefinitionName("Storage Blob Data Contributor")
 *             .principalId(exampleUserAssignedIdentity.principalId())
 *             .build());
 *         var reader = new Assignment("reader", AssignmentArgs.builder()
 *             .scope(exampleAccount.id())
 *             .roleDefinitionName("Reader")
 *             .principalId(exampleUserAssignedIdentity.principalId())
 *             .build());
 *         var exampleAnalyzer = new Analyzer("exampleAnalyzer", AnalyzerArgs.builder()
 *             .name("exampleanalyzer")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .storageAccount(AnalyzerStorageAccountArgs.builder()
 *                 .id(exampleAccount.id())
 *                 .userAssignedIdentityId(exampleUserAssignedIdentity.id())
 *                 .build())
 *             .identity(AnalyzerIdentityArgs.builder()
 *                 .type("UserAssigned")
 *                 .identityIds(exampleUserAssignedIdentity.id())
 *                 .build())
 *             .tags(Map.of("environment", "staging"))
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(
 *                     exampleUserAssignedIdentity,
 *                     contributor,
 *                     reader)
 *                 .build());
 *         var exampleEdgeModule = new EdgeModule("exampleEdgeModule", EdgeModuleArgs.builder()
 *             .name("example-edge-module")
 *             .resourceGroupName(example.name())
 *             .videoAnalyzerName(exampleAnalyzer.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: video-analyzer-resources
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:storage:Account
 *     name: example
 *     properties:
 *       name: examplestoracc
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountReplicationType: GRS
 *   exampleUserAssignedIdentity:
 *     type: azure:authorization:UserAssignedIdentity
 *     name: example
 *     properties:
 *       name: exampleidentity
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *   contributor:
 *     type: azure:authorization:Assignment
 *     properties:
 *       scope: ${exampleAccount.id}
 *       roleDefinitionName: Storage Blob Data Contributor
 *       principalId: ${exampleUserAssignedIdentity.principalId}
 *   reader:
 *     type: azure:authorization:Assignment
 *     properties:
 *       scope: ${exampleAccount.id}
 *       roleDefinitionName: Reader
 *       principalId: ${exampleUserAssignedIdentity.principalId}
 *   exampleAnalyzer:
 *     type: azure:videoanalyzer:Analyzer
 *     name: example
 *     properties:
 *       name: exampleanalyzer
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       storageAccount:
 *         id: ${exampleAccount.id}
 *         userAssignedIdentityId: ${exampleUserAssignedIdentity.id}
 *       identity:
 *         type: UserAssigned
 *         identityIds:
 *           - ${exampleUserAssignedIdentity.id}
 *       tags:
 *         environment: staging
 *     options:
 *       dependson:
 *         - ${exampleUserAssignedIdentity}
 *         - ${contributor}
 *         - ${reader}
 *   exampleEdgeModule:
 *     type: azure:videoanalyzer:EdgeModule
 *     name: example
 *     properties:
 *       name: example-edge-module
 *       resourceGroupName: ${example.name}
 *       videoAnalyzerName: ${exampleAnalyzer.name}
 * ```
 * 
 * ## Import
 * Video Analyzer Edge Module can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:videoanalyzer/edgeModule:EdgeModule edge /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/videoAnalyzers/analyzer1/edgeModules/edge1
 * ```
 * @property name Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
 * @property videoAnalyzerName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
 */
public data class EdgeModuleArgs(
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val videoAnalyzerName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.videoanalyzer.EdgeModuleArgs =
        com.pulumi.azure.videoanalyzer.EdgeModuleArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .videoAnalyzerName(videoAnalyzerName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EdgeModuleArgs].
 */
@PulumiTagMarker
public class EdgeModuleArgsBuilder internal constructor() {
    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var videoAnalyzerName: Output? = null

    /**
     * @param value Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
     */
    @JvmName("phmbykmiqwiyhmnq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
     */
    @JvmName("iavleqyvacojbjhk")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
     */
    @JvmName("yhumlijfdcxnbqbc")
    public suspend fun videoAnalyzerName(`value`: Output) {
        this.videoAnalyzerName = value
    }

    /**
     * @param value Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
     */
    @JvmName("twgffmfncfqbfxas")
    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 in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
     */
    @JvmName("bbgiwbsexhqrhaja")
    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 Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
     */
    @JvmName("xuhiwdmjxokiysjf")
    public suspend fun videoAnalyzerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.videoAnalyzerName = mapped
    }

    internal fun build(): EdgeModuleArgs = EdgeModuleArgs(
        name = name,
        resourceGroupName = resourceGroupName,
        videoAnalyzerName = videoAnalyzerName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy