In this article:
URI Parameters
Responses
Examples
Definitions
Get a Streaming Locator
Get the details of a Streaming Locator in the Media Services account
GET https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}?api-version={{api-version}}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
accountName |
path | True | string | The Media Services account name. |
resourceGroupName |
path | True | string | The name of the resource group within the Azure subscription. |
subscriptionId |
path | True | string | The unique identifier for a Microsoft Azure subscription. |
streamingLocatorName |
path | True | string | The Streaming Locator name. |
api-version |
query | True | string | The version of the API to be used with the client request. |
Responses
Name | Type | Description |
---|---|---|
200 OK | StreamingLocator | OK |
Other Status Codes | ErrorResponse | Detailed error information. |
Examples
Get a Streaming Locator by name
Technology | Sample request |
---|---|
HTTP |
GET https://{{api-endpoint}}/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/streamingLocators/clearStreamingLocator?api-version={{api-version}} |
Java |
/** * Samples for StreamingLocators Get. */ public final class Main { /* * x-ms-original-file: * specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming- * locators-get-by-name.json */ /** * Sample code: Get a Streaming Locator by name. * * @param manager Entry point to MediaServicesManager. */ public static void getAStreamingLocatorByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { manager.streamingLocators().getWithResponse("contosorg", "contosomedia", "clearStreamingLocator", com.azure.core.util.Context.NONE); } }} To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue. |
Python |
from azure.identity import DefaultAzureCredential from azure.mgmt.media import AzureMediaServices """ # PREREQUISITES pip install azure-identity pip install azure-mgmt-media # USAGE python streaminglocatorsgetbyname.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET. For more info about how to get the value, please see: https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal """ def main(): client = AzureMediaServices( credential=DefaultAzureCredential(), subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.streaming_locators.get( resource_group_name="contoso", account_name="contosomedia", streaming_locator_name="clearStreamingLocator", ) print(response) # x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-get-by-name.json if __name__ == "__main__": main() To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue. |
Go |
package armmediaservices_test import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices/v3" ) // Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7bf3adfa2d5e5cdbb804eec35279501794f461c/specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-get-by-name.json func ExampleStreamingLocatorsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmediaservices.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStreamingLocatorsClient().Get(ctx, "contoso", "contosomedia", "clearStreamingLocator", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.StreamingLocator = armmediaservices.StreamingLocator{ // Name: to.Ptr("clearStreamingLocator"), // Type: to.Ptr("Microsoft.Media/mediaservices/streamingLocators"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/streamingLocators/clearStreamingLocator"), // Properties: &armmediaservices.StreamingLocatorProperties{ // AssetName: to.Ptr("ClimbingMountRainier"), // ContentKeys: []*armmediaservices.StreamingLocatorContentKey{ // }, // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:32.115Z"); return t}()), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()), // StreamingLocatorID: to.Ptr("7684043b-f6d1-44a7-8bed-8a4aa474c5a4"), // StreamingPolicyName: to.Ptr("clearStreamingPolicy"), // }, // } } To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue. |
JavaScript |
const { AzureMediaServices } = require("@azure/arm-mediaservices"); const { DefaultAzureCredential } = require("@azure/identity"); /** * This sample demonstrates how to Get the details of a Streaming Locator in the Media Services account * * @summary Get the details of a Streaming Locator in the Media Services account * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-get-by-name.json */ async function getAStreamingLocatorByName() { const subscriptionId = process.env["MEDIASERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const resourceGroupName = process.env["MEDIASERVICES_RESOURCE_GROUP"] || "contoso"; const accountName = "contosomedia"; const streamingLocatorName = "clearStreamingLocator"; const credential = new DefaultAzureCredential(); const client = new AzureMediaServices(credential, subscriptionId); const result = await client.streamingLocators.get( resourceGroupName, accountName, streamingLocatorName ); console.log(result); } To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue. |
.NET |
using System; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.Media; using Azure.ResourceManager.Media.Models; // Generated from example definition: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-get-by-name.json // this example is just showing the usage of "StreamingLocators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); // this example assumes you already have this StreamingLocatorResource created on azure // for more information of creating StreamingLocatorResource, please refer to the document of StreamingLocatorResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "contoso"; string accountName = "contosomedia"; string streamingLocatorName = "clearStreamingLocator"; ResourceIdentifier streamingLocatorResourceId = StreamingLocatorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, streamingLocatorName); StreamingLocatorResource streamingLocator = client.GetStreamingLocatorResource(streamingLocatorResourceId); // invoke the operation StreamingLocatorResource result = await streamingLocator.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance StreamingLocatorData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue. |
Sample response
Status code: 200
{ "name": "clearStreamingLocator", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/streamingLocators/clearStreamingLocator", "type": "Microsoft.Media/mediaservices/streamingLocators", "properties": { "assetName": "ClimbingMountRainier", "created": "2018-08-08T18:29:32.1154071Z", "endTime": "9999-12-31T23:59:59.9999999Z", "streamingLocatorId": "7684043b-f6d1-44a7-8bed-8a4aa474c5a4", "streamingPolicyName": "clearStreamingPolicy", "contentKeys": [] } }
Definitions
Name | Description |
---|---|
createdByType | The type of identity that created the resource. |
ErrorAdditionalInfo | The resource management error additional info. |
ErrorDetail | The error detail. |
ErrorResponse | Error response. |
StreamingLocator | A Streaming Locator resource. |
StreamingLocatorContentKey | Class for content key in Streaming Locator. |
StreamingLocatorContentKeyType | Encryption type of Content Key. |
systemData | Metadata pertaining to creation and last modification of the resource. |
TrackPropertyCompareOperation | Track property condition operation. |
TrackPropertyCondition | Class to specify one track property condition. |
TrackPropertyType | Track property type. |
TrackSelection | Class to select a track. |
createdByType
The type of identity that created the resource.
Name | Type |
---|---|
Application | string |
Key | string |
ManagedIdentity | string |
User | string |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info | object | The additional info. |
type | string | The additional info type. |
ErrorDetail
Name | Type | Description |
---|---|---|
additionalInfo | ErrorAdditionalInfo | The error additional info. |
code | string | The error code. |
details | ErrorDetail | The error details. |
message | string | The error message. |
target | string | The error target. |
ErrorResponse
Name | Type | Description |
---|---|---|
error | ErrorDetail | The error object. |
StreamingLocator
A Streaming Locator resource
Name | Type | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. E.g.
/subscriptions/{subscriptionId}/resource |
name | string | The name of the resource. |
properties.alternativeMediaId | string | Alternative Media ID of this Streaming Locator. |
properties.assetName | string | Asset Name. |
properties.contentKeys | The ContentKeys used by this Streaming Locator. | |
properties.created | string | The creation time of the Streaming Locator. |
properties.default ContentKeyPolicyName |
string | Name of the default ContentKeyPolicy used by this Streaming Locator. |
properties.endTime | string | The end time of the Streaming Locator. |
properties.filters | string | A list of asset or account filters which apply to this Streaming Locator. |
properties.startTime | string | The start time of the Streaming Locator. |
properties.streamingLocatorId | string | The StreamingLocatorId of the Streaming Locator. |
properties.streaming PolicyName |
string | Name of the Streaming Policy used by this Streaming Locator. Specify the name of your Streaming Policy or use one of the predefined policies, such as:
|
systemData | systemData | The system metadata relating to this resource. |
type | string | The type of the resource. E.g., "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
StreamingLocatorContentKey
Class for content key in Streaming Locator
Name | Type | Description |
---|---|---|
id | string | ID of the content key |
labelReferenceInStreamingPolicy | string | Label of the content key as specified in the streaming policy |
policyName | string | The ContentKeyPolicy used by the content key |
tracks | TrackSelection | Tracks that use this content key |
type | StreamingLocatorContentKeyType | Encryption type of the content key |
value | string | Value of the content key |
StreamingLocatorContentKeyType
Encryption type of Content Key
Name | Type | Description |
---|---|---|
CommonEncryptionCbcs | string | Common encryption using CBCS |
CommonEncryptionCenc | string | Common encryption using CENC |
EnvelopeEncryption | string | Envelope encryption |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt | string | The timestamp of resource creation (UTC). |
createdBy | string | The identity that created the resource. |
createdByType | createdByType | The type of identity that created the resource. |
lastModifiedAt | string | The timestamp of resource last modification (UTC). |
lastModifiedBy | string | The identity that last modified the resource. |
lastModifiedByType | createdByType | The type of identity that last modified the resource. |
TrackPropertyCompareOperation
Track property condition operation
Name | Type | Description |
---|---|---|
Equal | string | Equal operation |
Unknown | string | Unknown track property compare operation |
TrackPropertyCondition
Class to specify one track property condition
Name | Type | Description |
---|---|---|
operation | TrackPropertyCompareOperation | Track property condition operation |
property | TrackPropertyType | Track property type |
value | string | Track property value |
TrackPropertyType
Track property type
Name | Type | Description |
---|---|---|
FourCC | string | Track FourCC |
Unknown | string | Unknown track property |
TrackSelection
Class to select a track
Name | Type | Description |
---|---|---|
trackSelections | TrackPropertyCondition | Track selections is a list of track property conditions that can specify track(s). |