Azure Cache for Redis sebagai sumber Event Grid
Artikel ini menyediakan properti dan skema untuk peristiwa Azure Cache for Redis. Untuk pengantar skema peristiwa, lihat Skema peristiwa Azure Event Grid.
Tipe kejadian yang tersedia
Peristiwa ini dipicu saat klien mengekspor, mengimpor, atau menskalakan dengan memanggil REST API Azure Cache for Redis. Peristiwa patching dipicu oleh pembaruan Redis.
Nama kejadian | Deskripsi |
---|---|
Microsoft.Cache.ExportRDBCompleted | Dipicu saat data cache diekspor. |
Microsoft.Cache.ImportRDBCompleted | Dipicu saat data cache diimpor. |
Microsoft.Cache.PatchingCompleted | Dipicu saat patching selesai. |
Microsoft.Cache.ScalingCompleted | Dipicu saat penskalaan selesai. |
Contoh peristiwa
Lalu, ketika suatu kejadian dipicu, layanan Event Grid akan mengirim data tentang kejadian itu ke titik akhir. Bagian ini berisi contoh tampilan data tersebut untuk setiap peristiwa Azure Cache for Redis.
Peristiwa Microsoft.Cache.PatchingCompleted
[{
"id": "9b87886d-21a5-4af5-8e3e-10c4b8dac73b",
"type": "Microsoft.Cache.PatchingCompleted",
"source": "/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Cache/Redis/{cache_name}",
"data": {
"name": "PatchingCompleted",
"timestamp": "2020-12-09T21:50:19.9995668+00:00",
"status": "Succeeded"
},
"subject": "PatchingCompleted",
"time": "2020-12-09T21:50:19.9995668+00:00",
"specversion": "1.0"
}]
Peristiwa Microsoft.Cache.ImportRDBCompleted
[{
"id": "9b87886d-21a5-4af5-8e3e-10c4b8dac73b",
"type": "Microsoft.Cache.ImportRDBCompleted",
"source": "/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Cache/Redis/{cache_name}",
"data": {
"name": "ImportRDBCompleted",
"timestamp": "2020-12-09T21:50:19.9995668+00:00",
"status": "Succeeded"
},
"subject": "ImportRDBCompleted",
"eventTime": "2020-12-09T21:50:19.9995668+00:00",
"specversion": "1.0"
}]
Peristiwa Microsoft.Cache.ExportRDBCompleted
[{
"id": "9b87886d-21a5-4af5-8e3e-10c4b8dac73b",
"type": "Microsoft.Cache.ExportRDBCompleted",
"source": "/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Cache/Redis/{cache_name}",
"data": {
"name": "ExportRDBCompleted",
"timestamp": "2020-12-09T21:50:19.9995668+00:00",
"status": "Succeeded"
},
"subject": "ExportRDBCompleted",
"time": "2020-12-09T21:50:19.9995668+00:00",
"specversion": "1.0"
}]
Microsoft.Cache.ScalingCompleted
[{
"id": "9b87886d-21a5-4af5-8e3e-10c4b8dac73b",
"type": "Microsoft.Cache.ScalingCompleted",
"source": "/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Cache/Redis/{cache_name}",
"data": {
"name": "ScalingCompleted",
"timestamp": "2020-12-09T21:50:19.9995668+00:00",
"status": "Succeeded"
},
"subject": "ScalingCompleted",
"time": "2020-12-09T21:50:19.9995668+00:00",
"specversion": "1.0"
}]
Properti kejadian
Sebuah peristiwa memiliki data tingkat atas berikut ini:
Properti | Tipe | Deskripsi |
---|---|---|
source |
string | Jalur sumber daya lengkap ke sumber kejadian. Bidang ini tidak dapat ditulis. Event Grid memberikan nilai ini. |
subject |
string | Jalur yang ditentukan penerbit ke subjek kejadian. |
type |
string | Salah satu jenis kejadian terdaftar untuk sumber kejadian ini. |
time |
string | Waktu peristiwa dibuat berdasarkan waktu UTC penyedia. |
id |
string | Pengidentifikasi unik untuk peristiwa tersebut. |
data |
object | Data peristiwa Azure Cache for Redis. |
specversion |
string | Versi spesifikasi skema CloudEvents. |
Objek data memiliki properti berikut:
Properti | Tipe | Deskripsi |
---|---|---|
timestamp |
string | Waktu ketika peristiwa terjadi. |
name |
string | Nama peristiwa. |
status |
string | Status peristiwa. Gagal atau berhasil. |
Mulai cepat
Jika Anda ingin mencoba peristiwa Azure Cache for Redis, lihat salah satu artikel mulai cepat ini:
Jika Anda ingin menggunakan alat ini: | Lihat artikel ini: |
---|---|
Portal Azure | Mulai cepat: Merutekan peristiwa Azure Cache for Redis ke titik akhir web dengan portal Microsoft Azure |
PowerShell | Mulai cepat: Merutekan peristiwa Azure Cache for Redis ke titik akhir web dengan PowerShell |
Azure CLI | Mulai Cepat: Merutekan kejadian Azure Cache for Redis ke titik akhir web dengan Azure CLI |
Langkah berikutnya
- Untuk pengenalan Azure Event Grid, lihat Apa itu Event Grid?
- Untuk informasi selengkapnya tentang cara membuat langganan Azure Event Grid, lihat Skema langganan Event Grid.