AssetsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:assets> attribute.
- Inheritance
-
builtins.objectAssetsOperations
Constructor
AssetsOperations(*args, **kwargs)
Methods
create_or_update |
Create or update an Asset. Creates or updates an Asset in the Media Services account. |
delete |
Delete an Asset. Deletes an Asset in the Media Services account. |
get |
Get an Asset. Get the details of an Asset in the Media Services account. |
get_encryption_key |
Gets the Asset storage key. Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. |
list |
List Assets. List Assets in the Media Services account with optional filtering and ordering. |
list_container_sas |
List the Asset URLs. Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures are derived from the storage account keys. |
list_streaming_locators |
List Streaming Locators. Lists Streaming Locators which are associated with this asset. |
update |
Update an Asset. Updates an existing Asset in the Media Services account. |
create_or_update
Create or update an Asset.
Creates or updates an Asset in the Media Services account.
async create_or_update(resource_group_name: str, account_name: str, asset_name: str, parameters: _models.Asset, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Asset
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the Azure subscription. Required. |
account_name
Required
|
The Media Services account name. Required. |
asset_name
Required
|
The Asset name. Required. |
parameters
Required
|
The request parameters. Is either a model type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
Asset or the result of cls(response) |
Exceptions
Type | Description |
---|---|
delete
Delete an Asset.
Deletes an Asset in the Media Services account.
async delete(resource_group_name: str, account_name: str, asset_name: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the Azure subscription. Required. |
account_name
Required
|
The Media Services account name. Required. |
asset_name
Required
|
The Asset name. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Get an Asset.
Get the details of an Asset in the Media Services account.
async get(resource_group_name: str, account_name: str, asset_name: str, **kwargs: Any) -> Asset
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the Azure subscription. Required. |
account_name
Required
|
The Media Services account name. Required. |
asset_name
Required
|
The Asset name. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
Asset or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_encryption_key
Gets the Asset storage key.
Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API.
async get_encryption_key(resource_group_name: str, account_name: str, asset_name: str, **kwargs: Any) -> StorageEncryptedAssetDecryptionData
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the Azure subscription. Required. |
account_name
Required
|
The Media Services account name. Required. |
asset_name
Required
|
The Asset name. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
StorageEncryptedAssetDecryptionData or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
List Assets.
List Assets in the Media Services account with optional filtering and ordering.
list(resource_group_name: str, account_name: str, filter: str | None = None, top: int | None = None, orderby: str | None = None, **kwargs: Any) -> AsyncIterable[Asset]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the Azure subscription. Required. |
account_name
Required
|
The Media Services account name. Required. |
filter
Required
|
Restricts the set of items returned. Default value is None. |
top
Required
|
Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. Default value is None. |
orderby
Required
|
Specifies the key by which the result collection should be ordered. Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either Asset or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_container_sas
List the Asset URLs.
Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures are derived from the storage account keys.
async list_container_sas(resource_group_name: str, account_name: str, asset_name: str, parameters: _models.ListContainerSasInput, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AssetContainerSas
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the Azure subscription. Required. |
account_name
Required
|
The Media Services account name. Required. |
asset_name
Required
|
The Asset name. Required. |
parameters
Required
|
The request parameters. Is either a model type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
AssetContainerSas or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_streaming_locators
List Streaming Locators.
Lists Streaming Locators which are associated with this asset.
async list_streaming_locators(resource_group_name: str, account_name: str, asset_name: str, **kwargs: Any) -> ListStreamingLocatorsResponse
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the Azure subscription. Required. |
account_name
Required
|
The Media Services account name. Required. |
asset_name
Required
|
The Asset name. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
ListStreamingLocatorsResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
update
Update an Asset.
Updates an existing Asset in the Media Services account.
async update(resource_group_name: str, account_name: str, asset_name: str, parameters: _models.Asset, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Asset
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the Azure subscription. Required. |
account_name
Required
|
The Media Services account name. Required. |
asset_name
Required
|
The Asset name. Required. |
parameters
Required
|
The request parameters. Is either a model type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
Asset or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.media.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\media\\models\\__init__.py'>
Azure SDK for Python