6.74. EventSubscriptions


사용자의 이벤트 서브스크립션 컬렉션을 관리하는 서비스를 나타냅니다.

표 6.217. 메서드 요약
이름요약

add

시스템에 새 event-subscription를 추가합니다.

list

제공된 사용자의 이벤트 서브스크립션을 나열합니다.

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 계층에서 지원되지 않기 때문입니다.

표 6.218. 매개변수 요약
이름유형방향요약

event_subscription

EventSubscription

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>
표 6.219. 매개변수 요약
이름유형방향요약

event_subscriptions

EventSubscription[]

Out

지정된 사용자의 이벤트 서브스크립션 목록

팔로우

문자열

in

따라야 할 내부 링크를 나타냅니다.

max

정수

in

반환할 이벤트 서브스크립션의 최대 수를 설정합니다.

6.74.2.1. 팔로우

따라야 할 내부 링크를 나타냅니다. 이러한 링크에서 참조하는 오브젝트는 현재 요청의 일부로 가져옵니다. 자세한 내용은 여기를 참조하십시오.

6.74.2.2. max

반환할 이벤트 서브스크립션의 최대 수를 설정합니다. 지정하지 않으면 모든 event-subscriptions가 반환됩니다.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.