aws_sdk_cloudwatchlogs/client/describe_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 [`DescribeLogGroups`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder) operation.
4 /// This operation supports pagination; See [`into_paginator()`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::into_paginator).
5 ///
6 /// - The fluent builder is configurable:
7 /// - [`account_identifiers(impl Into<String>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::account_identifiers) / [`set_account_identifiers(Option<Vec::<String>>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::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>
8 /// - [`log_group_name_prefix(impl Into<String>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::log_group_name_prefix) / [`set_log_group_name_prefix(Option<String>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::set_log_group_name_prefix):<br>required: **false**<br><p>The prefix to match.</p><note> <p><code>logGroupNamePrefix</code> and <code>logGroupNamePattern</code> are mutually exclusive. Only one of these parameters can be passed.</p> </note><br>
9 /// - [`log_group_name_pattern(impl Into<String>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::log_group_name_pattern) / [`set_log_group_name_pattern(Option<String>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::set_log_group_name_pattern):<br>required: **false**<br><p>If you specify a string for this parameter, the operation returns only log groups that have names that match the string based on a case-sensitive substring search. For example, if you specify <code>DataLogs</code>, log groups named <code>DataLogs</code>, <code>aws/DataLogs</code>, and <code>GroupDataLogs</code> would match, but <code>datalogs</code>, <code>Data/log/s</code> and <code>Groupdata</code> would not match.</p> <p>If you specify <code>logGroupNamePattern</code> in your request, then only <code>arn</code>, <code>creationTime</code>, and <code>logGroupName</code> are included in the response.</p><note> <p><code>logGroupNamePattern</code> and <code>logGroupNamePrefix</code> are mutually exclusive. Only one of these parameters can be passed.</p> </note><br>
10 /// - [`next_token(impl Into<String>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::set_next_token):<br>required: **false**<br><p>The token for the next set of items to return. (You received this token from a previous call.)</p><br>
11 /// - [`limit(i32)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::limit) / [`set_limit(Option<i32>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::set_limit):<br>required: **false**<br><p>The maximum number of items returned. If you don't specify a value, the default is up to 50 items.</p><br>
12 /// - [`include_linked_accounts(bool)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::include_linked_accounts) / [`set_include_linked_accounts(Option<bool>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::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>
13 /// - [`log_group_class(LogGroupClass)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::log_group_class) / [`set_log_group_class(Option<LogGroupClass>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::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> <p>Specifies the log group class for this log group. There are three classes:</p> <ul> <li> <p>The <code>Standard</code> log class supports all CloudWatch Logs features.</p></li> <li> <p>The <code>Infrequent Access</code> log class supports a subset of CloudWatch Logs features and incurs lower costs.</p></li> <li> <p>Use the <code>Delivery</code> log class only for delivering Lambda logs to store in Amazon S3 or Amazon Data Firehose. Log events in log groups in the Delivery class are kept in CloudWatch Logs for only one day. This log class doesn't offer rich CloudWatch Logs capabilities such as CloudWatch Logs Insights queries.</p></li> </ul> <p>For details about the features supported by each class, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html">Log classes</a></p><br>
14 /// - [`log_group_identifiers(impl Into<String>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::log_group_identifiers) / [`set_log_group_identifiers(Option<Vec::<String>>)`](crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::set_log_group_identifiers):<br>required: **false**<br><p>Use this array to filter the list of log groups returned. If you specify this parameter, the only other filter that you can choose to specify is <code>includeLinkedAccounts</code>.</p> <p>If you are using this operation in a monitoring account, you can specify the ARNs of log groups in source accounts and in the monitoring account itself. If you are using this operation in an account that is not a cross-account monitoring account, you can specify only log group names in the same account as the operation.</p><br>
15 /// - On success, responds with [`DescribeLogGroupsOutput`](crate::operation::describe_log_groups::DescribeLogGroupsOutput) with field(s):
16 /// - [`log_groups(Option<Vec::<LogGroup>>)`](crate::operation::describe_log_groups::DescribeLogGroupsOutput::log_groups): <p>An array of structures, where each structure contains the information about one log group.</p>
17 /// - [`next_token(Option<String>)`](crate::operation::describe_log_groups::DescribeLogGroupsOutput::next_token): <p>The token for the next set of items to return. The token expires after 24 hours.</p>
18 /// - On failure, responds with [`SdkError<DescribeLogGroupsError>`](crate::operation::describe_log_groups::DescribeLogGroupsError)
19 pub fn describe_log_groups(&self) -> crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder {
20 crate::operation::describe_log_groups::builders::DescribeLogGroupsFluentBuilder::new(self.handle.clone())
21 }
22}