aws_sdk_cloudwatchlogs/client/list_log_groups.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 [`ListLogGroups`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`log_group_name_pattern(impl Into<String>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::log_group_name_pattern) / [`set_log_group_name_pattern(Option<String>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::set_log_group_name_pattern):<br>required: **false**<br><p>Use this parameter to limit the returned log groups to only those with names that match the pattern that you specify. This parameter is a regular expression that can match prefixes and substrings, and supports wildcard matching and matching multiple patterns, as in the following examples.</p> <ul> <li> <p>Use <code>^</code> to match log group names by prefix.</p></li> <li> <p>For a substring match, specify the string to match. All matches are case sensitive</p></li> <li> <p>To match multiple patterns, separate them with a <code>|</code> as in the example <code>^/aws/lambda|discovery</code></p></li> </ul> <p>You can specify as many as five different regular expression patterns in this field, each of which must be between 3 and 24 characters. You can include the <code>^</code> symbol as many as five times, and include the <code>|</code> symbol as many as four times.</p><br>
7 /// - [`log_group_class(LogGroupClass)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::log_group_class) / [`set_log_group_class(Option<LogGroupClass>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::set_log_group_class):<br>required: **false**<br><p>Use this parameter to limit the results to only those log groups in the specified log group class. If you omit this parameter, log groups of all classes can be returned.</p><br>
8 /// - [`include_linked_accounts(bool)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::include_linked_accounts) / [`set_include_linked_accounts(Option<bool>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::set_include_linked_accounts):<br>required: **false**<br><p>If you are using a monitoring account, set this to <code>true</code> to have the operation return log groups in the accounts listed in <code>accountIdentifiers</code>.</p> <p>If this parameter is set to <code>true</code> and <code>accountIdentifiers</code> contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account.</p> <p>The default for this parameter is <code>false</code>.</p><br>
9 /// - [`account_identifiers(impl Into<String>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::account_identifiers) / [`set_account_identifiers(Option<Vec::<String>>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::set_account_identifiers):<br>required: **false**<br><p>When <code>includeLinkedAccounts</code> is set to <code>true</code>, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.</p><br>
10 /// - [`next_token(impl Into<String>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::set_next_token):<br>required: **false**<br><p>The token for the next set of items to return. The token expires after 24 hours.</p><br>
11 /// - [`limit(i32)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::limit) / [`set_limit(Option<i32>)`](crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::set_limit):<br>required: **false**<br><p>The maximum number of log groups to return. If you omit this parameter, the default is up to 50 log groups.</p><br>
12 /// - On success, responds with [`ListLogGroupsOutput`](crate::operation::list_log_groups::ListLogGroupsOutput) with field(s):
13 /// - [`log_groups(Option<Vec::<LogGroupSummary>>)`](crate::operation::list_log_groups::ListLogGroupsOutput::log_groups): <p>An array of structures, where each structure contains the information about one log group.</p>
14 /// - [`next_token(Option<String>)`](crate::operation::list_log_groups::ListLogGroupsOutput::next_token): <p>The token for the next set of items to return. The token expires after 24 hours.</p>
15 /// - On failure, responds with [`SdkError<ListLogGroupsError>`](crate::operation::list_log_groups::ListLogGroupsError)
16 pub fn list_log_groups(&self) -> crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder {
17 crate::operation::list_log_groups::builders::ListLogGroupsFluentBuilder::new(self.handle.clone())
18 }
19}