Pipeline Topology Args
Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following:
Parameters: list of user defined parameters that can be references across the topology nodes.
Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras.
Processors: list of nodes which perform data analysis or transformations.
Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. Uses Azure REST API version 2021-11-01-preview. In version 2.x of the Azure Native provider, it used API version 2021-11-01-preview.
Example Usage
Create or update a pipeline topology with an Rtsp source and video sink.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var pipelineTopology = new AzureNative.VideoAnalyzer.PipelineTopology("pipelineTopology", new()
{
AccountName = "testaccount2",
Description = "Pipeline Topology 1 Description",
Kind = AzureNative.VideoAnalyzer.Kind.Live,
Parameters = new[]
{
new AzureNative.VideoAnalyzer.Inputs.ParameterDeclarationArgs
{
Default = "rtsp://microsoft.com/video.mp4",
Description = "rtsp source url parameter",
Name = "rtspUrlParameter",
Type = AzureNative.VideoAnalyzer.ParameterType.String,
},
new AzureNative.VideoAnalyzer.Inputs.ParameterDeclarationArgs
{
Default = "password",
Description = "rtsp source password parameter",
Name = "rtspPasswordParameter",
Type = AzureNative.VideoAnalyzer.ParameterType.SecretString,
},
},
PipelineTopologyName = "pipelineTopology1",
ResourceGroupName = "testrg",
Sinks = new[]
{
new AzureNative.VideoAnalyzer.Inputs.VideoSinkArgs
{
Inputs = new[]
{
new AzureNative.VideoAnalyzer.Inputs.NodeInputArgs
{
NodeName = "rtspSource",
},
},
Name = "videoSink",
Type = "#Microsoft.VideoAnalyzer.VideoSink",
VideoCreationProperties = new AzureNative.VideoAnalyzer.Inputs.VideoCreationPropertiesArgs
{
Description = "Parking lot south entrance",
SegmentLength = "PT30S",
Title = "Parking Lot (Camera 1)",
},
VideoName = "camera001",
VideoPublishingOptions = new AzureNative.VideoAnalyzer.Inputs.VideoPublishingOptionsArgs
{
DisableArchive = "false",
DisableRtspPublishing = "true",
},
},
},
Sku = new AzureNative.VideoAnalyzer.Inputs.SkuArgs
{
Name = AzureNative.VideoAnalyzer.SkuName.Live_S1,
},
Sources = new[]
{
new AzureNative.VideoAnalyzer.Inputs.RtspSourceArgs
{
Endpoint = new AzureNative.VideoAnalyzer.Inputs.UnsecuredEndpointArgs
{
Credentials = new AzureNative.VideoAnalyzer.Inputs.UsernamePasswordCredentialsArgs
{
Password = "${rtspPasswordParameter}",
Type = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials",
Username = "username",
},
Type = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint",
Url = "${rtspUrlParameter}",
},
Name = "rtspSource",
Transport = AzureNative.VideoAnalyzer.RtspTransport.Http,
Type = "#Microsoft.VideoAnalyzer.RtspSource",
},
},
});
});
package main
import (
videoanalyzer "github.com/pulumi/pulumi-azure-native-sdk/videoanalyzer/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := videoanalyzer.NewPipelineTopology(ctx, "pipelineTopology", &videoanalyzer.PipelineTopologyArgs{
AccountName: pulumi.String("testaccount2"),
Description: pulumi.String("Pipeline Topology 1 Description"),
Kind: pulumi.String(videoanalyzer.KindLive),
Parameters: videoanalyzer.ParameterDeclarationArray{
&videoanalyzer.ParameterDeclarationArgs{
Default: pulumi.String("rtsp://microsoft.com/video.mp4"),
Description: pulumi.String("rtsp source url parameter"),
Name: pulumi.String("rtspUrlParameter"),
Type: pulumi.String(videoanalyzer.ParameterTypeString),
},
&videoanalyzer.ParameterDeclarationArgs{
Default: pulumi.String("password"),
Description: pulumi.String("rtsp source password parameter"),
Name: pulumi.String("rtspPasswordParameter"),
Type: pulumi.String(videoanalyzer.ParameterTypeSecretString),
},
},
PipelineTopologyName: pulumi.String("pipelineTopology1"),
ResourceGroupName: pulumi.String("testrg"),
Sinks: videoanalyzer.VideoSinkArray{
&videoanalyzer.VideoSinkArgs{
Inputs: videoanalyzer.NodeInputArray{
&videoanalyzer.NodeInputArgs{
NodeName: pulumi.String("rtspSource"),
},
},
Name: pulumi.String("videoSink"),
Type: pulumi.String("#Microsoft.VideoAnalyzer.VideoSink"),
VideoCreationProperties: &videoanalyzer.VideoCreationPropertiesArgs{
Description: pulumi.String("Parking lot south entrance"),
SegmentLength: pulumi.String("PT30S"),
Title: pulumi.String("Parking Lot (Camera 1)"),
},
VideoName: pulumi.String("camera001"),
VideoPublishingOptions: &videoanalyzer.VideoPublishingOptionsArgs{
DisableArchive: pulumi.String("false"),
DisableRtspPublishing: pulumi.String("true"),
},
},
},
Sku: &videoanalyzer.SkuArgs{
Name: pulumi.String(videoanalyzer.SkuName_Live_S1),
},
Sources: pulumi.Array{
videoanalyzer.RtspSource{
Endpoint: videoanalyzer.UnsecuredEndpoint{
Credentials: videoanalyzer.UsernamePasswordCredentials{
Password: "${rtspPasswordParameter}",
Type: "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials",
Username: "username",
},
Type: "#Microsoft.VideoAnalyzer.UnsecuredEndpoint",
Url: "${rtspUrlParameter}",
},
Name: "rtspSource",
Transport: videoanalyzer.RtspTransportHttp,
Type: "#Microsoft.VideoAnalyzer.RtspSource",
},
},
})
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.azurenative.videoanalyzer.PipelineTopology;
import com.pulumi.azurenative.videoanalyzer.PipelineTopologyArgs;
import com.pulumi.azurenative.videoanalyzer.inputs.ParameterDeclarationArgs;
import com.pulumi.azurenative.videoanalyzer.inputs.VideoSinkArgs;
import com.pulumi.azurenative.videoanalyzer.inputs.VideoCreationPropertiesArgs;
import com.pulumi.azurenative.videoanalyzer.inputs.VideoPublishingOptionsArgs;
import com.pulumi.azurenative.videoanalyzer.inputs.SkuArgs;
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 pipelineTopology = new PipelineTopology("pipelineTopology", PipelineTopologyArgs.builder()
.accountName("testaccount2")
.description("Pipeline Topology 1 Description")
.kind("Live")
.parameters(
ParameterDeclarationArgs.builder()
.default_("rtsp://microsoft.com/video.mp4")
.description("rtsp source url parameter")
.name("rtspUrlParameter")
.type("String")
.build(),
ParameterDeclarationArgs.builder()
.default_("password")
.description("rtsp source password parameter")
.name("rtspPasswordParameter")
.type("SecretString")
.build())
.pipelineTopologyName("pipelineTopology1")
.resourceGroupName("testrg")
.sinks(VideoSinkArgs.builder()
.inputs(NodeInputArgs.builder()
.nodeName("rtspSource")
.build())
.name("videoSink")
.type("#Microsoft.VideoAnalyzer.VideoSink")
.videoCreationProperties(VideoCreationPropertiesArgs.builder()
.description("Parking lot south entrance")
.segmentLength("PT30S")
.title("Parking Lot (Camera 1)")
.build())
.videoName("camera001")
.videoPublishingOptions(VideoPublishingOptionsArgs.builder()
.disableArchive("false")
.disableRtspPublishing("true")
.build())
.build())
.sku(SkuArgs.builder()
.name("Live_S1")
.build())
.sources(RtspSourceArgs.builder()
.endpoint(TlsEndpointArgs.builder()
.credentials(UsernamePasswordCredentialsArgs.builder()
.password("${rtspPasswordParameter}")
.type("#Microsoft.VideoAnalyzer.UsernamePasswordCredentials")
.username("username")
.build())
.type("#Microsoft.VideoAnalyzer.UnsecuredEndpoint")
.url("${rtspUrlParameter}")
.build())
.name("rtspSource")
.transport("Http")
.type("#Microsoft.VideoAnalyzer.RtspSource")
.build())
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:videoanalyzer:PipelineTopology pipelineTopology1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}
Constructors
Properties
The Azure Video Analyzer account name.
An optional description of the pipeline topology. It is recommended that the expected use of the topology to be described here.
List of the topology parameter declarations. Parameters declared here can be referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can have optional default values and can later be defined in individual instances of the pipeline.
Pipeline topology unique identifier.
List of the topology processor nodes. Processor nodes enable pipeline data to be analyzed, processed or transformed.
The name of the resource group. The name is case insensitive.
List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported.
List of the topology source nodes. Source nodes enable external data to be ingested by the pipeline.