Megosztás a következőn keresztül:


Assets - Create Or Update

Eszköz létrehozása vagy frissítése
Objektum létrehozása vagy frissítése a Media Services-fiókban

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}?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.

assetName
path True

string

Az Eszköz neve.

resourceGroupName
path True

string

Az Azure-előfizetésben található erőforráscsoport 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.

Kérelem törzse

Name Típus Description
properties.alternateId

string

Az eszköz alternatív azonosítója.

properties.container

string

Az eszköz blobtárolójának neve.

properties.description

string

Az eszköz leírása.

properties.storageAccountName

string

A tárfiók neve.

Válaszok

Name Típus Description
200 OK

Asset

OK

201 Created

Asset

Létrehozva

Other Status Codes

ErrorResponse

Részletes hibainformációk.

Példák

Create an Asset

Mintakérelem

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/assets/ClimbingMountLogan?api-version=2022-08-01

{
  "properties": {
    "description": "A documentary showing the ascent of Mount Logan",
    "storageAccountName": "storage0"
  }
}

Mintaválasz

{
  "name": "ClimbingMountLogan",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountLogan",
  "type": "Microsoft.Media/mediaservices/assets",
  "properties": {
    "assetId": "09194258-36ba-4403-abb3-68780e6bc545",
    "created": "2018-08-08T18:29:26.08Z",
    "lastModified": "2018-08-08T18:29:26.08Z",
    "description": "A documentary showing the ascent of Mount Logan",
    "container": "asset-09194258-36ba-4403-abb3-68780e6bc545",
    "storageAccountName": "storage0",
    "storageEncryptionFormat": "None"
  }
}
{
  "name": "ClimbingMountLogan",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountLogan",
  "type": "Microsoft.Media/mediaservices/assets",
  "properties": {
    "assetId": "09194258-36ba-4403-abb3-68780e6bc545",
    "created": "2018-08-08T18:29:26.08Z",
    "lastModified": "2018-08-08T18:29:26.107Z",
    "description": "A documentary showing the ascent of Mount Logan",
    "container": "asset-09194258-36ba-4403-abb3-68780e6bc545",
    "storageAccountName": "storage0",
    "storageEncryptionFormat": "None"
  }
}

Definíciók

Name Description
Asset

Egy objektum.

AssetStorageEncryptionFormat

Az Eszköz titkosítási formátuma. A Nincs vagy a MediaStorageEncryption egyike.

createdByType

Az erőforrást létrehozó identitás típusa.

ErrorAdditionalInfo

Az erőforrás-kezelési hiba további információi.

ErrorDetail

A hiba részletei.

ErrorResponse

Hibaválasz

systemData

Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.

Asset

Egy objektum.

Name Típus Description
id

string

Az erőforrás teljes erőforrás-azonosítója. Ex – /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Az erőforrás neve

properties.alternateId

string

Az eszköz alternatív azonosítója.

properties.assetId

string

Az eszköz azonosítója.

properties.container

string

Az eszköz blobtárolójának neve.

properties.created

string

Az eszköz létrehozási dátuma.

properties.description

string

Az eszköz leírása.

properties.lastModified

string

Az eszköz utolsó módosítási dátuma.

properties.storageAccountName

string

A tárfiók neve.

properties.storageEncryptionFormat

AssetStorageEncryptionFormat

Az Eszköz titkosítási formátuma. A Nincs vagy a MediaStorageEncryption egyike.

systemData

systemData

Az erőforráshoz kapcsolódó rendszer metaadatai.

type

string

Az erőforrás típusa. Például "Microsoft.Compute/virtualMachines" vagy "Microsoft.Storage/storageAccounts"

AssetStorageEncryptionFormat

Az Eszköz titkosítási formátuma. A Nincs vagy a MediaStorageEncryption egyike.

Name Típus Description
MediaStorageClientEncryption

string

Az eszköz a Media Services ügyféloldali titkosításával van titkosítva.

None

string

Az eszköz nem használ ügyféloldali tárolótitkosítást (ez az egyetlen engedélyezett érték az új objektumok esetében).

createdByType

Az erőforrást létrehozó identitás típusa.

Name Típus Description
Application

string

Key

string

ManagedIdentity

string

User

string

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.

systemData

Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.

Name Típus Description
createdAt

string

Az erőforrás-létrehozás időbélyege (UTC).

createdBy

string

Az erőforrást létrehozó identitás.

createdByType

createdByType

Az erőforrást létrehozó identitás típusa.

lastModifiedAt

string

Az erőforrás utolsó módosításának időbélyege (UTC)

lastModifiedBy

string

Az az identitás, amely legutóbb módosította az erőforrást.

lastModifiedByType

createdByType

Az erőforrást legutóbb módosító identitás típusa.