6.74. EventSubscriptions
사용자의 이벤트 서브스크립션 컬렉션을 관리하는 서비스를 나타냅니다.
이름 | 요약 |
---|---|
| 시스템에 새 event-subscription를 추가합니다. |
| 제공된 사용자의 이벤트 서브스크립션을 나열합니다. |
6.74.1. POST추가
시스템에 새 event-subscription를 추가합니다.
이벤트 구독은 항상 사용자 컨텍스트에서 추가됩니다.An event-subscription is always added in the context of a user. 예를 들어 사용자 123
에 대해 host_high_cpu_use
에 대한 새 event-subscription를 추가하고 이메일 주소로 알림이 전송되도록 하려면 다음과 같은 요청을 보냅니다.
POST /ovirt-engine/api/users/123/eventsubscriptions
다음과 같이 요청 본문이 있는 경우:
<event_subscription> <event>host_high_cpu_use</event> <address>a@b.com</address> </event_subscription>
이벤트 이름은 새 event-subscription 엔티티의 ID가 됩니다. GET …/api/users/123/eventsubscriptions/host_high_cpu_use
요청 본문에 사용자 ID가 제공되지 않습니다. 이는 사용자 ID(이 경우 123)가 컨텍스트에서 API에 이미 알려져 있기 때문입니다. 또한 event-subscription 엔터티에 notification-method 필드가 포함되어 있지만 요청 본문에는 제공되지 않습니다. 현재 항상 SNMP 알림으로 설정되어 있는 것은 API 계층에서 지원되지 않기 때문입니다.
이름 | 유형 | 방향 | 요약 |
---|---|---|---|
| in/Out | 추가된 event-subscription. |
6.74.2. GET나열
제공된 사용자의 이벤트 서브스크립션을 나열합니다.
예를 들어 사용자 123
의 event-subscriptions를 나열하려면 다음을 수행합니다.
GET /ovirt-engine/api/users/123/event-subscriptions
<event-subscriptions> <event-subscription href="/ovirt-engine/api/users/123/event-subscriptions/host_install_failed"> <event>host_install_failed</event> <notification_method>smtp</notification_method> <user href="/ovirt-engine/api/users/123" id="123"/> <address>a@b.com</address> </event-subscription> <event-subscription href="/ovirt-engine/api/users/123/event-subscriptions/vm_paused"> <event>vm_paused</event> <notification_method>smtp</notification_method> <user href="/ovirt-engine/api/users/123" id="123"/> <address>a@b.com</address> </event-subscription> </event-subscriptions>
이름 | 유형 | 방향 | 요약 |
---|---|---|---|
| Out | 지정된 사용자의 이벤트 서브스크립션 목록 | |
| in | 따라야 할 내부 링크를 나타냅니다. | |
| in | 반환할 이벤트 서브스크립션의 최대 수를 설정합니다. |
6.74.2.1. 팔로우
따라야 할 내부 링크를 나타냅니다. 이러한 링크에서 참조하는 오브젝트는 현재 요청의 일부로 가져옵니다. 자세한 내용은 여기를 참조하십시오.
6.74.2.2. max
반환할 이벤트 서브스크립션의 최대 수를 설정합니다. 지정하지 않으면 모든 event-subscriptions가 반환됩니다.