Lijst met inhoudssleutels die door deze streaming-locator worden gebruikt
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listContentKeys?api-version=2022-08-01
URI-parameters
Name |
In |
Vereist |
Type |
Description |
accountName
|
path |
True
|
string
|
De naam van het Media Services-account.
|
resourceGroupName
|
path |
True
|
string
|
De naam van de resourcegroep binnen het Azure-abonnement.
|
streamingLocatorName
|
path |
True
|
string
|
De naam van de streaming-locator.
|
subscriptionId
|
path |
True
|
string
|
De unieke id voor een Microsoft Azure-abonnement.
|
api-version
|
query |
True
|
string
|
De versie van de API die moet worden gebruikt met de clientaanvraag.
|
Antwoorden
Voorbeelden
List Content Keys
Sample Request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/streamingLocators/secureStreamingLocator/listContentKeys?api-version=2022-08-01
/** Samples for StreamingLocators ListContentKeys. */
public final class Main {
/*
* x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-content-keys.json
*/
/**
* Sample code: List Content Keys.
*
* @param manager Entry point to MediaServicesManager.
*/
public static void listContentKeys(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) {
manager
.streamingLocators()
.listContentKeysWithResponse(
"contosorg", "contosomedia", "secureStreamingLocator", 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
from azure.identity import DefaultAzureCredential
from azure.mgmt.media import AzureMediaServices
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-media
# USAGE
python streaminglocatorslistcontentkeys.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.list_content_keys(
resource_group_name="contoso",
account_name="contosomedia",
streaming_locator_name="secureStreamingLocator",
)
print(response)
# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-content-keys.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
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-list-content-keys.json
func ExampleStreamingLocatorsClient_ListContentKeys() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmediaservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStreamingLocatorsClient().ListContentKeys(ctx, "contoso", "contosomedia", "secureStreamingLocator", 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.ListContentKeysResponse = armmediaservices.ListContentKeysResponse{
// ContentKeys: []*armmediaservices.StreamingLocatorContentKey{
// {
// Type: to.Ptr(armmediaservices.StreamingLocatorContentKeyTypeEnvelopeEncryption),
// ID: to.Ptr("9259eb06-eeee-4f77-987f-48f4ea5c649f"),
// LabelReferenceInStreamingPolicy: to.Ptr("aesDefaultKey"),
// PolicyName: to.Ptr("PolicyWithMultipleOptions"),
// Tracks: []*armmediaservices.TrackSelection{
// },
// Value: to.Ptr("QpiqeQROdN5xamnfUF2Wdw=="),
// },
// {
// Type: to.Ptr(armmediaservices.StreamingLocatorContentKeyTypeCommonEncryptionCenc),
// ID: to.Ptr("06bfeff1-2bb6-4f58-af27-a2767f058bca"),
// LabelReferenceInStreamingPolicy: to.Ptr("cencDefaultKey"),
// PolicyName: to.Ptr("PolicyWithMultipleOptions"),
// Tracks: []*armmediaservices.TrackSelection{
// },
// Value: to.Ptr("ZjgWhNnqnqcov/h+wrYusw=="),
// },
// {
// Type: to.Ptr(armmediaservices.StreamingLocatorContentKeyTypeCommonEncryptionCbcs),
// ID: to.Ptr("799e78a0-ed6f-4179-9222-ed4ec4223cec"),
// LabelReferenceInStreamingPolicy: to.Ptr("cbcsDefaultKey"),
// PolicyName: to.Ptr("PolicyWithMultipleOptions"),
// Tracks: []*armmediaservices.TrackSelection{
// },
// Value: to.Ptr("FjZ3n3yRcVxRFftdYFbe9g=="),
// }},
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureMediaServices } = require("@azure/arm-mediaservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List Content Keys used by this Streaming Locator
*
* @summary List Content Keys used by this Streaming Locator
* x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-content-keys.json
*/
async function listContentKeys() {
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 = "secureStreamingLocator";
const credential = new DefaultAzureCredential();
const client = new AzureMediaServices(credential, subscriptionId);
const result = await client.streamingLocators.listContentKeys(
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
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-list-content-keys.json
// this example is just showing the usage of "StreamingLocators_ListContentKeys" 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 = "secureStreamingLocator";
ResourceIdentifier streamingLocatorResourceId = StreamingLocatorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, streamingLocatorName);
StreamingLocatorResource streamingLocator = client.GetStreamingLocatorResource(streamingLocatorResourceId);
// invoke the operation and iterate over the result
await foreach (StreamingLocatorContentKey item in streamingLocator.GetContentKeysAsync())
{
Console.WriteLine($"Succeeded: {item}");
}
Console.WriteLine($"Succeeded");
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
{
"contentKeys": [
{
"id": "9259eb06-eeee-4f77-987f-48f4ea5c649f",
"type": "EnvelopeEncryption",
"labelReferenceInStreamingPolicy": "aesDefaultKey",
"value": "QpiqeQROdN5xamnfUF2Wdw==",
"policyName": "PolicyWithMultipleOptions",
"tracks": []
},
{
"id": "06bfeff1-2bb6-4f58-af27-a2767f058bca",
"type": "CommonEncryptionCenc",
"labelReferenceInStreamingPolicy": "cencDefaultKey",
"value": "ZjgWhNnqnqcov/h+wrYusw==",
"policyName": "PolicyWithMultipleOptions",
"tracks": []
},
{
"id": "799e78a0-ed6f-4179-9222-ed4ec4223cec",
"type": "CommonEncryptionCbcs",
"labelReferenceInStreamingPolicy": "cbcsDefaultKey",
"value": "FjZ3n3yRcVxRFftdYFbe9g==",
"policyName": "PolicyWithMultipleOptions",
"tracks": []
}
]
}
Definities
ErrorAdditionalInfo
Aanvullende informatie over de resourcebeheerfout.
Name |
Type |
Description |
info
|
object
|
De aanvullende informatie.
|
type
|
string
|
Het type aanvullende informatie.
|
ErrorDetail
De foutdetails.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Aanvullende informatie over de fout.
|
code
|
string
|
De foutcode.
|
details
|
ErrorDetail[]
|
De foutdetails.
|
message
|
string
|
Het foutbericht.
|
target
|
string
|
Het foutdoel.
|
ErrorResponse
Foutreactie
Name |
Type |
Description |
error
|
ErrorDetail
|
Het foutobject.
|
ListContentKeysResponse
Klasse van antwoord voor de actie listContentKeys
StreamingLocatorContentKey
Klasse voor inhoudssleutel in streaming-locator
Name |
Type |
Description |
id
|
string
|
Id van inhoudssleutel
|
labelReferenceInStreamingPolicy
|
string
|
Label van inhoudssleutel zoals opgegeven in het streamingbeleid
|
policyName
|
string
|
ContentKeyPolicy gebruikt door Content Key
|
tracks
|
TrackSelection[]
|
Houdt bij welke inhoudssleutel wordt gebruikt
|
type
|
StreamingLocatorContentKeyType
|
Versleutelingstype van inhoudssleutel
|
value
|
string
|
Waarde van inhoudssleutel
|
StreamingLocatorContentKeyType
Versleutelingstype van inhoudssleutel
Name |
Type |
Description |
CommonEncryptionCbcs
|
string
|
Algemene versleuteling met CBCS
|
CommonEncryptionCenc
|
string
|
Algemene versleuteling met CENC
|
EnvelopeEncryption
|
string
|
Envelopversleuteling
|
TrackPropertyCompareOperation
Bewerking eigenschapsvoorwaarde bijhouden
Name |
Type |
Description |
Equal
|
string
|
Gelijke bewerking
|
Unknown
|
string
|
Onbekende vergelijkingsbewerking voor traceereigenschappen
|
TrackPropertyCondition
Klasse om één voorwaarde voor de eigenschap track op te geven
TrackPropertyType
Type eigenschap bijhouden
Name |
Type |
Description |
FourCC
|
string
|
FourCC bijhouden
|
Unknown
|
string
|
Onbekende trackeigenschap
|
TrackSelection
Klas om een nummer te selecteren
Name |
Type |
Description |
trackSelections
|
TrackPropertyCondition[]
|
TrackSelections is een lijst met voorwaarden voor trackeigenschappen waarmee track(s) kunnen worden opgegeven
|