1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`ListAccounts`](crate::operation::list_accounts::builders::ListAccountsFluentBuilder) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_accounts::builders::ListAccountsFluentBuilder::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`next_token(impl Into<String>)`](crate::operation::list_accounts::builders::ListAccountsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::list_accounts::builders::ListAccountsFluentBuilder::set_next_token):<br>required: **false**<br><p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value of the previous call's <code>NextToken</code> response to indicate where the output should continue from.</p><br>
    ///   - [`max_results(i32)`](crate::operation::list_accounts::builders::ListAccountsFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::list_accounts::builders::ListAccountsFluentBuilder::set_max_results):<br>required: **false**<br><p>The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p><br>
    /// - On success, responds with [`ListAccountsOutput`](crate::operation::list_accounts::ListAccountsOutput) with field(s):
    ///   - [`accounts(Option<Vec::<Account>>)`](crate::operation::list_accounts::ListAccountsOutput::accounts): <p>A list of objects in the organization.</p>
    ///   - [`next_token(Option<String>)`](crate::operation::list_accounts::ListAccountsOutput::next_token): <p>If present, indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>.</p>
    /// - On failure, responds with [`SdkError<ListAccountsError>`](crate::operation::list_accounts::ListAccountsError)
    pub fn list_accounts(&self) -> crate::operation::list_accounts::builders::ListAccountsFluentBuilder {
        crate::operation::list_accounts::builders::ListAccountsFluentBuilder::new(self.handle.clone())
    }
}