aws_sdk_cloudtrail/client/
list_channels.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`ListChannels`](crate::operation::list_channels::builders::ListChannelsFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_channels::builders::ListChannelsFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`max_results(i32)`](crate::operation::list_channels::builders::ListChannelsFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::list_channels::builders::ListChannelsFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of CloudTrail channels to display on a single page.</p><br>
8    ///   - [`next_token(impl Into<String>)`](crate::operation::list_channels::builders::ListChannelsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::list_channels::builders::ListChannelsFluentBuilder::set_next_token):<br>required: **false**<br><p>The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.</p><br>
9    /// - On success, responds with [`ListChannelsOutput`](crate::operation::list_channels::ListChannelsOutput) with field(s):
10    ///   - [`channels(Option<Vec::<Channel>>)`](crate::operation::list_channels::ListChannelsOutput::channels): <p>The list of channels in the account.</p>
11    ///   - [`next_token(Option<String>)`](crate::operation::list_channels::ListChannelsOutput::next_token): <p>The token to use to get the next page of results after a previous API call.</p>
12    /// - On failure, responds with [`SdkError<ListChannelsError>`](crate::operation::list_channels::ListChannelsError)
13    pub fn list_channels(&self) -> crate::operation::list_channels::builders::ListChannelsFluentBuilder {
14        crate::operation::list_channels::builders::ListChannelsFluentBuilder::new(self.handle.clone())
15    }
16}