azure.videoanalyzer.EdgeModule
Explore with Pulumi AI
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "GRS",
});
var exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("exampleUserAssignedIdentity", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.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("exampleAnalyzer", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.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 = new[]
{
exampleUserAssignedIdentity,
contributor,
reader,
},
});
var exampleEdgeModule = new Azure.VideoAnalyzer.EdgeModule("exampleEdgeModule", new()
{
ResourceGroupName = exampleResourceGroup.Name,
VideoAnalyzerName = exampleAnalyzer.Name,
});
});
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 {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("GRS"),
})
if err != nil {
return err
}
exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "exampleUserAssignedIdentity", &authorization.UserAssignedIdentityArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.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, "exampleAnalyzer", &videoanalyzer.AnalyzerArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.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, "exampleEdgeModule", &videoanalyzer.EdgeModuleArgs{
ResourceGroupName: exampleResourceGroup.Name,
VideoAnalyzerName: exampleAnalyzer.Name,
})
if err != nil {
return err
}
return nil
})
}
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("GRS")
.build());
var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.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()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.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()
.resourceGroupName(exampleResourceGroup.name())
.videoAnalyzerName(exampleAnalyzer.name())
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="GRS")
example_user_assigned_identity = azure.authorization.UserAssignedIdentity("exampleUserAssignedIdentity",
resource_group_name=example_resource_group.name,
location=example_resource_group.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("exampleAnalyzer",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
storage_account=azure.videoanalyzer.AnalyzerStorageAccountArgs(
id=example_account.id,
user_assigned_identity_id=example_user_assigned_identity.id,
),
identity=azure.videoanalyzer.AnalyzerIdentityArgs(
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("exampleEdgeModule",
resource_group_name=example_resource_group.name,
video_analyzer_name=example_analyzer.name)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("exampleUserAssignedIdentity", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.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("exampleAnalyzer", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.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("exampleEdgeModule", {
resourceGroupName: exampleResourceGroup.name,
videoAnalyzerName: exampleAnalyzer.name,
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleAccount:
type: azure:storage:Account
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
accountTier: Standard
accountReplicationType: GRS
exampleUserAssignedIdentity:
type: azure:authorization:UserAssignedIdentity
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.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
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.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
properties:
resourceGroupName: ${exampleResourceGroup.name}
videoAnalyzerName: ${exampleAnalyzer.name}
Create EdgeModule Resource
new EdgeModule(name: string, args: EdgeModuleArgs, opts?: CustomResourceOptions);
@overload
def EdgeModule(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
video_analyzer_name: Optional[str] = None)
@overload
def EdgeModule(resource_name: str,
args: EdgeModuleArgs,
opts: Optional[ResourceOptions] = None)
func NewEdgeModule(ctx *Context, name string, args EdgeModuleArgs, opts ...ResourceOption) (*EdgeModule, error)
public EdgeModule(string name, EdgeModuleArgs args, CustomResourceOptions? opts = null)
public EdgeModule(String name, EdgeModuleArgs args)
public EdgeModule(String name, EdgeModuleArgs args, CustomResourceOptions options)
type: azure:videoanalyzer:EdgeModule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EdgeModuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args EdgeModuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args EdgeModuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EdgeModuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EdgeModuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
EdgeModule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The EdgeModule resource accepts the following input properties:
- Resource
Group stringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- Video
Analyzer stringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- Video
Analyzer stringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- resource
Group StringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- video
Analyzer StringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- name String
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- resource
Group stringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- video
Analyzer stringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- name string
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- resource_
group_ strname The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- video_
analyzer_ strname The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- name str
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- resource
Group StringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- video
Analyzer StringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- name String
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the EdgeModule resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing EdgeModule Resource
Get an existing EdgeModule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: EdgeModuleState, opts?: CustomResourceOptions): EdgeModule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
video_analyzer_name: Optional[str] = None) -> EdgeModule
func GetEdgeModule(ctx *Context, name string, id IDInput, state *EdgeModuleState, opts ...ResourceOption) (*EdgeModule, error)
public static EdgeModule Get(string name, Input<string> id, EdgeModuleState? state, CustomResourceOptions? opts = null)
public static EdgeModule get(String name, Output<String> id, EdgeModuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Name string
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- Video
Analyzer stringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- Video
Analyzer stringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- name String
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- resource
Group StringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- video
Analyzer StringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- name string
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- resource
Group stringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- video
Analyzer stringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- name str
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- resource_
group_ strname The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- video_
analyzer_ strname The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
- name String
Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- resource
Group StringName The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created.
- video
Analyzer StringName The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created.
Import
Video Analyzer Edge Module can be imported using the resource id
, e.g.
$ pulumi import azure:videoanalyzer/edgeModule:EdgeModule edge /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/videoAnalyzers/analyzer1/edgeModules/edge1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.