aws api Health- get list eventTypeCodes

0

hi, I would like to use the api methods :describe-events-for-organization (Health service) , but I need to use the eventTypeCodes parameter before calling the methods. I would like to know all the possible eventtypecodes that exist for each services. otherwise I would have no way to properly filter the events under contract. (sla). can you tell me how to solve this problem? thank you

how can i get the list of all the eventTypeCodes ?? eventTypeCodes

thank you describe-events-for-organization https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/health.html#Health.Client.describe_events_for_organization

已提問 2 年前檢視次數 1000 次
2 個答案
1

You can use the CLI command - describe-event-types[1] that returns the event types that meet a specified filter criteria. In case, you don't specify a filter criteria, the API operation returns all event types, in no particular order. From the response, you can iterate through the eventTypes list and extract the 'code' from each event object to get the eventTypeCodes. Kindly note that this API operation uses pagination, hence, specify the nextToken parameter in the next request to return more results.

Also, find the boto3 documentation of the describe_event_types[2] operation.

[1] https://docs.aws.amazon.com/cli/latest/reference/health/describe-event-types.html#describe-event-types

[2] https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/health.html#Health.Client.describe_event_types

profile pictureAWS
已回答 2 年前
  • I'm sorry, but I have another particular problem that I would like to understand where am I wrong ...

0

thanks for your answer!! . i applied the method and i get 1147 event type code. I thought I solved it but instead there are some types of events registered in the last month that are not present among the 1147 event codes loaded. How is it possible ? same region.

example: for this type of event code I am not receiving information : AWS_DYNAMODB_CONTROLPLANE_API_ISSUE services = clientHealth.describe_event_types( filter={ "eventTypeCategories": ['issue'], "eventTypeCodes": ['AWS_DYNAMODB_CONTROLPLANE_API_ISSUE'], "services": ['DYNAMODB'] })

but it turns out a precise event arn with this event code type that happened in early September 2022 (call describe_events_for_organization). why the event code type is not returned when calling the method describe-event-types ? Thanks for your help...

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南