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.videoanalyzer.kotlin.AnalyzerArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.videoanalyzer.kotlin
import com.pulumi.azure.videoanalyzer.AnalyzerArgs.builder
import com.pulumi.azure.videoanalyzer.kotlin.inputs.AnalyzerIdentityArgs
import com.pulumi.azure.videoanalyzer.kotlin.inputs.AnalyzerIdentityArgsBuilder
import com.pulumi.azure.videoanalyzer.kotlin.inputs.AnalyzerStorageAccountArgs
import com.pulumi.azure.videoanalyzer.kotlin.inputs.AnalyzerStorageAccountArgsBuilder
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.Map
import kotlin.jvm.JvmName
/**
* Manages a Video Analyzer.
* !> Video Analyzer (Preview) is now Deprecated and will be Retired on 2022-11-30 - as such the `azure.videoanalyzer.Analyzer` 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: [
* contributor,
* reader,
* ],
* });
* ```
* ```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=[
* contributor,
* reader,
* ]))
* ```
* ```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 =
* {
* contributor,
* reader,
* },
* });
* });
* ```
* ```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
* }
* _, 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{
* contributor,
* reader,
* }))
* 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.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(
* contributor,
* reader)
* .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:
* - ${contributor}
* - ${reader}
* ```
*
* ## Import
* Video Analyzer can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:videoanalyzer/analyzer:Analyzer analyzer /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/videoAnalyzers/analyzer1
* ```
* @property identity An `identity` 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 Video Analyzer. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which to create the Video Analyzer. Changing this forces a new resource to be created.
* @property storageAccount A `storage_account` block as defined below.
* @property tags A mapping of tags assigned to the resource.
*/
public data class AnalyzerArgs(
public val identity: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val storageAccount: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.videoanalyzer.AnalyzerArgs =
com.pulumi.azure.videoanalyzer.AnalyzerArgs.builder()
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.storageAccount(storageAccount?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [AnalyzerArgs].
*/
@PulumiTagMarker
public class AnalyzerArgsBuilder internal constructor() {
private var identity: Output? = null
private var location: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var storageAccount: Output? = null
private var tags: Output>? = null
/**
* @param value An `identity` block as defined below.
*/
@JvmName("ynqqywfdtyqsqble")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("lekavxoogjdriqbv")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Specifies the name of the Video Analyzer. Changing this forces a new resource to be created.
*/
@JvmName("kqltescyncnwbcgc")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group in which to create the Video Analyzer. Changing this forces a new resource to be created.
*/
@JvmName("qwvxddranixrdkro")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A `storage_account` block as defined below.
*/
@JvmName("ehbvtgmjnbpeoeuv")
public suspend fun storageAccount(`value`: Output) {
this.storageAccount = value
}
/**
* @param value A mapping of tags assigned to the resource.
*/
@JvmName("xxpkdhuofrqlljie")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value An `identity` block as defined below.
*/
@JvmName("clbetavpprgtlcyq")
public suspend fun identity(`value`: AnalyzerIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument An `identity` block as defined below.
*/
@JvmName("qgmdnjpriwomplnk")
public suspend fun identity(argument: suspend AnalyzerIdentityArgsBuilder.() -> Unit) {
val toBeMapped = AnalyzerIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("mlawtwsabveulqvc")
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 Video Analyzer. Changing this forces a new resource to be created.
*/
@JvmName("hkhaskkqfcnlruvi")
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. Changing this forces a new resource to be created.
*/
@JvmName("blbwljtybhknkctw")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value A `storage_account` block as defined below.
*/
@JvmName("getmjujujkhmwqsj")
public suspend fun storageAccount(`value`: AnalyzerStorageAccountArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storageAccount = mapped
}
/**
* @param argument A `storage_account` block as defined below.
*/
@JvmName("fgmwuxcyfmekruad")
public suspend fun storageAccount(argument: suspend AnalyzerStorageAccountArgsBuilder.() -> Unit) {
val toBeMapped = AnalyzerStorageAccountArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.storageAccount = mapped
}
/**
* @param value A mapping of tags assigned to the resource.
*/
@JvmName("myisogipjwcbljru")
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("ofghyoeuvcxrknar")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): AnalyzerArgs = AnalyzerArgs(
identity = identity,
location = location,
name = name,
resourceGroupName = resourceGroupName,
storageAccount = storageAccount,
tags = tags,
)
}