Skip to content

list_member_accounts

list_member_accounts(
    notification_configuration_arn: NotificationConfigurationArn,
    *,
    config_overrides: Optional[NotificationsClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
    member_account: Optional[AccountId] = None,
    status: Optional[MemberAccountNotificationConfigurationStatus] = None,
    organizational_unit_id: Optional[OrganizationalUnitId] = None,
) -> ListMemberAccountsResponse

Returns a list of member accounts associated with a notification configuration.

Parameters:

  • notification_configuration_arn (NotificationConfigurationArn) –

    The Amazon Resource Name (ARN) of the notification configuration used to filter the member accounts.

  • max_results (Optional[int], default: None ) –

    The maximum number of results to return in a single call. Valid values are 1-100.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next page of results. Use the value returned in the previous response.

  • member_account (Optional[AccountId], default: None ) –

    The member account identifier used to filter the results.

  • status (Optional[MemberAccountNotificationConfigurationStatus], default: None ) –

    The status used to filter the member accounts.

  • organizational_unit_id (Optional[OrganizationalUnitId], default: None ) –

    The organizational unit ID used to filter the member accounts.

Raises:

Source code in docs_src/capo_notifications/_services/notifications.py
def list_member_accounts(
    self,
    notification_configuration_arn: "capo_notifications.types.notification_configuration_arn.NotificationConfigurationArn",
    *,
    config_overrides: Optional[NotificationsClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_notifications.types.next_token.NextToken"] = None,
    member_account: Optional[
        "capo_notifications.types.account_id.AccountId"
    ] = None,
    status: Optional[
        "capo_notifications.types.member_account_notification_configuration_status.MemberAccountNotificationConfigurationStatus"
    ] = None,
    organizational_unit_id: Optional[
        "capo_notifications.types.organizational_unit_id.OrganizationalUnitId"
    ] = None,
) -> "capo_notifications.types.list_member_accounts_response.ListMemberAccountsResponse":
    """<p>Returns a list of member accounts associated with a notification configuration.</p>

    Args:
        notification_configuration_arn: <p>The Amazon Resource Name (ARN) of the notification configuration used to filter the member accounts.</p>
        max_results: <p>The maximum number of results to return in a single call. Valid values are 1-100.</p>
        next_token: <p>The token for the next page of results. Use the value returned in the previous response.</p>
        member_account: <p>The member account identifier used to filter the results.</p>
        status: <p>The status used to filter the member accounts.</p>
        organizational_unit_id: <p>The organizational unit ID used to filter the member accounts.</p>

    Raises:
        capo_notifications.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_notifications.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_notifications.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist. </p>
        capo_notifications.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling. </p>
        capo_notifications.errors.validation_exception.ValidationException: <p>This exception is thrown when the notification event fails validation.</p>
        capo_notifications.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_notifications.types.list_member_accounts_request.ListMemberAccountsRequest]",
    ) -> OperationResponse[
        "capo_notifications.types.list_member_accounts_response.ListMemberAccountsResponse"
    ]:
        import capo_notifications._operations.notifications.list_member_accounts

        output, http_response = (
            capo_notifications._operations.notifications.list_member_accounts.list_member_accounts(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMemberAccounts")
    )
    input_: capo_notifications.types.list_member_accounts_request.ListMemberAccountsRequest = {
        "notification_configuration_arn": notification_configuration_arn
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if member_account is not None:
        input_["member_account"] = member_account
    if status is not None:
        input_["status"] = status
    if organizational_unit_id is not None:
        input_["organizational_unit_id"] = organizational_unit_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output