Auflisten von Inhaltsschlüsseln, die von diesem Streaminglocator verwendet werden
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listContentKeys?api-version=2022-08-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
accountName
|
path |
True
|
string
|
Der Name des Media Services-Kontos.
|
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe innerhalb des Azure-Abonnements.
|
streamingLocatorName
|
path |
True
|
string
|
Der Name des Streaminglocators.
|
subscriptionId
|
path |
True
|
string
|
Der eindeutige Bezeichner für ein Microsoft Azure-Abonnement.
|
api-version
|
query |
True
|
string
|
Die Version der API, die mit der Clientanforderung verwendet werden soll.
|
Antworten
Beispiele
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": []
}
]
}
Definitionen
ErrorAdditionalInfo
Zusätzliche Informationen zum Ressourcenverwaltungsfehler.
Name |
Typ |
Beschreibung |
info
|
object
|
Zusätzliche Informationen.
|
type
|
string
|
Typ der zusätzlichen Informationen.
|
ErrorDetail
Die Fehlerdetails.
Name |
Typ |
Beschreibung |
additionalInfo
|
ErrorAdditionalInfo[]
|
Die zusätzlichen Fehlerinformationen.
|
code
|
string
|
Der Fehlercode.
|
details
|
ErrorDetail[]
|
Die Fehlerdetails.
|
message
|
string
|
Die Fehlermeldung.
|
target
|
string
|
Das Fehlerziel.
|
ErrorResponse
Fehlerantwort
Name |
Typ |
Beschreibung |
error
|
ErrorDetail
|
Das Fehlerobjekt.
|
ListContentKeysResponse
Klasse der Antwort für die ListContentKeys-Aktion
StreamingLocatorContentKey
Klasse für den Inhaltsschlüssel im Streaminglocator
Name |
Typ |
Beschreibung |
id
|
string
|
ID des Inhaltsschlüssels
|
labelReferenceInStreamingPolicy
|
string
|
Bezeichnung des Inhaltsschlüssels wie in der Streamingrichtlinie angegeben
|
policyName
|
string
|
Vom Inhaltsschlüssel verwendete ContentKeyPolicy
|
tracks
|
TrackSelection[]
|
Nachverfolgen, die diesen Inhaltsschlüssel verwenden
|
type
|
StreamingLocatorContentKeyType
|
Verschlüsselungstyp des Inhaltsschlüssels
|
value
|
string
|
Wert des Inhaltsschlüssels
|
StreamingLocatorContentKeyType
Verschlüsselungstyp des Inhaltsschlüssels
Name |
Typ |
Beschreibung |
CommonEncryptionCbcs
|
string
|
Allgemeine Verschlüsselung mit CBCS
|
CommonEncryptionCenc
|
string
|
Allgemeine Verschlüsselung mit CENC
|
EnvelopeEncryption
|
string
|
Umschlagverschlüsselung
|
TrackPropertyCompareOperation
Nachverfolgen des Bedingungsvorgangs der Eigenschaft
Name |
Typ |
Beschreibung |
Equal
|
string
|
Gleichheitsvorgang
|
Unknown
|
string
|
Unbekannter Nachverfolgungseigenschaftsvergleichsvorgang
|
TrackPropertyCondition
Klasse zum Angeben einer Trackeigenschaftsbedingung
TrackPropertyType
Track-Eigenschaftstyp
Name |
Typ |
Beschreibung |
FourCC
|
string
|
Track FourCC
|
Unknown
|
string
|
Unbekannte Titeleigenschaft
|
TrackSelection
Klasse zum Auswählen eines Titels
Name |
Typ |
Beschreibung |
trackSelections
|
TrackPropertyCondition[]
|
TrackSelections ist eine Liste der Track-Eigenschaftenbedingungen, die Die Spur(n) angeben kann.
|