When looking at the possible event types for an EventGrid Subscription, one is Blob Renamed.
How is this event triggered when using the Azure Python SDK?
I don't see a Rename Blob method in the SDK.
How to trigger the
Blob RenamedEventGrid Event using Azure Python SDK?
I agree with user459872's comment that a normal v2 storage account does not seem to support the rename operation with Azure Blob Storage Python SDK.
To trigger this event using the Azure Python SDK, you can use the code below to rename a blob using the Azure Blob Storage Python SDK. This will copy the blob to a new blob with the new name and then delete the old blob.
Code:
from azure.storage.blob import BlobServiceClient
connection_string = "<Your connection string>"
blob_service_client = BlobServiceClient.from_connection_string(connection_string)
container_client = blob_service_client.get_container_client("test")
blob_client = container_client.get_blob_client("sample.png")
new_blob_name = "example.png"
new_blob_client = container_client.get_blob_client(new_blob_name)
new_blob_client.start_copy_from_url(blob_client.url)
blob_client.delete_blob()
print("The blob is renamed successfully:", {new_blob_name})
Output:
The blob is renamed successfully: {'example.png'}

Reference: How to rename an already existing blob in azure storage explorer using python - Stack Overflow.
CreateBlob event in EventGrid, NOT the RenameBlob event.
Blob Renamedevent type is under theFilterstab on the EventGrid Subscription I'm configuring.RenameFileoperation that is available in the Azure Data Lake Storage Gen2 REST API.BlobClientdocs ](learn.microsoft.com/en-us/python/api/azure-storage-blob/…) forRename-anything. Is this functionality NOT available in the Python SDK? Would be undesirable to switch to REST API usingrequestslibrary when I'm using built-in methods otherwise.