Listar chaves de conteúdo usadas por este Localizador de Streaming
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listContentKeys?api-version=2022-08-01
Parâmetros de URI
Nome |
Em |
Obrigatório |
Tipo |
Description |
accountName
|
path |
True
|
string
|
O nome da conta dos Serviços de Mídia.
|
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos na assinatura do Azure.
|
streamingLocatorName
|
path |
True
|
string
|
O nome do Localizador de Streaming.
|
subscriptionId
|
path |
True
|
string
|
O identificador exclusivo de uma assinatura do Microsoft Azure.
|
api-version
|
query |
True
|
string
|
A versão da API a ser usada com a solicitação do cliente.
|
Respostas
Exemplos
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": []
}
]
}
Definições
ErrorAdditionalInfo
As informações adicionais do erro de gerenciamento de recursos.
Nome |
Tipo |
Description |
info
|
object
|
As informações adicionais.
|
type
|
string
|
O tipo de informação adicional.
|
ErrorDetail
Os detalhes do erro.
Nome |
Tipo |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
As informações adicionais do erro.
|
code
|
string
|
O código de erro.
|
details
|
ErrorDetail[]
|
Os detalhes do erro.
|
message
|
string
|
A mensagem de erro.
|
target
|
string
|
O destino do erro.
|
ErrorResponse
Resposta de erro
Nome |
Tipo |
Description |
error
|
ErrorDetail
|
O objeto de erro.
|
ListContentKeysResponse
Classe de resposta para a ação listContentKeys
StreamingLocatorContentKey
Classe para chave de conteúdo no Localizador de Streaming
Nome |
Tipo |
Description |
id
|
string
|
ID da chave de conteúdo
|
labelReferenceInStreamingPolicy
|
string
|
Rótulo da chave de conteúdo conforme especificado na Política de Streaming
|
policyName
|
string
|
ContentKeyPolicy usado pela Chave de Conteúdo
|
tracks
|
TrackSelection[]
|
Rastreia quais usam essa chave de conteúdo
|
type
|
StreamingLocatorContentKeyType
|
Tipo de criptografia de chave de conteúdo
|
value
|
string
|
Valor da chave de conteúdo
|
StreamingLocatorContentKeyType
Tipo de criptografia de chave de conteúdo
Nome |
Tipo |
Description |
CommonEncryptionCbcs
|
string
|
Criptografia comum usando CBCS
|
CommonEncryptionCenc
|
string
|
Criptografia comum usando CENC
|
EnvelopeEncryption
|
string
|
Criptografia de Envelope
|
TrackPropertyCompareOperation
Rastrear operação de condição de propriedade
Nome |
Tipo |
Description |
Equal
|
string
|
Operação igual
|
Unknown
|
string
|
Operação de comparação de propriedade de faixa desconhecida
|
TrackPropertyCondition
Classe para especificar uma condição de propriedade de faixa
TrackPropertyType
Rastrear tipo de propriedade
Nome |
Tipo |
Description |
FourCC
|
string
|
Acompanhar FourCC
|
Unknown
|
string
|
Propriedade de faixa desconhecida
|
TrackSelection
Classe para selecionar uma faixa
Nome |
Tipo |
Description |
trackSelections
|
TrackPropertyCondition[]
|
TrackSelections é uma lista de condições de propriedade de faixa que pode especificar faixas
|