Manage streaming endpoints with Media Services v3

media services logo v3


When your Media Services account is created a default Streaming Endpoint is added to your account in the Stopped state. To start streaming your content and take advantage of dynamic packaging and dynamic encryption, the streaming endpoint from which you want to stream content has to be in the Running state.

This article shows you how to execute the start command on your streaming endpoint using different technologies.

Note

You are only billed when your Streaming Endpoint is in running state.

Prerequisites

Review:

Use REST

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mediaresources/providers/Microsoft.Media/mediaservices/slitestmedia10/streamingEndpoints/myStreamingEndpoint1/start?api-version=2018-07-01

For more information, see:

Use the Azure portal

  1. Sign in to the Azure portal.
  2. Go to your Azure Media Services account.
  3. In the left pane, select Streaming Endpoints.
  4. Select the streaming endpoint you want to start, and then select Start.

Use the Azure CLI

az ams streaming-endpoint start [--account-name]
                                [--ids]
                                [--name]
                                [--no-wait]
                                [--resource-group]
                                [--subscription]

For more information, see az ams streaming-endpoint start.

Use SDKs

Java

if (streamingEndpoint != null) {
// Start The Streaming Endpoint if it is not running.
if (streamingEndpoint.resourceState() != StreamingEndpointResourceState.RUNNING) {
    manager.streamingEndpoints().startAsync(config.getResourceGroup(), config.getAccountName(), STREAMING_ENDPOINT_NAME).await();
}

See the complete Java code sample.

.NET

StreamingEndpoint streamingEndpoint = await client.StreamingEndpoints.GetAsync(config.ResourceGroup, config.AccountName, DefaultStreamingEndpointName);

if (streamingEndpoint != null)
{
    if (streamingEndpoint.ResourceState != StreamingEndpointResourceState.Running)
    {
        await client.StreamingEndpoints.StartAsync(config.ResourceGroup, config.AccountName, DefaultStreamingEndpointName);
    }

See the complete .NET code sample.


Next steps