I'm building a multitenancy app in Django.
When a Tenant is registered, I want to create an instance of an Azure AI Video Indexer dynamically.
This is my code snippet that creates the Azure Video Indexer:
def create_video_indexer_instance(self, resource_group: ResourceGroup, tenant: Tenant, location: str = "westeurope") -> MediaService:
media_service_name = f'mywise{tenant.subdomain}media'
self.stdout.write(f"Creating storage account for Video Indexer in resource group '{resource_group.name}'...")
vi_storage_account = self.create_storage_account(
resource_group,
tenant,
location,
f'mywise{tenant.subdomain}vistorage'
)
params = MediaService(
location=location,
storage_accounts=[
{ "id": vi_storage_account.id, }
]
)
self.stdout.write(f"Creating Video Indexer instance '{media_service_name}' in resource group '{resource_group.name}'...")
operation = self.media_manager.mediaservices.begin_create_or_update(
resource_group.name,
media_service_name,
params
)
media_service = operation.result()
self.stdout.write(f"Video Indexer instance '{media_service_name}' created successfully.")
return media_service
I get this error:
azure.core.exceptions.HttpResponseError: (BadRequest) Creation of new Media Service accounts are not allowed as the resource has been deprecated.
Code: BadRequest
Message: Creation of new Media Service accounts are not allowed as the resource has been deprecated.
Exception Details: (MediaServiceAccountCreationDisabled) Creation of new Media Service accounts are not allowed as the resource has been deprecated.
Code: MediaServiceAccountCreationDisabled
Message: Creation of new Media Service accounts are not allowed as the resource has been deprecated.
I understand that Azure Video Indexer was retired from Media Services, just as announced.However, I tried to find a new way to do this in the official documentation, but I can't find it.
Can someone help me? Is there a new approach to make this? Where can I find it?
Thank you!