We recommend using Azure Native.
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
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,
});
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=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("example",
name="example-edge-module",
resource_group_name=example.name,
video_analyzer_name=example_analyzer.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 {
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
})
}
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,
});
});
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());
}
}
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}
Create EdgeModule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EdgeModule(name: string, args: EdgeModuleArgs, opts?: CustomResourceOptions);
@overload
def EdgeModule(resource_name: str,
args: EdgeModuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EdgeModule(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
video_analyzer_name: Optional[str] = None,
name: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var edgeModuleResource = new Azure.VideoAnalyzer.EdgeModule("edgeModuleResource", new()
{
ResourceGroupName = "string",
VideoAnalyzerName = "string",
Name = "string",
});
example, err := videoanalyzer.NewEdgeModule(ctx, "edgeModuleResource", &videoanalyzer.EdgeModuleArgs{
ResourceGroupName: pulumi.String("string"),
VideoAnalyzerName: pulumi.String("string"),
Name: pulumi.String("string"),
})
var edgeModuleResource = new EdgeModule("edgeModuleResource", EdgeModuleArgs.builder()
.resourceGroupName("string")
.videoAnalyzerName("string")
.name("string")
.build());
edge_module_resource = azure.videoanalyzer.EdgeModule("edgeModuleResource",
resource_group_name="string",
video_analyzer_name="string",
name="string")
const edgeModuleResource = new azure.videoanalyzer.EdgeModule("edgeModuleResource", {
resourceGroupName: "string",
videoAnalyzerName: "string",
name: "string",
});
type: azure:videoanalyzer:EdgeModule
properties:
name: string
resourceGroupName: string
videoAnalyzerName: string
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.