The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

Class: AWS.Health

Inherits:
AWS.Service show all
Identifier:
health
API Version:
2016-08-04
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

The Health API provides access to the Health information that appears in the Health Dashboard. You can use the API operations to get information about events that might affect your Amazon Web Services and resources.

You must have a Business, Enterprise On-Ramp, or Enterprise Support plan from Amazon Web Services Support to use the Health API. If you call the Health API from an Amazon Web Services account that doesn't have a Business, Enterprise On-Ramp, or Enterprise Support plan, you receive a SubscriptionRequiredException error.

For API access, you need an access key ID and a secret access key. Use temporary credentials instead of long-term access keys when possible. Temporary credentials include an access key ID, a secret access key, and a security token that indicates when the credentials expire. For more information, see Best practices for managing Amazon Web Services access keys in the Amazon Web Services General Reference.

You can use the Health endpoint health.us-east-1.amazonaws.com (HTTPS) to call the Health API operations. Health supports a multi-Region application architecture and has two regional endpoints in an active-passive configuration. You can use the high availability endpoint example to determine which Amazon Web Services Region is active, so that you can get the latest information from the API. For more information, see Accessing the Health API in the Health User Guide.

For authentication of requests, Health uses the Signature Version 4 Signing Process.

If your Amazon Web Services account is part of Organizations, you can use the Health organizational view feature. This feature provides a centralized view of Health events across all accounts in your organization. You can aggregate Health events in real time to identify accounts in your organization that are affected by an operational event or get notified of security vulnerabilities. Use the organizational view API operations to enable this feature and return event information. For more information, see Aggregating Health events in the Health User Guide.

Note: When you use the Health API operations to return Health events, see the following recommendations:
  • Use the eventScopeCode parameter to specify whether to return Health events that are public or account-specific.
  • Use pagination to view all events from the response. For example, if you call the DescribeEventsForOrganization operation to get all events in your organization, you might receive several page results. Specify the nextToken in the next request to return more results.

Sending a Request Using Health

var health = new AWS.Health();
health.describeAffectedAccountsForOrganization(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Health object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var health = new AWS.Health({apiVersion: '2016-08-04'});

You can also set the API version globally in AWS.config.apiVersions using the health service identifier:

AWS.config.apiVersions = {
  health: '2016-08-04',
  // other service API versions
};

var health = new AWS.Health();

Version:

  • 2016-08-04

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Health(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Health object

var health = new AWS.Health({apiVersion: '2016-08-04'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Health.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Health.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Health.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

describeAffectedAccountsForOrganization(params = {}, callback) ⇒ AWS.Request

Returns a list of accounts in the organization from Organizations that are affected by the provided event. For more information about the different types of Health events, see Event.

Before you can call this operation, you must first enable Health to work with Organizations. To do this, call the EnableHealthServiceAccessForOrganization operation from your organization's management account.

Note: This API operation uses pagination. Specify the nextToken parameter in the next request to return more results.

Examples:

Calling the describeAffectedAccountsForOrganization operation

var params = {
  eventArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
health.describeAffectedAccountsForOrganization(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • eventArn — (String)

      The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

      For example, an event ARN might look like the following:

      arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

    • nextToken — (String)

      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.

    • maxResults — (Integer)

      The maximum number of items to return in one batch, between 10 and 100, inclusive.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • affectedAccounts — (Array<String>)

        A JSON set of elements of the affected accounts.

      • eventScopeCode — (String)

        This parameter specifies if the Health event is a public Amazon Web Service event or an account-specific event.

        • If the eventScopeCode value is PUBLIC, then the affectedAccounts value is always empty.

        • If the eventScopeCode value is ACCOUNT_SPECIFIC, then the affectedAccounts value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service, those account IDs appear in the response.

        • If the eventScopeCode value is NONE, then the eventArn that you specified in the request is invalid or doesn't exist.

        Possible values include:
        • "PUBLIC"
        • "ACCOUNT_SPECIFIC"
        • "NONE"
      • nextToken — (String)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAffectedEntities(params = {}, callback) ⇒ AWS.Request

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 Amazon Web 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.

Note:
  • This API operation uses pagination. Specify the nextToken parameter in the next request to return more results.
  • This operation supports resource-level permissions. You can use this operation to allow or deny access to specific Health events. For more information, see Resource- and action-based conditions in the Health User Guide.

Service Reference:

Examples:

Calling the describeAffectedEntities operation

var params = {
  filter: { /* required */
    eventArns: [ /* required */
      'STRING_VALUE',
      /* more items */
    ],
    entityArns: [
      'STRING_VALUE',
      /* more items */
    ],
    entityValues: [
      'STRING_VALUE',
      /* more items */
    ],
    lastUpdatedTimes: [
      {
        from: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
        to: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
      },
      /* more items */
    ],
    statusCodes: [
      IMPAIRED | UNIMPAIRED | UNKNOWN | PENDING | RESOLVED,
      /* more items */
    ],
    tags: [
      {
        '<tagKey>': 'STRING_VALUE',
        /* '<tagKey>': ... */
      },
      /* more items */
    ]
  },
  locale: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
health.describeAffectedEntities(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • filter — (map)

      Values to narrow the results returned. At least one event ARN is required.

      • eventArnsrequired — (Array<String>)

        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"

      • entityArns — (Array<String>)

        A list of entity ARNs (unique identifiers).

      • entityValues — (Array<String>)

        A list of IDs for affected entities.

      • lastUpdatedTimes — (Array<map>)

        A list of the most recent dates and times that the entity was updated.

        • from — (Date)

          The starting date and time of a time range.

        • to — (Date)

          The ending date and time of a time range.

      • tags — (Array<map<String>>)

        A map of entity tags attached to the affected entity.

        Note: Currently, the tags property isn't supported.
      • statusCodes — (Array<String>)

        A list of entity status codes (IMPAIRED, UNIMPAIRED, or UNKNOWN).

    • locale — (String)

      The locale (language) to return information in. English (en) is the default and the only supported value at this time.

    • nextToken — (String)

      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.

    • maxResults — (Integer)

      The maximum number of items to return in one batch, between 10 and 100, inclusive.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • entities — (Array<map>)

        The entities that match the filter criteria.

        • entityArn — (String)

          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

        • eventArn — (String)

          The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

          For example, an event ARN might look like the following:

          arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

        • entityValue — (String)

          The ID of the affected entity.

        • entityUrl — (String)

          The URL of the affected entity.

        • awsAccountId — (String)

          The 12-digit Amazon Web Services account number that contains the affected entity.

        • lastUpdatedTime — (Date)

          The most recent time that the entity was updated.

        • statusCode — (String)

          The most recent status of the entity affected by the event. The possible values are IMPAIRED, UNIMPAIRED, and UNKNOWN.

          Possible values include:
          • "IMPAIRED"
          • "UNIMPAIRED"
          • "UNKNOWN"
          • "PENDING"
          • "RESOLVED"
        • tags — (map<String>)

          A map of entity tags attached to the affected entity.

          Note: Currently, the tags property isn't supported.
      • nextToken — (String)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAffectedEntitiesForOrganization(params = {}, callback) ⇒ AWS.Request

Returns a list of entities that have been affected by one or more events for one or more accounts in your organization in Organizations, based on the filter criteria. Entities can refer to individual customer resources, groups of customer resources, or any other construct, depending on the Amazon Web Service.

At least one event Amazon Resource Name (ARN) and account ID are required.

Before you can call this operation, you must first enable Health to work with Organizations. To do this, call the EnableHealthServiceAccessForOrganization operation from your organization's management account.

Note:
  • This API operation uses pagination. Specify the nextToken parameter in the next request to return more results.
  • This operation doesn't support resource-level permissions. You can't use this operation to allow or deny access to specific Health events. For more information, see Resource- and action-based conditions in the Health User Guide.

Examples:

Calling the describeAffectedEntitiesForOrganization operation

var params = {
  locale: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  organizationEntityAccountFilters: [
    {
      eventArn: 'STRING_VALUE', /* required */
      awsAccountId: 'STRING_VALUE',
      statusCodes: [
        IMPAIRED | UNIMPAIRED | UNKNOWN | PENDING | RESOLVED,
        /* more items */
      ]
    },
    /* more items */
  ],
  organizationEntityFilters: [
    {
      eventArn: 'STRING_VALUE', /* required */
      awsAccountId: 'STRING_VALUE'
    },
    /* more items */
  ]
};
health.describeAffectedEntitiesForOrganization(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • organizationEntityFilters — (Array<map>)

      A JSON set of elements including the awsAccountId and the eventArn.

      • eventArnrequired — (String)

        The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

        For example, an event ARN might look like the following:

        arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

      • awsAccountId — (String)

        The 12-digit Amazon Web Services account numbers that contains the affected entities.

    • locale — (String)

      The locale (language) to return information in. English (en) is the default and the only supported value at this time.

    • nextToken — (String)

      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.

    • maxResults — (Integer)

      The maximum number of items to return in one batch, between 10 and 100, inclusive.

    • organizationEntityAccountFilters — (Array<map>)

      A JSON set of elements including the awsAccountId, eventArn and a set of statusCodes.

      • eventArnrequired — (String)

        The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

        For example, an event ARN might look like the following:

        arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

      • awsAccountId — (String)

        The 12-digit Amazon Web Services account numbers that contains the affected entities.

      • statusCodes — (Array<String>)

        A list of entity status codes.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • entities — (Array<map>)

        A JSON set of elements including the awsAccountId and its entityArn, entityValue and its entityArn, lastUpdatedTime, and statusCode.

        • entityArn — (String)

          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

        • eventArn — (String)

          The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

          For example, an event ARN might look like the following:

          arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

        • entityValue — (String)

          The ID of the affected entity.

        • entityUrl — (String)

          The URL of the affected entity.

        • awsAccountId — (String)

          The 12-digit Amazon Web Services account number that contains the affected entity.

        • lastUpdatedTime — (Date)

          The most recent time that the entity was updated.

        • statusCode — (String)

          The most recent status of the entity affected by the event. The possible values are IMPAIRED, UNIMPAIRED, and UNKNOWN.

          Possible values include:
          • "IMPAIRED"
          • "UNIMPAIRED"
          • "UNKNOWN"
          • "PENDING"
          • "RESOLVED"
        • tags — (map<String>)

          A map of entity tags attached to the affected entity.

          Note: Currently, the tags property isn't supported.
      • failedSet — (Array<map>)

        A JSON set of elements of the failed response, including the awsAccountId, errorMessage, errorName, and eventArn.

        • awsAccountId — (String)

          The 12-digit Amazon Web Services account numbers that contains the affected entities.

        • eventArn — (String)

          The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

          For example, an event ARN might look like the following:

          arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

        • errorName — (String)

          The name of the error.

        • errorMessage — (String)

          A message that describes the error. Follow the error message and retry your request.

          For example, the InvalidAccountInputError error message appears if you call the DescribeAffectedEntitiesForOrganization operation and specify the AccountSpecific value for the EventScopeCode parameter, but don't specify an Amazon Web Services account.

      • nextToken — (String)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEntityAggregates(params = {}, callback) ⇒ AWS.Request

Returns the number of entities that are affected by each of the specified events.

Service Reference:

Examples:

Calling the describeEntityAggregates operation

var params = {
  eventArns: [
    'STRING_VALUE',
    /* more items */
  ]
};
health.describeEntityAggregates(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • eventArns — (Array<String>)

      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"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • entityAggregates — (Array<map>)

        The number of entities that are affected by each of the specified events.

        • eventArn — (String)

          The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

          For example, an event ARN might look like the following:

          arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

        • count — (Integer)

          The number of entities that match the criteria for the specified events.

        • statuses — (map<Integer>)

          The number of affected entities aggregated by the entity status codes.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEntityAggregatesForOrganization(params = {}, callback) ⇒ AWS.Request

Returns a list of entity aggregates for your Organizations that are affected by each of the specified events.

Examples:

Calling the describeEntityAggregatesForOrganization operation

var params = {
  eventArns: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  awsAccountIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
health.describeEntityAggregatesForOrganization(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • eventArns — (Array<String>)

      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"

    • awsAccountIds — (Array<String>)

      A list of 12-digit Amazon Web Services account numbers that contains the affected entities.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • organizationEntityAggregates — (Array<map>)

        The list of entity aggregates for each of the specified accounts that are affected by each of the specified events.

        • eventArn — (String)

          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"

        • count — (Integer)

          The number of entities for the organization that match the filter criteria for the specified events.

        • statuses — (map<Integer>)

          The number of affected entities aggregated by the entitiy status codes.

        • accounts — (Array<map>)

          A list of entity aggregates for each of the specified accounts in your organization that are affected by a specific event. If there are no awsAccountIds provided in the request, this field will be empty in the response.