Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data DescribeAffectedAccountsForOrganization = DescribeAffectedAccountsForOrganization' {}
- newDescribeAffectedAccountsForOrganization :: Text -> DescribeAffectedAccountsForOrganization
- describeAffectedAccountsForOrganization_nextToken :: Lens' DescribeAffectedAccountsForOrganization (Maybe Text)
- describeAffectedAccountsForOrganization_maxResults :: Lens' DescribeAffectedAccountsForOrganization (Maybe Natural)
- describeAffectedAccountsForOrganization_eventArn :: Lens' DescribeAffectedAccountsForOrganization Text
- data DescribeAffectedAccountsForOrganizationResponse = DescribeAffectedAccountsForOrganizationResponse' {}
- newDescribeAffectedAccountsForOrganizationResponse :: Int -> DescribeAffectedAccountsForOrganizationResponse
- describeAffectedAccountsForOrganizationResponse_affectedAccounts :: Lens' DescribeAffectedAccountsForOrganizationResponse (Maybe [Text])
- describeAffectedAccountsForOrganizationResponse_eventScopeCode :: Lens' DescribeAffectedAccountsForOrganizationResponse (Maybe EventScopeCode)
- describeAffectedAccountsForOrganizationResponse_nextToken :: Lens' DescribeAffectedAccountsForOrganizationResponse (Maybe Text)
- describeAffectedAccountsForOrganizationResponse_httpStatus :: Lens' DescribeAffectedAccountsForOrganizationResponse Int
Creating a Request
data DescribeAffectedAccountsForOrganization Source #
See: newDescribeAffectedAccountsForOrganization
smart constructor.
DescribeAffectedAccountsForOrganization' | |
|
Instances
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 #
See: newDescribeAffectedAccountsForOrganizationResponse
smart constructor.
DescribeAffectedAccountsForOrganizationResponse' | |
|
Instances
newDescribeAffectedAccountsForOrganizationResponse Source #
:: Int |
|
-> DescribeAffectedAccountsForOrganizationResponse |
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 isPUBLIC
, then theaffectedAccounts
value is always empty. - If the
eventScopeCode
value isACCOUNT_SPECIFIC
, then theaffectedAccounts
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 isNONE
, then theeventArn
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_affectedAccounts :: Lens' DescribeAffectedAccountsForOrganizationResponse (Maybe [Text]) Source #
A JSON set of elements of the affected accounts.
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 isPUBLIC
, then theaffectedAccounts
value is always empty. - If the
eventScopeCode
value isACCOUNT_SPECIFIC
, then theaffectedAccounts
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 isNONE
, then theeventArn
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.
describeAffectedAccountsForOrganizationResponse_httpStatus :: Lens' DescribeAffectedAccountsForOrganizationResponse Int Source #
The response's http status code.