libZSservicesZSamazonka-healthZSamazonka-health
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

Description

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

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

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

This operation returns paginated results.

Synopsis

Creating a Request

data DescribeAffectedAccountsForOrganization Source #

Constructors

DescribeAffectedAccountsForOrganization' 

Fields

  • nextToken :: Maybe Text

    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 :: Maybe Natural

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

  • eventArn :: Text

    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

Instances

Instances details
Eq DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

Read DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

Show DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

Generic DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

NFData DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

Hashable DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

ToJSON DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

AWSPager DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

AWSRequest DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

ToHeaders DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

ToPath DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

ToQuery DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

type Rep DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

type Rep DescribeAffectedAccountsForOrganization = D1 ('MetaData "DescribeAffectedAccountsForOrganization" "Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization" "libZSservicesZSamazonka-healthZSamazonka-health" 'False) (C1 ('MetaCons "DescribeAffectedAccountsForOrganization'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "eventArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse DescribeAffectedAccountsForOrganization Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

newDescribeAffectedAccountsForOrganization Source #

Create a value of DescribeAffectedAccountsForOrganization with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:nextToken:DescribeAffectedAccountsForOrganization', describeAffectedAccountsForOrganization_nextToken - 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.

$sel:maxResults:DescribeAffectedAccountsForOrganization', describeAffectedAccountsForOrganization_maxResults - The maximum number of items to return in one batch, between 10 and 100, inclusive.

$sel:eventArn:DescribeAffectedAccountsForOrganization', describeAffectedAccountsForOrganization_eventArn - 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

Request Lenses

describeAffectedAccountsForOrganization_nextToken :: Lens' DescribeAffectedAccountsForOrganization (Maybe Text) Source #

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.

describeAffectedAccountsForOrganization_maxResults :: Lens' DescribeAffectedAccountsForOrganization (Maybe Natural) Source #

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

describeAffectedAccountsForOrganization_eventArn :: Lens' DescribeAffectedAccountsForOrganization Text Source #

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

Destructuring the Response

data DescribeAffectedAccountsForOrganizationResponse Source #

Constructors

DescribeAffectedAccountsForOrganizationResponse' 

Fields

  • affectedAccounts :: Maybe [Text]

    A JSON set of elements of the affected accounts.

  • eventScopeCode :: Maybe EventScopeCode

    This parameter specifies if the AWS Health event is a public AWS 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 AWS accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have AWS 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.
  • nextToken :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq DescribeAffectedAccountsForOrganizationResponse Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

Read DescribeAffectedAccountsForOrganizationResponse Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

Show DescribeAffectedAccountsForOrganizationResponse Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

Generic DescribeAffectedAccountsForOrganizationResponse Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

NFData DescribeAffectedAccountsForOrganizationResponse Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

type Rep DescribeAffectedAccountsForOrganizationResponse Source # 
Instance details

Defined in Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization

type Rep DescribeAffectedAccountsForOrganizationResponse = D1 ('MetaData "DescribeAffectedAccountsForOrganizationResponse" "Amazonka.AWSHealth.DescribeAffectedAccountsForOrganization" "libZSservicesZSamazonka-healthZSamazonka-health" 'False) (C1 ('MetaCons "DescribeAffectedAccountsForOrganizationResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "affectedAccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "eventScopeCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EventScopeCode))) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newDescribeAffectedAccountsForOrganizationResponse Source #

Create a value of DescribeAffectedAccountsForOrganizationResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:affectedAccounts:DescribeAffectedAccountsForOrganizationResponse', describeAffectedAccountsForOrganizationResponse_affectedAccounts - A JSON set of elements of the affected accounts.

$sel:eventScopeCode:DescribeAffectedAccountsForOrganizationResponse', describeAffectedAccountsForOrganizationResponse_eventScopeCode - This parameter specifies if the AWS Health event is a public AWS 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 AWS accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have AWS 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.

$sel:nextToken:DescribeAffectedAccountsForOrganization', describeAffectedAccountsForOrganizationResponse_nextToken - 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.

$sel:httpStatus:DescribeAffectedAccountsForOrganizationResponse', describeAffectedAccountsForOrganizationResponse_httpStatus - The response's http status code.

Response Lenses

describeAffectedAccountsForOrganizationResponse_eventScopeCode :: Lens' DescribeAffectedAccountsForOrganizationResponse (Maybe EventScopeCode) Source #

This parameter specifies if the AWS Health event is a public AWS 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 AWS accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have AWS 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.

describeAffectedAccountsForOrganizationResponse_nextToken :: Lens' DescribeAffectedAccountsForOrganizationResponse (Maybe Text) Source #

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.