공유 Capacity Reservations에 대한 과금 지정 요청 모니터링하기

공유 Capacity Reservations에 대한 과금 지정 요청 모니터링하기

과금 지정(billing assignment) 요청의 상태가 바뀌면 Amazon EC2가 Amazon EventBridge 이벤트를 보내요. 이 절에서는 이벤트가 언제, 어떤 대상에게 전송되는지, 그리고 이벤트 패턴이 어떻게 생겼는지 살펴볼게요.

출처: 문서

본문

Amazon EC2는 과금 지정 요청의 상태가 바뀌면 Amazon EventBridge 이벤트를 보내요.

  • 요청이 accepted, rejected, expired, revoked 상태로 들어가면 이벤트가 Capacity Reservation 소유자에게 전송돼요.
  • 요청이 pending, expired, cancelled, revoked 상태로 들어가면 이벤트가 요청된 consumer 계정에 전송돼요.

Amazon EventBridge에 대한 자세한 내용은 Amazon EventBridge User Guide를 참고하세요.

다음은 Amazon EventBridge 이벤트 패턴이에요.

{
  "version":"0",
  "id":"12345678-1234-1234-1234-123456789012",
  "detail-type":"On-Demand Capacity Reservation Billing Ownership Request pending|accepted|rejected|cancelled|revoked|expired",
  "source":"aws.ec2",
  "account":"account_id",
  "time":"state_change_timestamp",
  "region":"region",
  "resources":[
    "arn:aws:ec2:region:cr_owner_account_id:capacity-reservation/cr_id"
  ],
  "detail":{
    "capacity-reservation-id":"cr_id",
    "updateTime":timestamp,
    "ownerAccountId":"cr_owner_account_id",
    "unusedReservationChargesOwnerID":"consumer_account_id",
    "status":"pending|accepted|rejected|cancelled|revoked|expired",
    "statusMessage":"message"
  }
}

다음은 consumer 계정(111111111111)이 공유 Capacity Reservation(cr-01234567890abcdef)에 대한 과금 지정 요청을 수락했을 때 Capacity Reservation 소유자(222222222222)에게 전송되는 이벤트 예시예요.

{
  "version":"0",
  "id":"12345678-1234-1234-1234-123456789012",
  "detail-type":"On-Demand Capacity Reservation Billing Ownership Request accepted",
  "source":"aws.ec2",
  "account":"222222222222",
  "time":"2024-09-01Thh:59:59Z",
  "region":"us-east-1",
  "resources":[
    "arn:aws:ec2:us-east-1:222222222222:capacity-reservation/cr-01234567890abcdef"
  ],
  "detail":{
    "capacity-reservation-id":"cr-01234567890abcdef",
    "updateTime":"2024-08-01Thh:59:59Z",
    "ownerAccountId":"222222222222",
    "unusedReservationChargesOwnerID":"111111111111",
    "status":"accepted",
    "statusMessage":"billing transfer status message"
  }
}

더 알아보기