A streamelési lokátor által használt tartalomkulcsok listázása
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listContentKeys?api-version=2022-08-01
URI-paraméterek
Name |
In |
Kötelező |
Típus |
Description |
accountName
|
path |
True
|
string
|
A Media Services-fiók neve.
|
resourceGroupName
|
path |
True
|
string
|
Az Azure-előfizetésben található erőforráscsoport neve.
|
streamingLocatorName
|
path |
True
|
string
|
A Streamelési lokátor neve.
|
subscriptionId
|
path |
True
|
string
|
A Microsoft Azure-előfizetés egyedi azonosítója.
|
api-version
|
query |
True
|
string
|
Az ügyfélkéréshez használni kívánt API verziója.
|
Válaszok
Példák
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": []
}
]
}
Definíciók
ErrorAdditionalInfo
Az erőforrás-kezelési hiba további információi.
Name |
Típus |
Description |
info
|
object
|
A további információk.
|
type
|
string
|
A további információtípus.
|
ErrorDetail
A hiba részletei.
Name |
Típus |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
A hiba további információi.
|
code
|
string
|
A hibakód.
|
details
|
ErrorDetail[]
|
A hiba részletei.
|
message
|
string
|
A hibaüzenet.
|
target
|
string
|
A hibacél.
|
ErrorResponse
Hibaválasz
Name |
Típus |
Description |
error
|
ErrorDetail
|
A hibaobjektum.
|
ListContentKeysResponse
A listContentKeys művelet válaszosztálya
StreamingLocatorContentKey
Tartalomkulcs osztálya a Streaming Locatorban
Name |
Típus |
Description |
id
|
string
|
Tartalomkulcs azonosítója
|
labelReferenceInStreamingPolicy
|
string
|
A tartalomkulcs címkéje a streamelési szabályzatban meghatározottak szerint
|
policyName
|
string
|
Tartalomkulcs által használt ContentKeyPolicy
|
tracks
|
TrackSelection[]
|
Nyomon követi a tartalomkulcsot használó számokat
|
type
|
StreamingLocatorContentKeyType
|
Tartalomkulcs titkosítási típusa
|
value
|
string
|
Tartalomkulcs értéke
|
StreamingLocatorContentKeyType
Tartalomkulcs titkosítási típusa
Name |
Típus |
Description |
CommonEncryptionCbcs
|
string
|
Gyakori titkosítás a CBCS használatával
|
CommonEncryptionCenc
|
string
|
Gyakori titkosítás a CENC használatával
|
EnvelopeEncryption
|
string
|
Borítéktitkosítás
|
TrackPropertyCompareOperation
Tulajdonságfeltétel-művelet nyomon követése
Name |
Típus |
Description |
Equal
|
string
|
Egyenlő művelet
|
Unknown
|
string
|
Ismeretlen track tulajdonság összehasonlítása művelet
|
TrackPropertyCondition
Osztály egy pályatulajdonság feltételének megadásához
TrackPropertyType
Tulajdonságtípus nyomon követése
Name |
Típus |
Description |
FourCC
|
string
|
FourCC nyomon követése
|
Unknown
|
string
|
Ismeretlen track tulajdonság
|
TrackSelection
Osztály a zeneszám kiválasztásához
Name |
Típus |
Description |
trackSelections
|
TrackPropertyCondition[]
|
A TrackSelections egy track tulajdonság feltétellistája, amely megadhatja a követés(ek)et
|