aws_sdk_cloudwatchlogs/client/put_index_policy.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`PutIndexPolicy`](crate::operation::put_index_policy::builders::PutIndexPolicyFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`log_group_identifier(impl Into<String>)`](crate::operation::put_index_policy::builders::PutIndexPolicyFluentBuilder::log_group_identifier) / [`set_log_group_identifier(Option<String>)`](crate::operation::put_index_policy::builders::PutIndexPolicyFluentBuilder::set_log_group_identifier):<br>required: **true**<br><p>Specify either the log group name or log group ARN to apply this field index policy to. If you specify an ARN, use the format arn:aws:logs:<i>region</i>:<i>account-id</i>:log-group:<i>log_group_name</i> Don't include an * at the end.</p><br>
/// - [`policy_document(impl Into<String>)`](crate::operation::put_index_policy::builders::PutIndexPolicyFluentBuilder::policy_document) / [`set_policy_document(Option<String>)`](crate::operation::put_index_policy::builders::PutIndexPolicyFluentBuilder::set_policy_document):<br>required: **true**<br><p>The index policy document, in JSON format. The following is an example of an index policy document that creates two indexes, <code>RequestId</code> and <code>TransactionId</code>.</p> <p><code>"policyDocument": "{ "Fields": \[ "RequestId", "TransactionId" \] }"</code></p> <p>The policy document must include at least one field index. For more information about the fields that can be included and other restrictions, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing-Syntax.html">Field index syntax and quotas</a>.</p><br>
/// - On success, responds with [`PutIndexPolicyOutput`](crate::operation::put_index_policy::PutIndexPolicyOutput) with field(s):
/// - [`index_policy(Option<IndexPolicy>)`](crate::operation::put_index_policy::PutIndexPolicyOutput::index_policy): <p>The index policy that you just created or updated.</p>
/// - On failure, responds with [`SdkError<PutIndexPolicyError>`](crate::operation::put_index_policy::PutIndexPolicyError)
pub fn put_index_policy(&self) -> crate::operation::put_index_policy::builders::PutIndexPolicyFluentBuilder {
crate::operation::put_index_policy::builders::PutIndexPolicyFluentBuilder::new(self.handle.clone())
}
}