Перечисление ресурсов в учетной записи Служб мультимедиа с необязательной фильтрацией и упорядочением
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets?api-version=2022-08-01
С использованием необязательных параметров:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets?api-version=2022-08-01&$filter={$filter}&$top={$top}&$orderby={$orderby}
Параметры URI
Имя |
В |
Обязательно |
Тип |
Описание |
accountName
|
path |
True
|
string
|
Имя учетной записи Служб мультимедиа.
|
resourceGroupName
|
path |
True
|
string
|
Имя группы ресурсов в подписке Azure.
|
subscriptionId
|
path |
True
|
string
|
Уникальный идентификатор подписки Microsoft Azure.
|
api-version
|
query |
True
|
string
|
Версия API, которая будет использоваться с клиентским запросом.
|
$filter
|
query |
|
string
|
Ограничивает набор возвращаемых элементов.
|
$orderby
|
query |
|
string
|
Указывает ключ, по которому должна быть упорядочена коллекция результатов.
|
$top
|
query |
|
integer
int32
|
Задает неотрицательное целое число n, которое ограничивает количество элементов, возвращаемых из коллекции. Служба возвращает количество доступных элементов, не превышающее указанное значение n.
|
Ответы
Примеры
List all Assets
Образец запроса
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/assets?api-version=2022-08-01
/**
* Samples for Assets List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-all.
* json
*/
/**
* Sample code: List all Assets.
*
* @param manager Entry point to MediaServicesManager.
*/
public static void listAllAssets(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) {
manager.assets().list("contosorg", "contosomedia", null, null, null, 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 assetslistall.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.assets.list(
resource_group_name="contoso",
account_name="contosomedia",
)
for item in response:
print(item)
# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-all.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/assets-list-all.json
func ExampleAssetsClient_NewListPager_listAllAssets() {
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)
}
pager := clientFactory.NewAssetsClient().NewListPager("contoso", "contosomedia", &armmediaservices.AssetsClientListOptions{Filter: nil,
Top: nil,
Orderby: nil,
})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.AssetCollection = armmediaservices.AssetCollection{
// Value: []*armmediaservices.Asset{
// {
// Name: to.Ptr("ClimbingLittleTahoma"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingLittleTahoma"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Little Tahoma"),
// AlternateID: to.Ptr("CLIMB00003"),
// AssetID: to.Ptr("e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe"),
// Container: to.Ptr("asset-e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-04-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountAdams"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Mount Adams"),
// AlternateID: to.Ptr("CLIMB00002"),
// AssetID: to.Ptr("1b648c1a-2268-461d-a1da-742bde23db40"),
// Container: to.Ptr("asset-1b648c1a-2268-461d-a1da-742bde23db40"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-02-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountBaker"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Mount Baker"),
// AlternateID: to.Ptr("CLIMB00004"),
// AssetID: to.Ptr("89af1750-e681-4fbe-8c4c-9a5567867a6b"),
// Container: to.Ptr("asset-89af1750-e681-4fbe-8c4c-9a5567867a6b"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2011-02-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountRainer"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("descClimbingMountRainer"),
// AlternateID: to.Ptr("altClimbingMountRainer"),
// AssetID: to.Ptr("258878ef-fe05-4518-988f-052e86dc19f6"),
// Container: to.Ptr("testasset0"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:24.394Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T21:29:24.394Z"); return t}()),
// StorageAccountName: to.Ptr("storage0"),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountRainier"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Mount Rainier"),
// AlternateID: to.Ptr("CLIMB00001"),
// AssetID: to.Ptr("f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
// Container: to.Ptr("asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountSaintHelens"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Saint Helens"),
// AlternateID: to.Ptr("CLIMB00005"),
// AssetID: to.Ptr("14d58c40-ec1f-446c-b041-f5cff949bd1d"),
// Container: to.Ptr("asset-14d58c40-ec1f-446c-b041-f5cff949bd1d"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-03-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-04-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatMediaStorageClientEncryption),
// },
// }},
// }
}
}
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 Assets in the Media Services account with optional filtering and ordering
*
* @summary List Assets in the Media Services account with optional filtering and ordering
* x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-all.json
*/
async function listAllAssets() {
const subscriptionId =
process.env["MEDIASERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["MEDIASERVICES_RESOURCE_GROUP"] || "contoso";
const accountName = "contosomedia";
const credential = new DefaultAzureCredential();
const client = new AzureMediaServices(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.assets.list(resourceGroupName, accountName)) {
resArray.push(item);
}
console.log(resArray);
}
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;
// Generated from example definition: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-all.json
// this example is just showing the usage of "Assets_List" 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 MediaServicesAccountResource created on azure
// for more information of creating MediaServicesAccountResource, please refer to the document of MediaServicesAccountResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "contoso";
string accountName = "contosomedia";
ResourceIdentifier mediaServicesAccountResourceId = MediaServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
MediaServicesAccountResource mediaServicesAccount = client.GetMediaServicesAccountResource(mediaServicesAccountResourceId);
// get the collection of this MediaAssetResource
MediaAssetCollection collection = mediaServicesAccount.GetMediaAssets();
// invoke the operation and iterate over the result
await foreach (MediaAssetResource item in collection.GetAllAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
MediaAssetData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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
Пример ответа
{
"value": [
{
"name": "ClimbingLittleTahoma",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingLittleTahoma",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe",
"created": "2012-04-01T00:00:00Z",
"lastModified": "2017-11-01T00:00:00Z",
"alternateId": "CLIMB00003",
"description": "A documentary showing the ascent of Little Tahoma",
"container": "asset-e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountAdams",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "1b648c1a-2268-461d-a1da-742bde23db40",
"created": "2013-02-01T00:00:00Z",
"lastModified": "2017-11-01T00:00:00Z",
"alternateId": "CLIMB00002",
"description": "A documentary showing the ascent of Mount Adams",
"container": "asset-1b648c1a-2268-461d-a1da-742bde23db40",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountBaker",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "89af1750-e681-4fbe-8c4c-9a5567867a6b",
"created": "2011-02-01T00:00:00Z",
"lastModified": "2017-11-01T00:00:00Z",
"alternateId": "CLIMB00004",
"description": "A documentary showing the ascent of Mount Baker",
"container": "asset-89af1750-e681-4fbe-8c4c-9a5567867a6b",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountRainer",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "258878ef-fe05-4518-988f-052e86dc19f6",
"created": "2018-08-08T18:29:24.3948982Z",
"lastModified": "2018-08-08T21:29:24.3948982Z",
"alternateId": "altClimbingMountRainer",
"description": "descClimbingMountRainer",
"container": "testasset0",
"storageAccountName": "storage0",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountRainier",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "f8eea45c-b814-44c2-9c42-a5174ebdee4c",
"created": "2012-11-01T00:00:00Z",
"lastModified": "2012-11-01T00:00:00Z",
"alternateId": "CLIMB00001",
"description": "A documentary showing the ascent of Mount Rainier",
"container": "asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountSaintHelens",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "14d58c40-ec1f-446c-b041-f5cff949bd1d",
"created": "2013-03-01T00:00:00Z",
"lastModified": "2013-04-01T00:00:00Z",
"alternateId": "CLIMB00005",
"description": "A documentary showing the ascent of Saint Helens",
"container": "asset-14d58c40-ec1f-446c-b041-f5cff949bd1d",
"storageEncryptionFormat": "MediaStorageClientEncryption"
}
}
]
}
List Asset created in a date range
Образец запроса
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/assets?api-version=2022-08-01&$filter=properties/created gt 2012-06-01 and properties/created lt 2013-07-01&$orderby=properties/created
/**
* Samples for Assets List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-in-
* date-range.json
*/
/**
* Sample code: List Asset created in a date range.
*
* @param manager Entry point to MediaServicesManager.
*/
public static void
listAssetCreatedInADateRange(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) {
manager.assets().list("contosorg", "contosomedia",
"properties/created gt 2012-06-01 and properties/created lt 2013-07-01", null, "properties/created",
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 assetslistindaterange.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.assets.list(
resource_group_name="contoso",
account_name="contosomedia",
)
for item in response:
print(item)
# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-in-date-range.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/azcore/to"
"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/assets-list-in-date-range.json
func ExampleAssetsClient_NewListPager_listAssetCreatedInADateRange() {
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)
}
pager := clientFactory.NewAssetsClient().NewListPager("contoso", "contosomedia", &armmediaservices.AssetsClientListOptions{Filter: to.Ptr("properties/created gt 2012-06-01 and properties/created lt 2013-07-01"),
Top: nil,
Orderby: to.Ptr("properties/created"),
})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.AssetCollection = armmediaservices.AssetCollection{
// Value: []*armmediaservices.Asset{
// {
// Name: to.Ptr("ClimbingMountRainier"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Mount Rainier"),
// AlternateID: to.Ptr("CLIMB00001"),
// AssetID: to.Ptr("f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
// Container: to.Ptr("asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountAdams"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Mount Adams"),
// AlternateID: to.Ptr("CLIMB00002"),
// AssetID: to.Ptr("1b648c1a-2268-461d-a1da-742bde23db40"),
// Container: to.Ptr("asset-1b648c1a-2268-461d-a1da-742bde23db40"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-02-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountSaintHelens"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Saint Helens"),
// AlternateID: to.Ptr("CLIMB00005"),
// AssetID: to.Ptr("14d58c40-ec1f-446c-b041-f5cff949bd1d"),
// Container: to.Ptr("asset-14d58c40-ec1f-446c-b041-f5cff949bd1d"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-03-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-04-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatMediaStorageClientEncryption),
// },
// }},
// }
}
}
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 Assets in the Media Services account with optional filtering and ordering
*
* @summary List Assets in the Media Services account with optional filtering and ordering
* x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-in-date-range.json
*/
async function listAssetCreatedInADateRange() {
const subscriptionId =
process.env["MEDIASERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["MEDIASERVICES_RESOURCE_GROUP"] || "contoso";
const accountName = "contosomedia";
const filter = "properties/created gt 2012-06-01 and properties/created lt 2013-07-01";
const orderby = "properties/created";
const options = { filter, orderby };
const credential = new DefaultAzureCredential();
const client = new AzureMediaServices(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.assets.list(resourceGroupName, accountName, options)) {
resArray.push(item);
}
console.log(resArray);
}
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;
// Generated from example definition: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-in-date-range.json
// this example is just showing the usage of "Assets_List" 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 MediaServicesAccountResource created on azure
// for more information of creating MediaServicesAccountResource, please refer to the document of MediaServicesAccountResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "contoso";
string accountName = "contosomedia";
ResourceIdentifier mediaServicesAccountResourceId = MediaServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
MediaServicesAccountResource mediaServicesAccount = client.GetMediaServicesAccountResource(mediaServicesAccountResourceId);
// get the collection of this MediaAssetResource
MediaAssetCollection collection = mediaServicesAccount.GetMediaAssets();
// invoke the operation and iterate over the result
string filter = "properties/created gt 2012-06-01 and properties/created lt 2013-07-01";
string orderby = "properties/created";
await foreach (MediaAssetResource item in collection.GetAllAsync(filter: filter, orderby: orderby))
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
MediaAssetData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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
Пример ответа
{
"value": [
{
"name": "ClimbingMountRainier",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "f8eea45c-b814-44c2-9c42-a5174ebdee4c",
"created": "2012-11-01T00:00:00Z",
"lastModified": "2012-11-01T00:00:00Z",
"alternateId": "CLIMB00001",
"description": "A documentary showing the ascent of Mount Rainier",
"container": "asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountAdams",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "1b648c1a-2268-461d-a1da-742bde23db40",
"created": "2013-02-01T00:00:00Z",
"lastModified": "2017-11-01T00:00:00Z",
"alternateId": "CLIMB00002",
"description": "A documentary showing the ascent of Mount Adams",
"container": "asset-1b648c1a-2268-461d-a1da-742bde23db40",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountSaintHelens",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "14d58c40-ec1f-446c-b041-f5cff949bd1d",
"created": "2013-03-01T00:00:00Z",
"lastModified": "2013-04-01T00:00:00Z",
"alternateId": "CLIMB00005",
"description": "A documentary showing the ascent of Saint Helens",
"container": "asset-14d58c40-ec1f-446c-b041-f5cff949bd1d",
"storageEncryptionFormat": "MediaStorageClientEncryption"
}
}
]
}
List Asset ordered by date
Образец запроса
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/assets?api-version=2022-08-01&$orderby=properties/created
/**
* Samples for Assets List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-by-
* date.json
*/
/**
* Sample code: List Asset ordered by date.
*
* @param manager Entry point to MediaServicesManager.
*/
public static void listAssetOrderedByDate(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) {
manager.assets().list("contosorg", "contosomedia", null, null, "properties/created",
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 assetslistbydate.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.assets.list(
resource_group_name="contoso",
account_name="contosomedia",
)
for item in response:
print(item)
# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-by-date.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/azcore/to"
"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/assets-list-by-date.json
func ExampleAssetsClient_NewListPager_listAssetOrderedByDate() {
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)
}
pager := clientFactory.NewAssetsClient().NewListPager("contoso", "contosomedia", &armmediaservices.AssetsClientListOptions{Filter: nil,
Top: nil,
Orderby: to.Ptr("properties/created"),
})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.AssetCollection = armmediaservices.AssetCollection{
// Value: []*armmediaservices.Asset{
// {
// Name: to.Ptr("ClimbingMountBaker"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Mount Baker"),
// AlternateID: to.Ptr("CLIMB00004"),
// AssetID: to.Ptr("89af1750-e681-4fbe-8c4c-9a5567867a6b"),
// Container: to.Ptr("asset-89af1750-e681-4fbe-8c4c-9a5567867a6b"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2011-02-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingLittleTahoma"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingLittleTahoma"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Little Tahoma"),
// AlternateID: to.Ptr("CLIMB00003"),
// AssetID: to.Ptr("e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe"),
// Container: to.Ptr("asset-e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-04-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountRainier"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Mount Rainier"),
// AlternateID: to.Ptr("CLIMB00001"),
// AssetID: to.Ptr("f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
// Container: to.Ptr("asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2012-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountAdams"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Mount Adams"),
// AlternateID: to.Ptr("CLIMB00002"),
// AssetID: to.Ptr("1b648c1a-2268-461d-a1da-742bde23db40"),
// Container: to.Ptr("asset-1b648c1a-2268-461d-a1da-742bde23db40"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-02-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// },
// {
// Name: to.Ptr("ClimbingMountSaintHelens"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("A documentary showing the ascent of Saint Helens"),
// AlternateID: to.Ptr("CLIMB00005"),
// AssetID: to.Ptr("14d58c40-ec1f-446c-b041-f5cff949bd1d"),
// Container: to.Ptr("asset-14d58c40-ec1f-446c-b041-f5cff949bd1d"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-03-01T00:00:00.000Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-04-01T00:00:00.000Z"); return t}()),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatMediaStorageClientEncryption),
// },
// },
// {
// Name: to.Ptr("ClimbingMountRainer"),
// Type: to.Ptr("Microsoft.Media/mediaservices/assets"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer"),
// Properties: &armmediaservices.AssetProperties{
// Description: to.Ptr("descClimbingMountRainer"),
// AlternateID: to.Ptr("altClimbingMountRainer"),
// AssetID: to.Ptr("8cdacfe5-8473-413a-9aec-dd2a478b37c8"),
// Container: to.Ptr("testasset0"),
// Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T18:29:25.051Z"); return t}()),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-08T21:29:25.051Z"); return t}()),
// StorageAccountName: to.Ptr("storage0"),
// StorageEncryptionFormat: to.Ptr(armmediaservices.AssetStorageEncryptionFormatNone),
// },
// }},
// }
}
}
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 Assets in the Media Services account with optional filtering and ordering
*
* @summary List Assets in the Media Services account with optional filtering and ordering
* x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-by-date.json
*/
async function listAssetOrderedByDate() {
const subscriptionId =
process.env["MEDIASERVICES_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["MEDIASERVICES_RESOURCE_GROUP"] || "contoso";
const accountName = "contosomedia";
const orderby = "properties/created";
const options = { orderby };
const credential = new DefaultAzureCredential();
const client = new AzureMediaServices(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.assets.list(resourceGroupName, accountName, options)) {
resArray.push(item);
}
console.log(resArray);
}
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;
// Generated from example definition: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-by-date.json
// this example is just showing the usage of "Assets_List" 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 MediaServicesAccountResource created on azure
// for more information of creating MediaServicesAccountResource, please refer to the document of MediaServicesAccountResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "contoso";
string accountName = "contosomedia";
ResourceIdentifier mediaServicesAccountResourceId = MediaServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
MediaServicesAccountResource mediaServicesAccount = client.GetMediaServicesAccountResource(mediaServicesAccountResourceId);
// get the collection of this MediaAssetResource
MediaAssetCollection collection = mediaServicesAccount.GetMediaAssets();
// invoke the operation and iterate over the result
string orderby = "properties/created";
await foreach (MediaAssetResource item in collection.GetAllAsync(orderby: orderby))
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
MediaAssetData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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
Пример ответа
{
"value": [
{
"name": "ClimbingMountBaker",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "89af1750-e681-4fbe-8c4c-9a5567867a6b",
"created": "2011-02-01T00:00:00Z",
"lastModified": "2017-11-01T00:00:00Z",
"alternateId": "CLIMB00004",
"description": "A documentary showing the ascent of Mount Baker",
"container": "asset-89af1750-e681-4fbe-8c4c-9a5567867a6b",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingLittleTahoma",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingLittleTahoma",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe",
"created": "2012-04-01T00:00:00Z",
"lastModified": "2017-11-01T00:00:00Z",
"alternateId": "CLIMB00003",
"description": "A documentary showing the ascent of Little Tahoma",
"container": "asset-e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountRainier",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "f8eea45c-b814-44c2-9c42-a5174ebdee4c",
"created": "2012-11-01T00:00:00Z",
"lastModified": "2012-11-01T00:00:00Z",
"alternateId": "CLIMB00001",
"description": "A documentary showing the ascent of Mount Rainier",
"container": "asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountAdams",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "1b648c1a-2268-461d-a1da-742bde23db40",
"created": "2013-02-01T00:00:00Z",
"lastModified": "2017-11-01T00:00:00Z",
"alternateId": "CLIMB00002",
"description": "A documentary showing the ascent of Mount Adams",
"container": "asset-1b648c1a-2268-461d-a1da-742bde23db40",
"storageEncryptionFormat": "None"
}
},
{
"name": "ClimbingMountSaintHelens",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "14d58c40-ec1f-446c-b041-f5cff949bd1d",
"created": "2013-03-01T00:00:00Z",
"lastModified": "2013-04-01T00:00:00Z",
"alternateId": "CLIMB00005",
"description": "A documentary showing the ascent of Saint Helens",
"container": "asset-14d58c40-ec1f-446c-b041-f5cff949bd1d",
"storageEncryptionFormat": "MediaStorageClientEncryption"
}
},
{
"name": "ClimbingMountRainer",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer",
"type": "Microsoft.Media/mediaservices/assets",
"properties": {
"assetId": "8cdacfe5-8473-413a-9aec-dd2a478b37c8",
"created": "2018-08-08T18:29:25.0514734Z",
"lastModified": "2018-08-08T21:29:25.0514734Z",
"alternateId": "altClimbingMountRainer",
"description": "descClimbingMountRainer",
"container": "testasset0",
"storageAccountName": "storage0",
"storageEncryptionFormat": "None"
}
}
]
}
Определения
Asset
Ресурс.
Имя |
Тип |
Описание |
id
|
string
|
Полный идентификатор ресурса. Например: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
Имя ресурса.
|
properties.alternateId
|
string
|
Альтернативный идентификатор ресурса.
|
properties.assetId
|
string
|
Идентификатор ресурса.
|
properties.container
|
string
|
Имя контейнера больших двоичных объектов ресурса.
|
properties.created
|
string
|
Дата создания ресурса.
|
properties.description
|
string
|
Описание ресурса.
|
properties.lastModified
|
string
|
Дата последнего изменения ресурса.
|
properties.storageAccountName
|
string
|
Имя учетной записи хранения.
|
properties.storageEncryptionFormat
|
AssetStorageEncryptionFormat
|
Формат шифрования ресурса. Не указан или MediaStorageEncryption.
|
systemData
|
systemData
|
Системные метаданные, относящиеся к этому ресурсу.
|
type
|
string
|
Тип ресурса. Например, Microsoft.Compute/virtualMachines или Microsoft.Storage/storageAccounts.
|
AssetCollection
Коллекция элементов ресурса.
Имя |
Тип |
Описание |
@odata.nextLink
|
string
|
Ссылка на следующую страницу коллекции (если коллекция содержит слишком много результатов для возврата в одном ответе).
|
value
|
Asset[]
|
Коллекция элементов ресурса.
|
Формат шифрования ресурса. Не указан или MediaStorageEncryption.
Имя |
Тип |
Описание |
MediaStorageClientEncryption
|
string
|
Ресурс шифруется с помощью шифрования на стороне клиента Служб мультимедиа.
|
None
|
string
|
Ресурс не использует шифрование хранилища на стороне клиента (это единственное допустимое значение для новых ресурсов).
|
createdByType
Тип удостоверения, создавшего ресурс.
Имя |
Тип |
Описание |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
ErrorAdditionalInfo
Дополнительные сведения об ошибке управления ресурсами.
Имя |
Тип |
Описание |
info
|
object
|
Дополнительные сведения.
|
type
|
string
|
Тип дополнительных сведений.
|
ErrorDetail
Сведения об ошибке.
Имя |
Тип |
Описание |
additionalInfo
|
ErrorAdditionalInfo[]
|
Дополнительные сведения об ошибке.
|
code
|
string
|
Код ошибки.
|
details
|
ErrorDetail[]
|
Сведения об ошибке.
|
message
|
string
|
Сообщение об ошибке.
|
target
|
string
|
Целевой объект ошибки.
|
ErrorResponse
Сообщение об ошибке
systemData
Метаданные, относящиеся к созданию и последнему изменению ресурса.
Имя |
Тип |
Описание |
createdAt
|
string
|
Метка времени создания ресурса (UTC).
|
createdBy
|
string
|
Удостоверение, создающее ресурс.
|
createdByType
|
createdByType
|
Тип удостоверения, создавшего ресурс.
|
lastModifiedAt
|
string
|
Метка времени последнего изменения ресурса (UTC)
|
lastModifiedBy
|
string
|
Удостоверение, которое последним изменял ресурс.
|
lastModifiedByType
|
createdByType
|
Тип удостоверения, которое последним изменял ресурс.
|