Memantau kunci snapshot menggunakan Amazon EventBridge - Amazon Elastic Compute Cloud

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Memantau kunci snapshot menggunakan Amazon EventBridge

Amazon EBS memancarkan peristiwa yang terkait dengan tindakan kunci snapshot. Anda dapat menggunakan AWS Lambda dan Amazon EventBridge untuk menangani pemberitahuan acara secara terprogram. Peristiwa dipancarkan atas dasar upaya terbaik. Untuk informasi selengkapnya, lihat Panduan EventBridge Pengguna Amazon.

Peristiwa berikut dipancarkan:

  • Snapshot berhasil dikunci dalam mode tata kelola atau kepatuhan.

    { "version": "0", "id": "01234567-01234-0123-0123-012345678901", "detail-type": "EBS Snapshot Notification", "source": "aws.ec2", "account": "012345678901", "time": "yyyy-mm-ddThh:mm:ssZ", "region": "us-east-1", "resources": [ "arn:aws:ec2::us-west-2:snapshot/snap-01234567890abcdef" ], "detail": { "event": "lockSnapshot", "result": "succeeded", "snapshot_id": "arn:aws:ec2::us-west-2:snapshot/snap-01234567890abcdef", "source": 012345678901, "lockState": "compliance-cooloff", "lockCreatedOn": "yyyy-mm-ddThh:mm:ssZ", "lockExpiresOn": "yyyy-mm-ddThh:mm:ssZ", "lockDuration": 123, "lockStartDurationTime": "yyyy-mm-ddThh:mm:ssZ", "cooOffPeriod": 24, "coolOffPeriodExpiresOn": "yyyy-mm-ddThh:mm:ssZ" } }
  • Peristiwa penguncian gagal jika snapshot dikunci saat berada dalam status pending, dan snapshot gagal mencapai status completed.

    { "version": "0", "id": "01234567-01234-0123-0123-012345678901", "detail-type": "EBS Snapshot Notification", "source": "aws.ec2", "account": "012345678901", "time": "yyyy-mm-ddThh:mm:ssZ", "region": "us-east-1", "resources": [ "arn:aws:ec2::us-west-2:snapshot/snap-01234567890abcdef" ], "detail": { "event": "lockSnapshot", "result": "failed", "cause": "snapshot failed", "snapshot_id": "arn:aws:ec2::us-west-2:snapshot/snap-01234567890abcdef", "lockState": "pending-compliance", "lockCreatedOn": "yyyy-mm-ddThh:mm:ssZ", "lockDuration": 123, "lockStartDurationTime": "yyyy-mm-ddThh:mm:ssZ", "cooOffPeriod": 24, "coolOffPeriodExpiresOn": "yyyy-mm-ddThh:mm:ssZ" } }
  • Kunci kedaluwarsa

    { "version": "0", "id": "01234567-01234-0123-0123-012345678901", "detail-type": "EBS Snapshot Notification", "source": "aws.ec2", "account": "012345678901", "time": "yyyy-mm-ddThh:mm:ssZ", "region": "us-east-1", "resources": [ "arn:aws:ec2::us-west-2:snapshot/snap-01234567890abcdef" ], "detail": { "event": "lockDurationExpiry", "result": "succeeded", "snapshot_id": "arn:aws:ec2::us-west-2:snapshot/snap-01234567890abcdef", "lockState": "expired", "lockCreatedOn": "yyyy-mm-ddThh:mm:ssZ", "lockExpiresOn": "yyyy-mm-ddThh:mm:ssZ", "lockDuration": 123 } }
  • Periode pendinginan berakhir setelah dikunci dalam mode kepatuhan.

    { "version": "0", "id": "01234567-01234-0123-0123-012345678901", "detail-type": "EBS Snapshot Notification", "source": "aws.ec2", "account": "012345678901", "time": "yyyy-mm-ddThh:mm:ssZ", "region": "us-east-1", "resources": [ "arn:aws:ec2::us-west-2:snapshot/snap-01234567890abcdef" ], "detail": { "event": "cooloffperiodExpiry", "result": "succeeded", "snapshot_id": "arn:aws:ec2::us-west-2:snapshot/snap-01234567890abcdef", "lockState": "compliance", "lockCreatedOn": "yyyy-mm-ddThh:mm:ssZ", "lockExpiresOn": "yyyy-mm-ddThh:mm:ssZ", "lockDuration": 123, "lockStartDurationTime": "yyyy-mm-ddThh:mm:ssZ", "cooOffPeriod": 24, "coolOffPeriodExpiresOn": "yyyy-mm-ddThh:mm:ssZ" } }