Elencare le chiavi di contenuto usate da questo localizzatore di streaming
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listContentKeys?api-version=2022-08-01
Parametri dell'URI
Nome |
In |
Necessario |
Tipo |
Descrizione |
accountName
|
path |
True
|
string
|
Nome dell'account di Servizi multimediali.
|
resourceGroupName
|
path |
True
|
string
|
Nome del gruppo di risorse all'interno della sottoscrizione di Azure.
|
streamingLocatorName
|
path |
True
|
string
|
Nome localizzatore di streaming.
|
subscriptionId
|
path |
True
|
string
|
Identificatore univoco per una sottoscrizione di Microsoft Azure.
|
api-version
|
query |
True
|
string
|
Versione dell'API da usare con la richiesta client.
|
Risposte
Esempio
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": []
}
]
}
Definizioni
ErrorAdditionalInfo
Informazioni aggiuntive sulla gestione delle risorse.
Nome |
Tipo |
Descrizione |
info
|
object
|
Informazioni aggiuntive.
|
type
|
string
|
Tipo di informazioni aggiuntive.
|
ErrorDetail
Dettagli dell'errore.
Nome |
Tipo |
Descrizione |
additionalInfo
|
ErrorAdditionalInfo[]
|
Informazioni aggiuntive sull'errore.
|
code
|
string
|
Codice di errore.
|
details
|
ErrorDetail[]
|
Dettagli dell'errore.
|
message
|
string
|
Messaggio di errore.
|
target
|
string
|
Destinazione dell'errore.
|
ErrorResponse
Risposta di errore
ListContentKeysResponse
Classe di risposta per l'azione listContentKeys
StreamingLocatorContentKey
Classe per la chiave di contenuto nel localizzatore di streaming
Nome |
Tipo |
Descrizione |
id
|
string
|
ID della chiave di contenuto
|
labelReferenceInStreamingPolicy
|
string
|
Etichetta della chiave di contenuto come specificato nei criteri di streaming
|
policyName
|
string
|
ContentKeyPolicy usato da Content Key
|
tracks
|
TrackSelection[]
|
Tiene traccia che usano questa chiave di contenuto
|
type
|
StreamingLocatorContentKeyType
|
Tipo di crittografia della chiave di contenuto
|
value
|
string
|
Valore della chiave di contenuto
|
StreamingLocatorContentKeyType
Tipo di crittografia della chiave di contenuto
Nome |
Tipo |
Descrizione |
CommonEncryptionCbcs
|
string
|
Crittografia comune con CBCS
|
CommonEncryptionCenc
|
string
|
Crittografia comune con CENC
|
EnvelopeEncryption
|
string
|
Crittografia Envelope
|
TrackPropertyCompareOperation
Tenere traccia dell'operazione della condizione delle proprietà
Nome |
Tipo |
Descrizione |
Equal
|
string
|
Operazione uguale
|
Unknown
|
string
|
Operazione di confronto delle proprietà di traccia sconosciuta
|
TrackPropertyCondition
Classe per specificare una condizione di proprietà track
Nome |
Tipo |
Descrizione |
operation
|
TrackPropertyCompareOperation
|
Tenere traccia dell'operazione della condizione delle proprietà
|
property
|
TrackPropertyType
|
Tipo di proprietà Track
|
value
|
string
|
Tenere traccia del valore della proprietà
|
TrackPropertyType
Tipo di proprietà Track
Nome |
Tipo |
Descrizione |
FourCC
|
string
|
Tenere traccia di FourCC
|
Unknown
|
string
|
Proprietà track sconosciuta
|
TrackSelection
Classe per selezionare una traccia
Nome |
Tipo |
Descrizione |
trackSelections
|
TrackPropertyCondition[]
|
TrackSelections è un elenco di condizioni di proprietà di traccia che può specificare tracce
|