UNPKG

25.2 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class Health extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: Health.Types.ClientConfiguration)
13 config: Config & Health.Types.ClientConfiguration;
14 /**
15 * Returns a list of entities that have been affected by the specified events, based on the specified filter criteria. Entities can refer to individual customer resources, groups of customer resources, or any other construct, depending on the AWS service. Events that have impact beyond that of the affected entities, or where the extent of impact is unknown, include at least one entity indicating this. At least one event ARN is required. Results are sorted by the lastUpdatedTime of the entity, starting with the most recent.
16 */
17 describeAffectedEntities(params: Health.Types.DescribeAffectedEntitiesRequest, callback?: (err: AWSError, data: Health.Types.DescribeAffectedEntitiesResponse) => void): Request<Health.Types.DescribeAffectedEntitiesResponse, AWSError>;
18 /**
19 * Returns a list of entities that have been affected by the specified events, based on the specified filter criteria. Entities can refer to individual customer resources, groups of customer resources, or any other construct, depending on the AWS service. Events that have impact beyond that of the affected entities, or where the extent of impact is unknown, include at least one entity indicating this. At least one event ARN is required. Results are sorted by the lastUpdatedTime of the entity, starting with the most recent.
20 */
21 describeAffectedEntities(callback?: (err: AWSError, data: Health.Types.DescribeAffectedEntitiesResponse) => void): Request<Health.Types.DescribeAffectedEntitiesResponse, AWSError>;
22 /**
23 * Returns the number of entities that are affected by each of the specified events. If no events are specified, the counts of all affected entities are returned.
24 */
25 describeEntityAggregates(params: Health.Types.DescribeEntityAggregatesRequest, callback?: (err: AWSError, data: Health.Types.DescribeEntityAggregatesResponse) => void): Request<Health.Types.DescribeEntityAggregatesResponse, AWSError>;
26 /**
27 * Returns the number of entities that are affected by each of the specified events. If no events are specified, the counts of all affected entities are returned.
28 */
29 describeEntityAggregates(callback?: (err: AWSError, data: Health.Types.DescribeEntityAggregatesResponse) => void): Request<Health.Types.DescribeEntityAggregatesResponse, AWSError>;
30 /**
31 * Returns the number of events of each event type (issue, scheduled change, and account notification). If no filter is specified, the counts of all events in each category are returned.
32 */
33 describeEventAggregates(params: Health.Types.DescribeEventAggregatesRequest, callback?: (err: AWSError, data: Health.Types.DescribeEventAggregatesResponse) => void): Request<Health.Types.DescribeEventAggregatesResponse, AWSError>;
34 /**
35 * Returns the number of events of each event type (issue, scheduled change, and account notification). If no filter is specified, the counts of all events in each category are returned.
36 */
37 describeEventAggregates(callback?: (err: AWSError, data: Health.Types.DescribeEventAggregatesResponse) => void): Request<Health.Types.DescribeEventAggregatesResponse, AWSError>;
38 /**
39 * Returns detailed information about one or more specified events. Information includes standard event data (region, service, etc., as returned by DescribeEvents), a detailed event description, and possible additional metadata that depends upon the nature of the event. Affected entities are not included; to retrieve those, use the DescribeAffectedEntities operation. If a specified event cannot be retrieved, an error message is returned for that event.
40 */
41 describeEventDetails(params: Health.Types.DescribeEventDetailsRequest, callback?: (err: AWSError, data: Health.Types.DescribeEventDetailsResponse) => void): Request<Health.Types.DescribeEventDetailsResponse, AWSError>;
42 /**
43 * Returns detailed information about one or more specified events. Information includes standard event data (region, service, etc., as returned by DescribeEvents), a detailed event description, and possible additional metadata that depends upon the nature of the event. Affected entities are not included; to retrieve those, use the DescribeAffectedEntities operation. If a specified event cannot be retrieved, an error message is returned for that event.
44 */
45 describeEventDetails(callback?: (err: AWSError, data: Health.Types.DescribeEventDetailsResponse) => void): Request<Health.Types.DescribeEventDetailsResponse, AWSError>;
46 /**
47 * Returns the event types that meet the specified filter criteria. If no filter criteria are specified, all event types are returned, in no particular order.
48 */
49 describeEventTypes(params: Health.Types.DescribeEventTypesRequest, callback?: (err: AWSError, data: Health.Types.DescribeEventTypesResponse) => void): Request<Health.Types.DescribeEventTypesResponse, AWSError>;
50 /**
51 * Returns the event types that meet the specified filter criteria. If no filter criteria are specified, all event types are returned, in no particular order.
52 */
53 describeEventTypes(callback?: (err: AWSError, data: Health.Types.DescribeEventTypesResponse) => void): Request<Health.Types.DescribeEventTypesResponse, AWSError>;
54 /**
55 * Returns information about events that meet the specified filter criteria. Events are returned in a summary form and do not include the detailed description, any additional metadata that depends on the event type, or any affected resources. To retrieve that information, use the DescribeEventDetails and DescribeAffectedEntities operations. If no filter criteria are specified, all events are returned. Results are sorted by lastModifiedTime, starting with the most recent.
56 */
57 describeEvents(params: Health.Types.DescribeEventsRequest, callback?: (err: AWSError, data: Health.Types.DescribeEventsResponse) => void): Request<Health.Types.DescribeEventsResponse, AWSError>;
58 /**
59 * Returns information about events that meet the specified filter criteria. Events are returned in a summary form and do not include the detailed description, any additional metadata that depends on the event type, or any affected resources. To retrieve that information, use the DescribeEventDetails and DescribeAffectedEntities operations. If no filter criteria are specified, all events are returned. Results are sorted by lastModifiedTime, starting with the most recent.
60 */
61 describeEvents(callback?: (err: AWSError, data: Health.Types.DescribeEventsResponse) => void): Request<Health.Types.DescribeEventsResponse, AWSError>;
62}
63declare namespace Health {
64 export interface AffectedEntity {
65 /**
66 * The unique identifier for the entity. Format: arn:aws:health:entity-region:aws-account:entity/entity-id . Example: arn:aws:health:us-east-1:111222333444:entity/AVh5GGT7ul1arKr1sE1K
67 */
68 entityArn?: entityArn;
69 /**
70 * The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
71 */
72 eventArn?: eventArn;
73 /**
74 * The ID of the affected entity.
75 */
76 entityValue?: entityValue;
77 entityUrl?: entityUrl;
78 /**
79 * The 12-digit AWS account number that contains the affected entity.
80 */
81 awsAccountId?: accountId;
82 /**
83 * The most recent time that the entity was updated.
84 */
85 lastUpdatedTime?: timestamp;
86 /**
87 * The most recent status of the entity affected by the event. The possible values are IMPAIRED, UNIMPAIRED, and UNKNOWN.
88 */
89 statusCode?: entityStatusCode;
90 /**
91 * A map of entity tags attached to the affected entity.
92 */
93 tags?: tagSet;
94 }
95 export interface DateTimeRange {
96 /**
97 * The starting date and time of a time range.
98 */
99 from?: timestamp;
100 /**
101 * The ending date and time of a time range.
102 */
103 to?: timestamp;
104 }
105 export interface DescribeAffectedEntitiesRequest {
106 /**
107 * Values to narrow the results returned. At least one event ARN is required.
108 */
109 filter: EntityFilter;
110 /**
111 * The locale (language) to return information in. English (en) is the default and the only supported value at this time.
112 */
113 locale?: locale;
114 /**
115 * If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
116 */
117 nextToken?: nextToken;
118 /**
119 * The maximum number of items to return in one batch, between 10 and 100, inclusive.
120 */
121 maxResults?: maxResults;
122 }
123 export interface DescribeAffectedEntitiesResponse {
124 /**
125 * The entities that match the filter criteria.
126 */
127 entities?: EntityList;
128 /**
129 * If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
130 */
131 nextToken?: nextToken;
132 }
133 export interface DescribeEntityAggregatesRequest {
134 /**
135 * A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101"
136 */
137 eventArns?: EventArnsList;
138 }
139 export interface DescribeEntityAggregatesResponse {
140 /**
141 * The number of entities that are affected by each of the specified events.
142 */
143 entityAggregates?: EntityAggregateList;
144 }
145 export interface DescribeEventAggregatesRequest {
146 /**
147 * Values to narrow the results returned.
148 */
149 filter?: EventFilter;
150 /**
151 * The only currently supported value is eventTypeCategory.
152 */
153 aggregateField: eventAggregateField;
154 /**
155 * The maximum number of items to return in one batch, between 10 and 100, inclusive.
156 */
157 maxResults?: maxResults;
158 /**
159 * If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
160 */
161 nextToken?: nextToken;
162 }
163 export interface DescribeEventAggregatesResponse {
164 /**
165 * The number of events in each category that meet the optional filter criteria.
166 */
167 eventAggregates?: EventAggregateList;
168 /**
169 * If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
170 */
171 nextToken?: nextToken;
172 }
173 export type DescribeEventDetailsFailedSet = EventDetailsErrorItem[];
174 export interface DescribeEventDetailsRequest {
175 /**
176 * A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101"
177 */
178 eventArns: eventArnList;
179 /**
180 * The locale (language) to return information in. English (en) is the default and the only supported value at this time.
181 */
182 locale?: locale;
183 }
184 export interface DescribeEventDetailsResponse {
185 /**
186 * Information about the events that could be retrieved.
187 */
188 successfulSet?: DescribeEventDetailsSuccessfulSet;
189 /**
190 * Error messages for any events that could not be retrieved.
191 */
192 failedSet?: DescribeEventDetailsFailedSet;
193 }
194 export type DescribeEventDetailsSuccessfulSet = EventDetails[];
195 export interface DescribeEventTypesRequest {
196 /**
197 * Values to narrow the results returned.
198 */
199 filter?: EventTypeFilter;
200 /**
201 * The locale (language) to return information in. English (en) is the default and the only supported value at this time.
202 */
203 locale?: locale;
204 /**
205 * If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
206 */
207 nextToken?: nextToken;
208 /**
209 * The maximum number of items to return in one batch, between 10 and 100, inclusive.
210 */
211 maxResults?: maxResults;
212 }
213 export interface DescribeEventTypesResponse {
214 /**
215 * A list of event types that match the filter criteria. Event types have a category (issue, accountNotification, or scheduledChange), a service (for example, EC2, RDS, DATAPIPELINE, BILLING), and a code (in the format AWS_SERVICE_DESCRIPTION ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT).
216 */
217 eventTypes?: EventTypeList;
218 /**
219 * If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
220 */
221 nextToken?: nextToken;
222 }
223 export interface DescribeEventsRequest {
224 /**
225 * Values to narrow the results returned.
226 */
227 filter?: EventFilter;
228 /**
229 * If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
230 */
231 nextToken?: nextToken;
232 /**
233 * The maximum number of items to return in one batch, between 10 and 100, inclusive.
234 */
235 maxResults?: maxResults;
236 /**
237 * The locale (language) to return information in. English (en) is the default and the only supported value at this time.
238 */
239 locale?: locale;
240 }
241 export interface DescribeEventsResponse {
242 /**
243 * The events that match the specified filter criteria.
244 */
245 events?: EventList;
246 /**
247 * If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
248 */
249 nextToken?: nextToken;
250 }
251 export interface EntityAggregate {
252 /**
253 * The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
254 */
255 eventArn?: eventArn;
256 /**
257 * The number entities that match the criteria for the specified events.
258 */
259 count?: count;
260 }
261 export type EntityAggregateList = EntityAggregate[];
262 export interface EntityFilter {
263 /**
264 * A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101"
265 */
266 eventArns: eventArnList;
267 /**
268 * A list of entity ARNs (unique identifiers).
269 */
270 entityArns?: entityArnList;
271 /**
272 * A list of IDs for affected entities.
273 */
274 entityValues?: entityValueList;
275 /**
276 * A list of the most recent dates and times that the entity was updated.
277 */
278 lastUpdatedTimes?: dateTimeRangeList;
279 /**
280 * A map of entity tags attached to the affected entity.
281 */
282 tags?: tagFilter;
283 /**
284 * A list of entity status codes (IMPAIRED, UNIMPAIRED, or UNKNOWN).
285 */
286 statusCodes?: entityStatusCodeList;
287 }
288 export type EntityList = AffectedEntity[];
289 export interface Event {
290 /**
291 * The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
292 */
293 arn?: eventArn;
294 /**
295 * The AWS service that is affected by the event. For example, EC2, RDS.
296 */
297 service?: service;
298 /**
299 * The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.
300 */
301 eventTypeCode?: eventTypeCode;
302 /**
303 * The category of the event. Possible values are issue, scheduledChange, and accountNotification.
304 */
305 eventTypeCategory?: eventTypeCategory;
306 /**
307 * The AWS region name of the event.
308 */
309 region?: region;
310 /**
311 * The AWS Availability Zone of the event. For example, us-east-1a.
312 */
313 availabilityZone?: availabilityZone;
314 /**
315 * The date and time that the event began.
316 */
317 startTime?: timestamp;
318 /**
319 * The date and time that the event ended.
320 */
321 endTime?: timestamp;
322 /**
323 * The most recent date and time that the event was updated.
324 */
325 lastUpdatedTime?: timestamp;
326 /**
327 * The most recent status of the event. Possible values are open, closed, and upcoming.
328 */
329 statusCode?: eventStatusCode;
330 }
331 export interface EventAggregate {
332 /**
333 * The issue type for the associated count.
334 */
335 aggregateValue?: aggregateValue;
336 /**
337 * The number of events of the associated issue type.
338 */
339 count?: count;
340 }
341 export type EventAggregateList = EventAggregate[];
342 export type EventArnsList = eventArn[];
343 export interface EventDescription {
344 /**
345 * The most recent description of the event.
346 */
347 latestDescription?: eventDescription;
348 }
349 export interface EventDetails {
350 /**
351 * Summary information about the event.
352 */
353 event?: Event;
354 /**
355 * The most recent description of the event.
356 */
357 eventDescription?: EventDescription;
358 /**
359 * Additional metadata about the event.
360 */
361 eventMetadata?: eventMetadata;
362 }
363 export interface EventDetailsErrorItem {
364 /**
365 * The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
366 */
367 eventArn?: eventArn;
368 /**
369 * The name of the error.
370 */
371 errorName?: string;
372 /**
373 * A message that describes the error.
374 */
375 errorMessage?: string;
376 }
377 export interface EventFilter {
378 /**
379 * A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101"
380 */
381 eventArns?: eventArnList;
382 /**
383 * A list of unique identifiers for event types. For example, "AWS_EC2_SYSTEM_MAINTENANCE_EVENT","AWS_RDS_MAINTENANCE_SCHEDULED"
384 */
385 eventTypeCodes?: eventTypeList;
386 /**
387 * The AWS services associated with the event. For example, EC2, RDS.
388 */
389 services?: serviceList;
390 /**
391 * A list of AWS regions.
392 */
393 regions?: regionList;
394 /**
395 * A list of AWS availability zones.
396 */
397 availabilityZones?: availabilityZones;
398 /**
399 * A list of dates and times that the event began.
400 */
401 startTimes?: dateTimeRangeList;
402 /**
403 * A list of dates and times that the event ended.
404 */
405 endTimes?: dateTimeRangeList;
406 /**
407 * A list of dates and times that the event was last updated.
408 */
409 lastUpdatedTimes?: dateTimeRangeList;
410 /**
411 * A list of entity ARNs (unique identifiers).
412 */
413 entityArns?: entityArnList;
414 /**
415 * A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS volumes (vol-426ab23e).
416 */
417 entityValues?: entityValueList;
418 /**
419 * A list of event type category codes (issue, scheduledChange, or accountNotification).
420 */
421 eventTypeCategories?: eventTypeCategoryList;
422 /**
423 * A map of entity tags attached to the affected entity.
424 */
425 tags?: tagFilter;
426 /**
427 * A list of event status codes.
428 */
429 eventStatusCodes?: eventStatusCodeList;
430 }
431 export type EventList = Event[];
432 export interface EventType {
433 /**
434 * The AWS service that is affected by the event. For example, EC2, RDS.
435 */
436 service?: service;
437 /**
438 * The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.
439 */
440 code?: eventTypeCode;
441 /**
442 * A list of event type category codes (issue, scheduledChange, or accountNotification).
443 */
444 category?: eventTypeCategory;
445 }
446 export type EventTypeCategoryList = eventTypeCategory[];
447 export type EventTypeCodeList = eventTypeCode[];
448 export interface EventTypeFilter {
449 /**
450 * A list of event type codes.
451 */
452 eventTypeCodes?: EventTypeCodeList;
453 /**
454 * The AWS services associated with the event. For example, EC2, RDS.
455 */
456 services?: serviceList;
457 /**
458 * A list of event type category codes (issue, scheduledChange, or accountNotification).
459 */
460 eventTypeCategories?: EventTypeCategoryList;
461 }
462 export type EventTypeList = EventType[];
463 export type accountId = string;
464 export type aggregateValue = string;
465 export type availabilityZone = string;
466 export type availabilityZones = availabilityZone[];
467 export type count = number;
468 export type dateTimeRangeList = DateTimeRange[];
469 export type entityArn = string;
470 export type entityArnList = entityArn[];
471 export type entityStatusCode = "IMPAIRED"|"UNIMPAIRED"|"UNKNOWN"|string;
472 export type entityStatusCodeList = entityStatusCode[];
473 export type entityUrl = string;
474 export type entityValue = string;
475 export type entityValueList = entityValue[];
476 export type eventAggregateField = "eventTypeCategory"|string;
477 export type eventArn = string;
478 export type eventArnList = eventArn[];
479 export type eventDescription = string;
480 export type eventMetadata = {[key: string]: metadataValue};
481 export type eventStatusCode = "open"|"closed"|"upcoming"|string;
482 export type eventStatusCodeList = eventStatusCode[];
483 export type eventType = string;
484 export type eventTypeCategory = "issue"|"accountNotification"|"scheduledChange"|string;
485 export type eventTypeCategoryList = eventTypeCategory[];
486 export type eventTypeCode = string;
487 export type eventTypeList = eventType[];
488 export type locale = string;
489 export type maxResults = number;
490 export type metadataKey = string;
491 export type metadataValue = string;
492 export type nextToken = string;
493 export type region = string;
494 export type regionList = region[];
495 export type service = string;
496 export type serviceList = service[];
497 export type tagFilter = tagSet[];
498 export type tagKey = string;
499 export type tagSet = {[key: string]: tagValue};
500 export type tagValue = string;
501 export type timestamp = Date;
502 /**
503 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
504 */
505 export type apiVersion = "2016-08-04"|"latest"|string;
506 export interface ClientApiVersions {
507 /**
508 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
509 */
510 apiVersion?: apiVersion;
511 }
512 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
513 /**
514 * Contains interfaces for use with the Health client.
515 */
516 export import Types = Health;
517}
518export = Health;