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 Services 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.
-
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.
Parameters:
-
organization_entity_filters
(Optional[OrganizationEntityFiltersList], default:
None
)
–
A JSON set of elements including the awsAccountId and the eventArn.
-
locale
(Optional[locale], default:
None
)
–
The locale (language) to return information in. English (en) is the default and the only supported value at this time.
-
next_token
(Optional[nextToken], default:
None
)
–
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.
-
max_results
(Optional[maxResultsLowerRange], default:
None
)
–
The maximum number of items to return in one batch, between 1 and 100, inclusive.
-
organization_entity_account_filters
(Optional[OrganizationEntityAccountFiltersList], default:
None
)
–
A JSON set of elements including the awsAccountId, eventArn and a set of statusCodes.
Raises:
Source code in docs_src/capo_health/_services/health.py
| def describe_affected_entities_for_organization(
self,
*,
config_overrides: Optional[HealthClientConfig] = None,
organization_entity_filters: Optional[
"capo_health.types.organization_entity_filters_list.OrganizationEntityFiltersList"
] = None,
locale: Optional["capo_health.types.locale.locale"] = None,
next_token: Optional["capo_health.types.next_token.nextToken"] = None,
max_results: Optional[
"capo_health.types.max_results_lower_range.maxResultsLowerRange"
] = None,
organization_entity_account_filters: Optional[
"capo_health.types.organization_entity_account_filters_list.OrganizationEntityAccountFiltersList"
] = None,
) -> "capo_health.types.describe_affected_entities_for_organization_response.DescribeAffectedEntitiesForOrganizationResponse":
"""<p>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 Services service.</p> <p>At least one event Amazon Resource Name (ARN) and account ID are required.</p> <p>Before you can call this operation, you must first enable Health to work with Organizations. To do this, call the <a href="https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html">EnableHealthServiceAccessForOrganization</a> operation from your organization's management account.</p> <note> <ul> <li> <p>This API operation uses pagination. Specify the <code>nextToken</code> parameter in the next request to return more results.</p> </li> <li> <p>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 <a href="https://docs.aws.amazon.com/health/latest/ug/security_iam_id-based-policy-examples.html#resource-action-based-conditions">Resource- and action-based conditions</a> in the <i>Health User Guide</i>.</p> </li> </ul> </note>
Args:
organization_entity_filters: <p>A JSON set of elements including the <code>awsAccountId</code> and the <code>eventArn</code>.</p>
locale: <p>The locale (language) to return information in. English (en) is the default and the only supported value at this time.</p>
next_token: <p>If the results of a search are large, only a portion of the results are returned, and a <code>nextToken</code> 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.</p>
max_results: <p>The maximum number of items to return in one batch, between 1 and 100, inclusive.</p>
organization_entity_account_filters: <p>A JSON set of elements including the <code>awsAccountId</code>, <code>eventArn</code> and a set of <code>statusCodes</code>.</p>
Raises:
capo_health.errors.invalid_pagination_token.InvalidPaginationToken: <p>The specified pagination token (<code>nextToken</code>) is not valid.</p>
capo_health.errors.unsupported_locale.UnsupportedLocale: <p>The specified locale is not supported.</p>
capo_health.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_health.types.describe_affected_entities_for_organization_request.DescribeAffectedEntitiesForOrganizationRequest]",
) -> OperationResponse[
"capo_health.types.describe_affected_entities_for_organization_response.DescribeAffectedEntitiesForOrganizationResponse"
]:
import capo_health._operations.aws_health_20160804.describe_affected_entities_for_organization
output, http_response = (
capo_health._operations.aws_health_20160804.describe_affected_entities_for_organization.describe_affected_entities_for_organization(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DescribeAffectedEntitiesForOrganization"),
)
input_: capo_health.types.describe_affected_entities_for_organization_request.DescribeAffectedEntitiesForOrganizationRequest = {}
if organization_entity_filters is not None:
input_["organization_entity_filters"] = organization_entity_filters
if locale is not None:
input_["locale"] = locale
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
if organization_entity_account_filters is not None:
input_["organization_entity_account_filters"] = (
organization_entity_account_filters
)
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|