pub struct Client { /* private fields */ }
Expand description
Client for Amazon CloudWatch Logs
Client for invoking operations on Amazon CloudWatch Logs. Each operation on Amazon CloudWatch Logs is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_cloudwatchlogs::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_cloudwatchlogs::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AssociateKmsKey
operation has
a Client::associate_kms_key
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.associate_kms_key()
.log_group_name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn associate_kms_key(&self) -> AssociateKmsKeyFluentBuilder
pub fn associate_kms_key(&self) -> AssociateKmsKeyFluentBuilder
Constructs a fluent builder for the AssociateKmsKey
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseThe name of the log group.
In your
AssociateKmsKey
operation, you must specify either theresourceIdentifier
parameter or thelogGroup
parameter, but you can’t specify both.kms_key_id(impl Into<String>)
/set_kms_key_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see Amazon Resource Names and Using Symmetric and Asymmetric Keys.
resource_identifier(impl Into<String>)
/set_resource_identifier(Option<String>)
:
required: falseSpecifies the target for this operation. You must specify one of the following:
-
Specify the following ARN to have future GetQueryResults operations in this account encrypt the results with the specified KMS key. Replace REGION and ACCOUNT_ID with your Region and account ID.
arn:aws:logs:REGION:ACCOUNT_ID:query-result:*
-
Specify the ARN of a log group to have CloudWatch Logs use the KMS key to encrypt log events that are ingested and stored by that log group. The log group ARN must be in the following format. Replace REGION and ACCOUNT_ID with your Region and account ID.
arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME
In your
AssociateKmsKey
operation, you must specify either theresourceIdentifier
parameter or thelogGroup
parameter, but you can’t specify both.-
- On success, responds with
AssociateKmsKeyOutput
- On failure, responds with
SdkError<AssociateKmsKeyError>
Source§impl Client
impl Client
Sourcepub fn cancel_export_task(&self) -> CancelExportTaskFluentBuilder
pub fn cancel_export_task(&self) -> CancelExportTaskFluentBuilder
Constructs a fluent builder for the CancelExportTask
operation.
- The fluent builder is configurable:
task_id(impl Into<String>)
/set_task_id(Option<String>)
:
required: trueThe ID of the export task.
- On success, responds with
CancelExportTaskOutput
- On failure, responds with
SdkError<CancelExportTaskError>
Source§impl Client
impl Client
Sourcepub fn create_delivery(&self) -> CreateDeliveryFluentBuilder
pub fn create_delivery(&self) -> CreateDeliveryFluentBuilder
Constructs a fluent builder for the CreateDelivery
operation.
- The fluent builder is configurable:
delivery_source_name(impl Into<String>)
/set_delivery_source_name(Option<String>)
:
required: trueThe name of the delivery source to use for this delivery.
delivery_destination_arn(impl Into<String>)
/set_delivery_destination_arn(Option<String>)
:
required: trueThe ARN of the delivery destination to use for this delivery.
record_fields(impl Into<String>)
/set_record_fields(Option<Vec::<String>>)
:
required: falseThe list of record fields to be delivered to the destination, in order. If the delivery’s log source has mandatory fields, they must be included in this list.
field_delimiter(impl Into<String>)
/set_field_delimiter(Option<String>)
:
required: falseThe field delimiter to use between record fields when the final output format of a delivery is in
Plain
,W3C
, orRaw
format.s3_delivery_configuration(S3DeliveryConfiguration)
/set_s3_delivery_configuration(Option<S3DeliveryConfiguration>)
:
required: falseThis structure contains parameters that are valid only when the delivery’s delivery destination is an S3 bucket.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseAn optional list of key-value pairs to associate with the resource.
For more information about tagging, see Tagging Amazon Web Services resources
- On success, responds with
CreateDeliveryOutput
with field(s):delivery(Option<Delivery>)
:A structure that contains information about the delivery that you just created.
- On failure, responds with
SdkError<CreateDeliveryError>
Source§impl Client
impl Client
Sourcepub fn create_export_task(&self) -> CreateExportTaskFluentBuilder
pub fn create_export_task(&self) -> CreateExportTaskFluentBuilder
Constructs a fluent builder for the CreateExportTask
operation.
- The fluent builder is configurable:
task_name(impl Into<String>)
/set_task_name(Option<String>)
:
required: falseThe name of the export task.
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
log_stream_name_prefix(impl Into<String>)
/set_log_stream_name_prefix(Option<String>)
:
required: falseExport only log streams that match the provided prefix. If you don’t specify a value, no prefix filter is applied.
from(i64)
/set_from(Option<i64>)
:
required: trueThe start time of the range for the request, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC
. Events with a timestamp earlier than this time are not exported.to(i64)
/set_to(Option<i64>)
:
required: trueThe end time of the range for the request, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC
. Events with a timestamp later than this time are not exported.You must specify a time that is not earlier than when this log group was created.
destination(impl Into<String>)
/set_destination(Option<String>)
:
required: trueThe name of S3 bucket for the exported log data. The bucket must be in the same Amazon Web Services Region.
destination_prefix(impl Into<String>)
/set_destination_prefix(Option<String>)
:
required: falseThe prefix used as the start of the key for every object exported. If you don’t specify a value, the default is
exportedlogs
.The length of this parameter must comply with the S3 object key name length limits. The object key name is a sequence of Unicode characters with UTF-8 encoding, and can be up to 1,024 bytes.
- On success, responds with
CreateExportTaskOutput
with field(s):task_id(Option<String>)
:The ID of the export task.
- On failure, responds with
SdkError<CreateExportTaskError>
Source§impl Client
impl Client
Sourcepub fn create_log_anomaly_detector(
&self,
) -> CreateLogAnomalyDetectorFluentBuilder
pub fn create_log_anomaly_detector( &self, ) -> CreateLogAnomalyDetectorFluentBuilder
Constructs a fluent builder for the CreateLogAnomalyDetector
operation.
- The fluent builder is configurable:
log_group_arn_list(impl Into<String>)
/set_log_group_arn_list(Option<Vec::<String>>)
:
required: trueAn array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN.
detector_name(impl Into<String>)
/set_detector_name(Option<String>)
:
required: falseA name for this anomaly detector.
evaluation_frequency(EvaluationFrequency)
/set_evaluation_frequency(Option<EvaluationFrequency>)
:
required: falseSpecifies how often the anomaly detector is to run and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then 15 minutes might be a good setting for
evaluationFrequency
.filter_pattern(impl Into<String>)
/set_filter_pattern(Option<String>)
:
required: falseYou can use this parameter to limit the anomaly detection model to examine only log events that match the pattern you specify here. For more information, see Filter and Pattern Syntax.
kms_key_id(impl Into<String>)
/set_kms_key_id(Option<String>)
:
required: falseOptionally assigns a KMS key to secure this anomaly detector and its findings. If a key is assigned, the anomalies found and the model used by this detector are encrypted at rest with the key. If a key is assigned to an anomaly detector, a user must have permissions for both this key and for the anomaly detector to retrieve information about the anomalies that it finds.
For more information about using a KMS key and to see the required IAM policy, see Use a KMS key with an anomaly detector.
anomaly_visibility_time(i64)
/set_anomaly_visibility_time(Option<i64>)
:
required: falseThe number of days to have visibility on an anomaly. After this time period has elapsed for an anomaly, it will be automatically baselined and the anomaly detector will treat new occurrences of a similar anomaly as normal. Therefore, if you do not correct the cause of an anomaly during the time period specified in
anomalyVisibilityTime
, it will be considered normal going forward and will not be detected as an anomaly.tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseAn optional list of key-value pairs to associate with the resource.
For more information about tagging, see Tagging Amazon Web Services resources
- On success, responds with
CreateLogAnomalyDetectorOutput
with field(s):anomaly_detector_arn(Option<String>)
:The ARN of the log anomaly detector that you just created.
- On failure, responds with
SdkError<CreateLogAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn create_log_group(&self) -> CreateLogGroupFluentBuilder
pub fn create_log_group(&self) -> CreateLogGroupFluentBuilder
Constructs a fluent builder for the CreateLogGroup
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueA name for the log group.
kms_key_id(impl Into<String>)
/set_kms_key_id(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource Names.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe key-value pairs to use for the tags.
You can grant users access to certain log groups while preventing them from accessing other log groups. To do so, tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log group, you must have either the
logs:TagResource
orlogs:TagLogGroup
permission. For more information about tagging, see Tagging Amazon Web Services resources. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.log_group_class(LogGroupClass)
/set_log_group_class(Option<LogGroupClass>)
:
required: falseUse this parameter to specify the log group class for this log group. There are two classes:
-
The
Standard
log class supports all CloudWatch Logs features. -
The
Infrequent Access
log class supports a subset of CloudWatch Logs features and incurs lower costs.
If you omit this parameter, the default of
STANDARD
is used.The value of
logGroupClass
can’t be changed after a log group is created.For details about the features supported by each class, see Log classes
-
- On success, responds with
CreateLogGroupOutput
- On failure, responds with
SdkError<CreateLogGroupError>
Source§impl Client
impl Client
Sourcepub fn create_log_stream(&self) -> CreateLogStreamFluentBuilder
pub fn create_log_stream(&self) -> CreateLogStreamFluentBuilder
Constructs a fluent builder for the CreateLogStream
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
log_stream_name(impl Into<String>)
/set_log_stream_name(Option<String>)
:
required: trueThe name of the log stream.
- On success, responds with
CreateLogStreamOutput
- On failure, responds with
SdkError<CreateLogStreamError>
Source§impl Client
impl Client
Sourcepub fn delete_account_policy(&self) -> DeleteAccountPolicyFluentBuilder
pub fn delete_account_policy(&self) -> DeleteAccountPolicyFluentBuilder
Constructs a fluent builder for the DeleteAccountPolicy
operation.
- The fluent builder is configurable:
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: trueThe name of the policy to delete.
policy_type(PolicyType)
/set_policy_type(Option<PolicyType>)
:
required: trueThe type of policy to delete.
- On success, responds with
DeleteAccountPolicyOutput
- On failure, responds with
SdkError<DeleteAccountPolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_data_protection_policy(
&self,
) -> DeleteDataProtectionPolicyFluentBuilder
pub fn delete_data_protection_policy( &self, ) -> DeleteDataProtectionPolicyFluentBuilder
Constructs a fluent builder for the DeleteDataProtectionPolicy
operation.
- The fluent builder is configurable:
log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: trueThe name or ARN of the log group that you want to delete the data protection policy for.
- On success, responds with
DeleteDataProtectionPolicyOutput
- On failure, responds with
SdkError<DeleteDataProtectionPolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_delivery(&self) -> DeleteDeliveryFluentBuilder
pub fn delete_delivery(&self) -> DeleteDeliveryFluentBuilder
Constructs a fluent builder for the DeleteDelivery
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe unique ID of the delivery to delete. You can find the ID of a delivery with the DescribeDeliveries operation.
- On success, responds with
DeleteDeliveryOutput
- On failure, responds with
SdkError<DeleteDeliveryError>
Source§impl Client
impl Client
Sourcepub fn delete_delivery_destination(
&self,
) -> DeleteDeliveryDestinationFluentBuilder
pub fn delete_delivery_destination( &self, ) -> DeleteDeliveryDestinationFluentBuilder
Constructs a fluent builder for the DeleteDeliveryDestination
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the delivery destination that you want to delete. You can find a list of delivery destionation names by using the DescribeDeliveryDestinations operation.
- On success, responds with
DeleteDeliveryDestinationOutput
- On failure, responds with
SdkError<DeleteDeliveryDestinationError>
Source§impl Client
impl Client
Sourcepub fn delete_delivery_destination_policy(
&self,
) -> DeleteDeliveryDestinationPolicyFluentBuilder
pub fn delete_delivery_destination_policy( &self, ) -> DeleteDeliveryDestinationPolicyFluentBuilder
Constructs a fluent builder for the DeleteDeliveryDestinationPolicy
operation.
- The fluent builder is configurable:
delivery_destination_name(impl Into<String>)
/set_delivery_destination_name(Option<String>)
:
required: trueThe name of the delivery destination that you want to delete the policy for.
- On success, responds with
DeleteDeliveryDestinationPolicyOutput
- On failure, responds with
SdkError<DeleteDeliveryDestinationPolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_delivery_source(&self) -> DeleteDeliverySourceFluentBuilder
pub fn delete_delivery_source(&self) -> DeleteDeliverySourceFluentBuilder
Constructs a fluent builder for the DeleteDeliverySource
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the delivery source that you want to delete.
- On success, responds with
DeleteDeliverySourceOutput
- On failure, responds with
SdkError<DeleteDeliverySourceError>
Source§impl Client
impl Client
Sourcepub fn delete_destination(&self) -> DeleteDestinationFluentBuilder
pub fn delete_destination(&self) -> DeleteDestinationFluentBuilder
Constructs a fluent builder for the DeleteDestination
operation.
- The fluent builder is configurable:
destination_name(impl Into<String>)
/set_destination_name(Option<String>)
:
required: trueThe name of the destination.
- On success, responds with
DeleteDestinationOutput
- On failure, responds with
SdkError<DeleteDestinationError>
Source§impl Client
impl Client
Sourcepub fn delete_index_policy(&self) -> DeleteIndexPolicyFluentBuilder
pub fn delete_index_policy(&self) -> DeleteIndexPolicyFluentBuilder
Constructs a fluent builder for the DeleteIndexPolicy
operation.
- The fluent builder is configurable:
log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: trueThe log group to delete the index policy for. You can specify either the name or the ARN of the log group.
- On success, responds with
DeleteIndexPolicyOutput
- On failure, responds with
SdkError<DeleteIndexPolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_log_anomaly_detector(
&self,
) -> DeleteLogAnomalyDetectorFluentBuilder
pub fn delete_log_anomaly_detector( &self, ) -> DeleteLogAnomalyDetectorFluentBuilder
Constructs a fluent builder for the DeleteLogAnomalyDetector
operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)
/set_anomaly_detector_arn(Option<String>)
:
required: trueThe ARN of the anomaly detector to delete. You can find the ARNs of log anomaly detectors in your account by using the ListLogAnomalyDetectors operation.
- On success, responds with
DeleteLogAnomalyDetectorOutput
- On failure, responds with
SdkError<DeleteLogAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn delete_log_group(&self) -> DeleteLogGroupFluentBuilder
pub fn delete_log_group(&self) -> DeleteLogGroupFluentBuilder
Constructs a fluent builder for the DeleteLogGroup
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
- On success, responds with
DeleteLogGroupOutput
- On failure, responds with
SdkError<DeleteLogGroupError>
Source§impl Client
impl Client
Sourcepub fn delete_log_stream(&self) -> DeleteLogStreamFluentBuilder
pub fn delete_log_stream(&self) -> DeleteLogStreamFluentBuilder
Constructs a fluent builder for the DeleteLogStream
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
log_stream_name(impl Into<String>)
/set_log_stream_name(Option<String>)
:
required: trueThe name of the log stream.
- On success, responds with
DeleteLogStreamOutput
- On failure, responds with
SdkError<DeleteLogStreamError>
Source§impl Client
impl Client
Sourcepub fn delete_metric_filter(&self) -> DeleteMetricFilterFluentBuilder
pub fn delete_metric_filter(&self) -> DeleteMetricFilterFluentBuilder
Constructs a fluent builder for the DeleteMetricFilter
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
filter_name(impl Into<String>)
/set_filter_name(Option<String>)
:
required: trueThe name of the metric filter.
- On success, responds with
DeleteMetricFilterOutput
- On failure, responds with
SdkError<DeleteMetricFilterError>
Source§impl Client
impl Client
Sourcepub fn delete_query_definition(&self) -> DeleteQueryDefinitionFluentBuilder
pub fn delete_query_definition(&self) -> DeleteQueryDefinitionFluentBuilder
Constructs a fluent builder for the DeleteQueryDefinition
operation.
- The fluent builder is configurable:
query_definition_id(impl Into<String>)
/set_query_definition_id(Option<String>)
:
required: trueThe ID of the query definition that you want to delete. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.
- On success, responds with
DeleteQueryDefinitionOutput
with field(s):success(bool)
:A value of TRUE indicates that the operation succeeded. FALSE indicates that the operation failed.
- On failure, responds with
SdkError<DeleteQueryDefinitionError>
Source§impl Client
impl Client
Sourcepub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
pub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
Constructs a fluent builder for the DeleteResourcePolicy
operation.
- The fluent builder is configurable:
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: falseThe name of the policy to be revoked. This parameter is required.
- On success, responds with
DeleteResourcePolicyOutput
- On failure, responds with
SdkError<DeleteResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_retention_policy(&self) -> DeleteRetentionPolicyFluentBuilder
pub fn delete_retention_policy(&self) -> DeleteRetentionPolicyFluentBuilder
Constructs a fluent builder for the DeleteRetentionPolicy
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
- On success, responds with
DeleteRetentionPolicyOutput
- On failure, responds with
SdkError<DeleteRetentionPolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_subscription_filter(
&self,
) -> DeleteSubscriptionFilterFluentBuilder
pub fn delete_subscription_filter( &self, ) -> DeleteSubscriptionFilterFluentBuilder
Constructs a fluent builder for the DeleteSubscriptionFilter
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
filter_name(impl Into<String>)
/set_filter_name(Option<String>)
:
required: trueThe name of the subscription filter.
- On success, responds with
DeleteSubscriptionFilterOutput
- On failure, responds with
SdkError<DeleteSubscriptionFilterError>
Source§impl Client
impl Client
Sourcepub fn delete_transformer(&self) -> DeleteTransformerFluentBuilder
pub fn delete_transformer(&self) -> DeleteTransformerFluentBuilder
Constructs a fluent builder for the DeleteTransformer
operation.
- The fluent builder is configurable:
log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: trueSpecify either the name or ARN of the log group to delete the transformer for. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
- On success, responds with
DeleteTransformerOutput
- On failure, responds with
SdkError<DeleteTransformerError>
Source§impl Client
impl Client
Sourcepub fn describe_account_policies(&self) -> DescribeAccountPoliciesFluentBuilder
pub fn describe_account_policies(&self) -> DescribeAccountPoliciesFluentBuilder
Constructs a fluent builder for the DescribeAccountPolicies
operation.
- The fluent builder is configurable:
policy_type(PolicyType)
/set_policy_type(Option<PolicyType>)
:
required: trueUse this parameter to limit the returned policies to only the policies that match the policy type that you specify.
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: falseUse this parameter to limit the returned policies to only the policy with the name that you specify.
account_identifiers(impl Into<String>)
/set_account_identifiers(Option<Vec::<String>>)
:
required: falseIf you are using an account that is set up as a monitoring account for CloudWatch unified cross-account observability, you can use this to specify the account ID of a source account. If you do, the operation returns the account policy for the specified account. Currently, you can specify only one account ID in this parameter.
If you omit this parameter, only the policy in the current account is returned.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
- On success, responds with
DescribeAccountPoliciesOutput
with field(s):account_policies(Option<Vec::<AccountPolicy>>)
:An array of structures that contain information about the CloudWatch Logs account policies that match the specified filters.
next_token(Option<String>)
:The token to use when requesting the next set of items. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeAccountPoliciesError>
Source§impl Client
impl Client
Sourcepub fn describe_configuration_templates(
&self,
) -> DescribeConfigurationTemplatesFluentBuilder
pub fn describe_configuration_templates( &self, ) -> DescribeConfigurationTemplatesFluentBuilder
Constructs a fluent builder for the DescribeConfigurationTemplates
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
service(impl Into<String>)
/set_service(Option<String>)
:
required: falseUse this parameter to filter the response to include only the configuration templates that apply to the Amazon Web Services service that you specify here.
log_types(impl Into<String>)
/set_log_types(Option<Vec::<String>>)
:
required: falseUse this parameter to filter the response to include only the configuration templates that apply to the log types that you specify here.
resource_types(impl Into<String>)
/set_resource_types(Option<Vec::<String>>)
:
required: falseUse this parameter to filter the response to include only the configuration templates that apply to the resource types that you specify here.
delivery_destination_types(DeliveryDestinationType)
/set_delivery_destination_types(Option<Vec::<DeliveryDestinationType>>)
:
required: falseUse this parameter to filter the response to include only the configuration templates that apply to the delivery destination types that you specify here.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
limit(i32)
/set_limit(Option<i32>)
:
required: falseUse this parameter to limit the number of configuration templates that are returned in the response.
- On success, responds with
DescribeConfigurationTemplatesOutput
with field(s):configuration_templates(Option<Vec::<ConfigurationTemplate>>)
:An array of objects, where each object describes one configuration template that matches the filters that you specified in the request.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeConfigurationTemplatesError>
Source§impl Client
impl Client
Sourcepub fn describe_deliveries(&self) -> DescribeDeliveriesFluentBuilder
pub fn describe_deliveries(&self) -> DescribeDeliveriesFluentBuilder
Constructs a fluent builder for the DescribeDeliveries
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
limit(i32)
/set_limit(Option<i32>)
:
required: falseOptionally specify the maximum number of deliveries to return in the response.
- On success, responds with
DescribeDeliveriesOutput
with field(s):deliveries(Option<Vec::<Delivery>>)
:An array of structures. Each structure contains information about one delivery in the account.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeDeliveriesError>
Source§impl Client
impl Client
Sourcepub fn describe_delivery_destinations(
&self,
) -> DescribeDeliveryDestinationsFluentBuilder
pub fn describe_delivery_destinations( &self, ) -> DescribeDeliveryDestinationsFluentBuilder
Constructs a fluent builder for the DescribeDeliveryDestinations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
limit(i32)
/set_limit(Option<i32>)
:
required: falseOptionally specify the maximum number of delivery destinations to return in the response.
- On success, responds with
DescribeDeliveryDestinationsOutput
with field(s):delivery_destinations(Option<Vec::<DeliveryDestination>>)
:An array of structures. Each structure contains information about one delivery destination in the account.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeDeliveryDestinationsError>
Source§impl Client
impl Client
Sourcepub fn describe_delivery_sources(&self) -> DescribeDeliverySourcesFluentBuilder
pub fn describe_delivery_sources(&self) -> DescribeDeliverySourcesFluentBuilder
Constructs a fluent builder for the DescribeDeliverySources
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
limit(i32)
/set_limit(Option<i32>)
:
required: falseOptionally specify the maximum number of delivery sources to return in the response.
- On success, responds with
DescribeDeliverySourcesOutput
with field(s):delivery_sources(Option<Vec::<DeliverySource>>)
:An array of structures. Each structure contains information about one delivery source in the account.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeDeliverySourcesError>
Source§impl Client
impl Client
Sourcepub fn describe_destinations(&self) -> DescribeDestinationsFluentBuilder
pub fn describe_destinations(&self) -> DescribeDestinationsFluentBuilder
Constructs a fluent builder for the DescribeDestinations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
destination_name_prefix(impl Into<String>)
/set_destination_name_prefix(Option<String>)
:
required: falseThe prefix to match. If you don’t specify a value, no prefix filter is applied.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of items returned. If you don’t specify a value, the default maximum value of 50 items is used.
- On success, responds with
DescribeDestinationsOutput
with field(s):destinations(Option<Vec::<Destination>>)
:The destinations.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeDestinationsError>
Source§impl Client
impl Client
Sourcepub fn describe_export_tasks(&self) -> DescribeExportTasksFluentBuilder
pub fn describe_export_tasks(&self) -> DescribeExportTasksFluentBuilder
Constructs a fluent builder for the DescribeExportTasks
operation.
- The fluent builder is configurable:
task_id(impl Into<String>)
/set_task_id(Option<String>)
:
required: falseThe ID of the export task. Specifying a task ID filters the results to one or zero export tasks.
status_code(ExportTaskStatusCode)
/set_status_code(Option<ExportTaskStatusCode>)
:
required: falseThe status code of the export task. Specifying a status code filters the results to zero or more export tasks.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of items returned. If you don’t specify a value, the default is up to 50 items.
- On success, responds with
DescribeExportTasksOutput
with field(s):export_tasks(Option<Vec::<ExportTask>>)
:The export tasks.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeExportTasksError>
Source§impl Client
impl Client
Sourcepub fn describe_field_indexes(&self) -> DescribeFieldIndexesFluentBuilder
pub fn describe_field_indexes(&self) -> DescribeFieldIndexesFluentBuilder
Constructs a fluent builder for the DescribeFieldIndexes
operation.
- The fluent builder is configurable:
log_group_identifiers(impl Into<String>)
/set_log_group_identifiers(Option<Vec::<String>>)
:
required: trueAn array containing the names or ARNs of the log groups that you want to retrieve field indexes for.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
- On success, responds with
DescribeFieldIndexesOutput
with field(s):field_indexes(Option<Vec::<FieldIndex>>)
:An array containing the field index information.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeFieldIndexesError>
Source§impl Client
impl Client
Sourcepub fn describe_index_policies(&self) -> DescribeIndexPoliciesFluentBuilder
pub fn describe_index_policies(&self) -> DescribeIndexPoliciesFluentBuilder
Constructs a fluent builder for the DescribeIndexPolicies
operation.
- The fluent builder is configurable:
log_group_identifiers(impl Into<String>)
/set_log_group_identifiers(Option<Vec::<String>>)
:
required: trueAn array containing the name or ARN of the log group that you want to retrieve field index policies for.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
- On success, responds with
DescribeIndexPoliciesOutput
with field(s):index_policies(Option<Vec::<IndexPolicy>>)
:An array containing the field index policies.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeIndexPoliciesError>
Source§impl Client
impl Client
Sourcepub fn describe_log_groups(&self) -> DescribeLogGroupsFluentBuilder
pub fn describe_log_groups(&self) -> DescribeLogGroupsFluentBuilder
Constructs a fluent builder for the DescribeLogGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
account_identifiers(impl Into<String>)
/set_account_identifiers(Option<Vec::<String>>)
:
required: falseWhen
includeLinkedAccounts
is set toTrue
, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.log_group_name_prefix(impl Into<String>)
/set_log_group_name_prefix(Option<String>)
:
required: falseThe prefix to match.
logGroupNamePrefix
andlogGroupNamePattern
are mutually exclusive. Only one of these parameters can be passed.log_group_name_pattern(impl Into<String>)
/set_log_group_name_pattern(Option<String>)
:
required: falseIf 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
Foo
, log groups namedFooBar
,aws/Foo
, andGroupFoo
would match, butfoo
,F/o/o
andFroo
would not match.If you specify
logGroupNamePattern
in your request, then onlyarn
,creationTime
, andlogGroupName
are included in the response.logGroupNamePattern
andlogGroupNamePrefix
are mutually exclusive. Only one of these parameters can be passed.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of items returned. If you don’t specify a value, the default is up to 50 items.
include_linked_accounts(bool)
/set_include_linked_accounts(Option<bool>)
:
required: falseIf you are using a monitoring account, set this to
True
to have the operation return log groups in the accounts listed inaccountIdentifiers
.If this parameter is set to
true
andaccountIdentifiers
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.log_group_class(LogGroupClass)
/set_log_group_class(Option<LogGroupClass>)
:
required: falseSpecifies the log group class for this log group. There are two classes:
-
The
Standard
log class supports all CloudWatch Logs features. -
The
Infrequent Access
log class supports a subset of CloudWatch Logs features and incurs lower costs.
For details about the features supported by each class, see Log classes
-
- On success, responds with
DescribeLogGroupsOutput
with field(s):log_groups(Option<Vec::<LogGroup>>)
:The log groups.
If the
retentionInDays
value is not included for a log group, then that log group’s events do not expire.next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeLogGroupsError>
Source§impl Client
impl Client
Sourcepub fn describe_log_streams(&self) -> DescribeLogStreamsFluentBuilder
pub fn describe_log_streams(&self) -> DescribeLogStreamsFluentBuilder
Constructs a fluent builder for the DescribeLogStreams
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseThe name of the log group.
You must include either
logGroupIdentifier
orlogGroupName
, but not both.log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: falseSpecify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
You must include either
logGroupIdentifier
orlogGroupName
, but not both.log_stream_name_prefix(impl Into<String>)
/set_log_stream_name_prefix(Option<String>)
:
required: falseThe prefix to match.
If
orderBy
isLastEventTime
, you cannot specify this parameter.order_by(OrderBy)
/set_order_by(Option<OrderBy>)
:
required: falseIf the value is
LogStreamName
, the results are ordered by log stream name. If the value isLastEventTime
, the results are ordered by the event time. The default value isLogStreamName
.If you order the results by event time, you cannot specify the
logStreamNamePrefix
parameter.lastEventTimestamp
represents the time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds afterJan 1, 1970 00:00:00 UTC
.lastEventTimestamp
updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.descending(bool)
/set_descending(Option<bool>)
:
required: falseIf the value is true, results are returned in descending order. If the value is to false, results are returned in ascending order. The default value is false.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of items returned. If you don’t specify a value, the default is up to 50 items.
- On success, responds with
DescribeLogStreamsOutput
with field(s):log_streams(Option<Vec::<LogStream>>)
:The log streams.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeLogStreamsError>
Source§impl Client
impl Client
Sourcepub fn describe_metric_filters(&self) -> DescribeMetricFiltersFluentBuilder
pub fn describe_metric_filters(&self) -> DescribeMetricFiltersFluentBuilder
Constructs a fluent builder for the DescribeMetricFilters
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseThe name of the log group.
filter_name_prefix(impl Into<String>)
/set_filter_name_prefix(Option<String>)
:
required: falseThe prefix to match. CloudWatch Logs uses the value that you set here only if you also include the
logGroupName
parameter in your request.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of items returned. If you don’t specify a value, the default is up to 50 items.
metric_name(impl Into<String>)
/set_metric_name(Option<String>)
:
required: falseFilters results to include only those with the specified metric name. If you include this parameter in your request, you must also include the
metricNamespace
parameter.metric_namespace(impl Into<String>)
/set_metric_namespace(Option<String>)
:
required: falseFilters results to include only those in the specified namespace. If you include this parameter in your request, you must also include the
metricName
parameter.
- On success, responds with
DescribeMetricFiltersOutput
with field(s):metric_filters(Option<Vec::<MetricFilter>>)
:The metric filters.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeMetricFiltersError>
Source§impl Client
impl Client
Sourcepub fn describe_queries(&self) -> DescribeQueriesFluentBuilder
pub fn describe_queries(&self) -> DescribeQueriesFluentBuilder
Constructs a fluent builder for the DescribeQueries
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseLimits the returned queries to only those for the specified log group.
status(QueryStatus)
/set_status(Option<QueryStatus>)
:
required: falseLimits the returned queries to only those that have the specified status. Valid values are
Cancelled
,Complete
,Failed
,Running
, andScheduled
.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLimits the number of returned queries to the specified number.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
- On success, responds with
DescribeQueriesOutput
with field(s):queries(Option<Vec::<QueryInfo>>)
:The list of queries that match the request.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeQueriesError>
Source§impl Client
impl Client
Sourcepub fn describe_query_definitions(
&self,
) -> DescribeQueryDefinitionsFluentBuilder
pub fn describe_query_definitions( &self, ) -> DescribeQueryDefinitionsFluentBuilder
Constructs a fluent builder for the DescribeQueryDefinitions
operation.
- The fluent builder is configurable:
query_definition_name_prefix(impl Into<String>)
/set_query_definition_name_prefix(Option<String>)
:
required: falseUse this parameter to filter your results to only the query definitions that have names that start with the prefix you specify.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLimits the number of returned query definitions to the specified number.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
- On success, responds with
DescribeQueryDefinitionsOutput
with field(s):query_definitions(Option<Vec::<QueryDefinition>>)
:The list of query definitions that match your request.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeQueryDefinitionsError>
Source§impl Client
impl Client
Sourcepub fn describe_resource_policies(
&self,
) -> DescribeResourcePoliciesFluentBuilder
pub fn describe_resource_policies( &self, ) -> DescribeResourcePoliciesFluentBuilder
Constructs a fluent builder for the DescribeResourcePolicies
operation.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of resource policies to be displayed with one call of this API.
- On success, responds with
DescribeResourcePoliciesOutput
with field(s):resource_policies(Option<Vec::<ResourcePolicy>>)
:The resource policies that exist in this account.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeResourcePoliciesError>
Source§impl Client
impl Client
Sourcepub fn describe_subscription_filters(
&self,
) -> DescribeSubscriptionFiltersFluentBuilder
pub fn describe_subscription_filters( &self, ) -> DescribeSubscriptionFiltersFluentBuilder
Constructs a fluent builder for the DescribeSubscriptionFilters
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
filter_name_prefix(impl Into<String>)
/set_filter_name_prefix(Option<String>)
:
required: falseThe prefix to match. If you don’t specify a value, no prefix filter is applied.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of items returned. If you don’t specify a value, the default is up to 50 items.
- On success, responds with
DescribeSubscriptionFiltersOutput
with field(s):subscription_filters(Option<Vec::<SubscriptionFilter>>)
:The subscription filters.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<DescribeSubscriptionFiltersError>
Source§impl Client
impl Client
Sourcepub fn disassociate_kms_key(&self) -> DisassociateKmsKeyFluentBuilder
pub fn disassociate_kms_key(&self) -> DisassociateKmsKeyFluentBuilder
Constructs a fluent builder for the DisassociateKmsKey
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseThe name of the log group.
In your
DisassociateKmsKey
operation, you must specify either theresourceIdentifier
parameter or thelogGroup
parameter, but you can’t specify both.resource_identifier(impl Into<String>)
/set_resource_identifier(Option<String>)
:
required: falseSpecifies the target for this operation. You must specify one of the following:
-
Specify the ARN of a log group to stop having CloudWatch Logs use the KMS key to encrypt log events that are ingested and stored by that log group. After you run this operation, CloudWatch Logs encrypts ingested log events with the default CloudWatch Logs method. The log group ARN must be in the following format. Replace REGION and ACCOUNT_ID with your Region and account ID.
arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME
-
Specify the following ARN to stop using this key to encrypt the results of future StartQuery operations in this account. Replace REGION and ACCOUNT_ID with your Region and account ID.
arn:aws:logs:REGION:ACCOUNT_ID:query-result:*
In your
DisssociateKmsKey
operation, you must specify either theresourceIdentifier
parameter or thelogGroup
parameter, but you can’t specify both.-
- On success, responds with
DisassociateKmsKeyOutput
- On failure, responds with
SdkError<DisassociateKmsKeyError>
Source§impl Client
impl Client
Sourcepub fn filter_log_events(&self) -> FilterLogEventsFluentBuilder
pub fn filter_log_events(&self) -> FilterLogEventsFluentBuilder
Constructs a fluent builder for the FilterLogEvents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseThe name of the log group to search.
You must include either
logGroupIdentifier
orlogGroupName
, but not both.log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: falseSpecify either the name or ARN of the log group to view log events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
You must include either
logGroupIdentifier
orlogGroupName
, but not both.log_stream_names(impl Into<String>)
/set_log_stream_names(Option<Vec::<String>>)
:
required: falseFilters the results to only logs from the log streams in this list.
If you specify a value for both
logStreamNames
andlogStreamNamePrefix
, the action returns anInvalidParameterException
error.log_stream_name_prefix(impl Into<String>)
/set_log_stream_name_prefix(Option<String>)
:
required: falseFilters the results to include only events from log streams that have names starting with this prefix.
If you specify a value for both
logStreamNamePrefix
andlogStreamNames
, the action returns anInvalidParameterException
error.start_time(i64)
/set_start_time(Option<i64>)
:
required: falseThe start of the time range, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC
. Events with a timestamp before this time are not returned.end_time(i64)
/set_end_time(Option<i64>)
:
required: falseThe end of the time range, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC
. Events with a timestamp later than this time are not returned.filter_pattern(impl Into<String>)
/set_filter_pattern(Option<String>)
:
required: falseThe filter pattern to use. For more information, see Filter and Pattern Syntax.
If not provided, all the events are matched.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of events to return. (You received this token from a previous call.)
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of events to return. The default is 10,000 events.
interleaved(bool)
/set_interleaved(Option<bool>)
:
required: falseIf the value is true, the operation attempts to provide responses that contain events from multiple log streams within the log group, interleaved in a single response. If the value is false, all the matched log events in the first log stream are searched first, then those in the next log stream, and so on.
Important As of June 17, 2019, this parameter is ignored and the value is assumed to be true. The response from this operation always interleaves events from multiple log streams within a log group.
unmask(bool)
/set_unmask(Option<bool>)
:
required: falseSpecify
true
to display the log event fields with all sensitive data unmasked and visible. The default isfalse
.To use this operation with this parameter, you must be signed into an account with the
logs:Unmask
permission.
- On success, responds with
FilterLogEventsOutput
with field(s):events(Option<Vec::<FilteredLogEvent>>)
:The matched events.
searched_log_streams(Option<Vec::<SearchedLogStream>>)
:Important As of May 15, 2020, this parameter is no longer supported. This parameter returns an empty list.
Indicates which log streams have been searched and whether each has been searched completely.
next_token(Option<String>)
:The token to use when requesting the next set of items. The token expires after 24 hours.
- On failure, responds with
SdkError<FilterLogEventsError>
Source§impl Client
impl Client
Sourcepub fn get_data_protection_policy(&self) -> GetDataProtectionPolicyFluentBuilder
pub fn get_data_protection_policy(&self) -> GetDataProtectionPolicyFluentBuilder
Constructs a fluent builder for the GetDataProtectionPolicy
operation.
- The fluent builder is configurable:
log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: trueThe name or ARN of the log group that contains the data protection policy that you want to see.
- On success, responds with
GetDataProtectionPolicyOutput
with field(s):log_group_identifier(Option<String>)
:The log group name or ARN that you specified in your request.
policy_document(Option<String>)
:The data protection policy document for this log group.
last_updated_time(Option<i64>)
:The date and time that this policy was most recently updated.
- On failure, responds with
SdkError<GetDataProtectionPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_delivery(&self) -> GetDeliveryFluentBuilder
pub fn get_delivery(&self) -> GetDeliveryFluentBuilder
Constructs a fluent builder for the GetDelivery
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe ID of the delivery that you want to retrieve.
- On success, responds with
GetDeliveryOutput
with field(s):delivery(Option<Delivery>)
:A structure that contains information about the delivery.
- On failure, responds with
SdkError<GetDeliveryError>
Source§impl Client
impl Client
Sourcepub fn get_delivery_destination(&self) -> GetDeliveryDestinationFluentBuilder
pub fn get_delivery_destination(&self) -> GetDeliveryDestinationFluentBuilder
Constructs a fluent builder for the GetDeliveryDestination
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the delivery destination that you want to retrieve.
- On success, responds with
GetDeliveryDestinationOutput
with field(s):delivery_destination(Option<DeliveryDestination>)
:A structure containing information about the delivery destination.
- On failure, responds with
SdkError<GetDeliveryDestinationError>
Source§impl Client
impl Client
Sourcepub fn get_delivery_destination_policy(
&self,
) -> GetDeliveryDestinationPolicyFluentBuilder
pub fn get_delivery_destination_policy( &self, ) -> GetDeliveryDestinationPolicyFluentBuilder
Constructs a fluent builder for the GetDeliveryDestinationPolicy
operation.
- The fluent builder is configurable:
delivery_destination_name(impl Into<String>)
/set_delivery_destination_name(Option<String>)
:
required: trueThe name of the delivery destination that you want to retrieve the policy of.
- On success, responds with
GetDeliveryDestinationPolicyOutput
with field(s):policy(Option<Policy>)
:The IAM policy for this delivery destination.
- On failure, responds with
SdkError<GetDeliveryDestinationPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_delivery_source(&self) -> GetDeliverySourceFluentBuilder
pub fn get_delivery_source(&self) -> GetDeliverySourceFluentBuilder
Constructs a fluent builder for the GetDeliverySource
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the delivery source that you want to retrieve.
- On success, responds with
GetDeliverySourceOutput
with field(s):delivery_source(Option<DeliverySource>)
:A structure containing information about the delivery source.
- On failure, responds with
SdkError<GetDeliverySourceError>
Source§impl Client
impl Client
Sourcepub fn get_log_anomaly_detector(&self) -> GetLogAnomalyDetectorFluentBuilder
pub fn get_log_anomaly_detector(&self) -> GetLogAnomalyDetectorFluentBuilder
Constructs a fluent builder for the GetLogAnomalyDetector
operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)
/set_anomaly_detector_arn(Option<String>)
:
required: trueThe ARN of the anomaly detector to retrieve information about. You can find the ARNs of log anomaly detectors in your account by using the ListLogAnomalyDetectors operation.
- On success, responds with
GetLogAnomalyDetectorOutput
with field(s):detector_name(Option<String>)
:The name of the log anomaly detector
log_group_arn_list(Option<Vec::<String>>)
:An array of structures, where each structure contains the ARN of a log group associated with this anomaly detector.
evaluation_frequency(Option<EvaluationFrequency>)
:Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then setting
evaluationFrequency
toFIFTEEN_MIN
might be appropriate.filter_pattern(Option<String>)
:A symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.
anomaly_detector_status(Option<AnomalyDetectorStatus>)
:Specifies whether the anomaly detector is currently active. To change its status, use the
enabled
parameter in the UpdateLogAnomalyDetector operation.kms_key_id(Option<String>)
:The ID of the KMS key assigned to this anomaly detector, if any.
creation_time_stamp(i64)
:The date and time when this anomaly detector was created.
last_modified_time_stamp(i64)
:The date and time when this anomaly detector was most recently modified.
anomaly_visibility_time(Option<i64>)
:The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined and the anomaly detector model will treat new occurrences of similar event as normal.
- On failure, responds with
SdkError<GetLogAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn get_log_events(&self) -> GetLogEventsFluentBuilder
pub fn get_log_events(&self) -> GetLogEventsFluentBuilder
Constructs a fluent builder for the GetLogEvents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseThe name of the log group.
You must include either
logGroupIdentifier
orlogGroupName
, but not both.log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: falseSpecify either the name or ARN of the log group to view events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
You must include either
logGroupIdentifier
orlogGroupName
, but not both.log_stream_name(impl Into<String>)
/set_log_stream_name(Option<String>)
:
required: trueThe name of the log stream.
start_time(i64)
/set_start_time(Option<i64>)
:
required: falseThe start of the time range, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC
. Events with a timestamp equal to this time or later than this time are included. Events with a timestamp earlier than this time are not included.end_time(i64)
/set_end_time(Option<i64>)
:
required: falseThe end of the time range, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC
. Events with a timestamp equal to or later than this time are not included.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of log events returned. If you don’t specify a limit, the default is as many log events as can fit in a response size of 1 MB (up to 10,000 log events).
start_from_head(bool)
/set_start_from_head(Option<bool>)
:
required: falseIf the value is true, the earliest log events are returned first. If the value is false, the latest log events are returned first. The default value is false.
If you are using a previous
nextForwardToken
value as thenextToken
in this operation, you must specifytrue
forstartFromHead
.unmask(bool)
/set_unmask(Option<bool>)
:
required: falseSpecify
true
to display the log event fields with all sensitive data unmasked and visible. The default isfalse
.To use this operation with this parameter, you must be signed into an account with the
logs:Unmask
permission.
- On success, responds with
GetLogEventsOutput
with field(s):events(Option<Vec::<OutputLogEvent>>)
:The events.
next_forward_token(Option<String>)
:The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.
next_backward_token(Option<String>)
:The token for the next set of items in the backward direction. The token expires after 24 hours. This token is not null. If you have reached the end of the stream, it returns the same token you passed in.
- On failure, responds with
SdkError<GetLogEventsError>
Source§impl Client
impl Client
Sourcepub fn get_log_group_fields(&self) -> GetLogGroupFieldsFluentBuilder
pub fn get_log_group_fields(&self) -> GetLogGroupFieldsFluentBuilder
Constructs a fluent builder for the GetLogGroupFields
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseThe name of the log group to search.
You must include either
logGroupIdentifier
orlogGroupName
, but not both.time(i64)
/set_time(Option<i64>)
:
required: falseThe time to set as the center of the query. If you specify
time
, the 8 minutes before and 8 minutes after this time are searched. If you omittime
, the most recent 15 minutes up to the current time are searched.The
time
value is specified as epoch time, which is the number of seconds sinceJanuary 1, 1970, 00:00:00 UTC
.log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: falseSpecify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must specify the ARN.
You must include either
logGroupIdentifier
orlogGroupName
, but not both.
- On success, responds with
GetLogGroupFieldsOutput
with field(s):log_group_fields(Option<Vec::<LogGroupField>>)
:The array of fields found in the query. Each object in the array contains the name of the field, along with the percentage of time it appeared in the log events that were queried.
- On failure, responds with
SdkError<GetLogGroupFieldsError>
Source§impl Client
impl Client
Sourcepub fn get_log_record(&self) -> GetLogRecordFluentBuilder
pub fn get_log_record(&self) -> GetLogRecordFluentBuilder
Constructs a fluent builder for the GetLogRecord
operation.
- The fluent builder is configurable:
log_record_pointer(impl Into<String>)
/set_log_record_pointer(Option<String>)
:
required: trueThe pointer corresponding to the log event record you want to retrieve. You get this from the response of a
GetQueryResults
operation. In that response, the value of the@ptr
field for a log event is the value to use aslogRecordPointer
to retrieve that complete log event record.unmask(bool)
/set_unmask(Option<bool>)
:
required: falseSpecify
true
to display the log event fields with all sensitive data unmasked and visible. The default isfalse
.To use this operation with this parameter, you must be signed into an account with the
logs:Unmask
permission.
- On success, responds with
GetLogRecordOutput
with field(s):log_record(Option<HashMap::<String, String>>)
:The requested log event, as a JSON string.
- On failure, responds with
SdkError<GetLogRecordError>
Source§impl Client
impl Client
Sourcepub fn get_query_results(&self) -> GetQueryResultsFluentBuilder
pub fn get_query_results(&self) -> GetQueryResultsFluentBuilder
Constructs a fluent builder for the GetQueryResults
operation.
- The fluent builder is configurable:
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe ID number of the query.
- On success, responds with
GetQueryResultsOutput
with field(s):results(Option<Vec::<Vec::<ResultField>>>)
:The log events that matched the query criteria during the most recent time it ran.
The
results
value is an array of arrays. Each log event is one object in the top-level array. Each of these log event objects is an array offield
/value
pairs.statistics(Option<QueryStatistics>)
:Includes the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the scanned log events. These values reflect the full raw results of the query.
status(Option<QueryStatus>)
:The status of the most recent running of the query. Possible values are
Cancelled
,Complete
,Failed
,Running
,Scheduled
,Timeout
, andUnknown
.Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.
encryption_key(Option<String>)
:If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field displays the ARN of the key that’s used to encrypt the query results when StartQuery stores them.
- On failure, responds with
SdkError<GetQueryResultsError>
Source§impl Client
impl Client
Sourcepub fn get_transformer(&self) -> GetTransformerFluentBuilder
pub fn get_transformer(&self) -> GetTransformerFluentBuilder
Constructs a fluent builder for the GetTransformer
operation.
- The fluent builder is configurable:
log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: trueSpecify either the name or ARN of the log group to return transformer information for. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
- On success, responds with
GetTransformerOutput
with field(s):log_group_identifier(Option<String>)
:The ARN of the log group that you specified in your request.
creation_time(Option<i64>)
:The creation time of the transformer, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
last_modified_time(Option<i64>)
:The date and time when this transformer was most recently modified, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
transformer_config(Option<Vec::<Processor>>)
:This sructure contains the configuration of the requested transformer.
- On failure, responds with
SdkError<GetTransformerError>
Source§impl Client
impl Client
Sourcepub fn list_anomalies(&self) -> ListAnomaliesFluentBuilder
pub fn list_anomalies(&self) -> ListAnomaliesFluentBuilder
Constructs a fluent builder for the ListAnomalies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)
/set_anomaly_detector_arn(Option<String>)
:
required: falseUse this to optionally limit the results to only the anomalies found by a certain anomaly detector.
suppression_state(SuppressionState)
/set_suppression_state(Option<SuppressionState>)
:
required: falseYou can specify this parameter if you want to the operation to return only anomalies that are currently either suppressed or unsuppressed.
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of items to return. If you don’t specify a value, the default maximum value of 50 items is used.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
- On success, responds with
ListAnomaliesOutput
with field(s):anomalies(Option<Vec::<Anomaly>>)
:An array of structures, where each structure contains information about one anomaly that a log anomaly detector has found.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<ListAnomaliesError>
Source§impl Client
impl Client
Sourcepub fn list_log_anomaly_detectors(&self) -> ListLogAnomalyDetectorsFluentBuilder
pub fn list_log_anomaly_detectors(&self) -> ListLogAnomalyDetectorsFluentBuilder
Constructs a fluent builder for the ListLogAnomalyDetectors
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filter_log_group_arn(impl Into<String>)
/set_filter_log_group_arn(Option<String>)
:
required: falseUse this to optionally filter the results to only include anomaly detectors that are associated with the specified log group.
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of items to return. If you don’t specify a value, the default maximum value of 50 items is used.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
- On success, responds with
ListLogAnomalyDetectorsOutput
with field(s):anomaly_detectors(Option<Vec::<AnomalyDetector>>)
:An array of structures, where each structure in the array contains information about one anomaly detector.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<ListLogAnomalyDetectorsError>
Source§impl Client
impl Client
Sourcepub fn list_log_groups_for_query(&self) -> ListLogGroupsForQueryFluentBuilder
pub fn list_log_groups_for_query(&self) -> ListLogGroupsForQueryFluentBuilder
Constructs a fluent builder for the ListLogGroupsForQuery
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe ID of the query to use. This query ID is from the response to your StartQuery operation.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. The token expires after 24 hours.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLimits the number of returned log groups to the specified number.
- On success, responds with
ListLogGroupsForQueryOutput
with field(s):log_group_identifiers(Option<Vec::<String>>)
:An array of the names and ARNs of the log groups that were processed in the query.
next_token(Option<String>)
:The token for the next set of items to return. The token expires after 24 hours.
- On failure, responds with
SdkError<ListLogGroupsForQueryError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the resource that you want to view tags for.
The ARN format of a log group is
arn:aws:logs:Region:account-id:log-group:log-group-name
The ARN format of a destination is
arn:aws:logs:Region:account-id:destination:destination-name
For more information about ARN format, see CloudWatch Logs resources and operations.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The list of tags associated with the requested resource.>
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
👎Deprecated: Please use the generic tagging API ListTagsForResource
Constructs a fluent builder for the ListTagsLogGroup
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
- On success, responds with
ListTagsLogGroupOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The tags for the log group.
- On failure, responds with
SdkError<ListTagsLogGroupError>
Source§impl Client
impl Client
Sourcepub fn put_account_policy(&self) -> PutAccountPolicyFluentBuilder
pub fn put_account_policy(&self) -> PutAccountPolicyFluentBuilder
Constructs a fluent builder for the PutAccountPolicy
operation.
- The fluent builder is configurable:
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: trueA name for the policy. This must be unique within the account.
policy_document(impl Into<String>)
/set_policy_document(Option<String>)
:
required: trueSpecify the policy, in JSON.
Data protection policy
A data protection policy must include two JSON blocks:
-
The first block must include both a
DataIdentifer
array and anOperation
property with anAudit
action. TheDataIdentifer
array lists the types of sensitive data that you want to mask. For more information about the available options, see Types of data that you can mask.The
Operation
property with anAudit
action is required to find the sensitive data terms. ThisAudit
action must contain aFindingsDestination
object. You can optionally use thatFindingsDestination
object to list one or more destinations to send audit findings to. If you specify destinations such as log groups, Firehose streams, and S3 buckets, they must already exist. -
The second block must include both a
DataIdentifer
array and anOperation
property with anDeidentify
action. TheDataIdentifer
array must exactly match theDataIdentifer
array in the first block of the policy.The
Operation
property with theDeidentify
action is what actually masks the data, and it must contain the“MaskConfig”: {}
object. The“MaskConfig”: {}
object must be empty.
For an example data protection policy, see the Examples section on this page.
The contents of the two
DataIdentifer
arrays must match exactly.In addition to the two JSON blocks, the
policyDocument
can also includeName
,Description
, andVersion
fields. TheName
is different than the operation’spolicyName
parameter, and is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch.The JSON specified in
policyDocument
can be up to 30,720 characters long.Subscription filter policy
A subscription filter policy can include the following attributes in a JSON block:
-
DestinationArn The ARN of the destination to deliver log events to. Supported destinations are:
-
An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.
-
An Firehose data stream in the same account as the subscription policy, for same-account delivery.
-
A Lambda function in the same account as the subscription policy, for same-account delivery.
-
A logical destination in a different account created with PutDestination, for cross-account delivery. Kinesis Data Streams and Firehose are supported as logical destinations.
-
-
RoleArn The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don’t need to provide the ARN when you are working with a logical destination for cross-account delivery.
-
FilterPattern A filter pattern for subscribing to a filtered stream of log events.
-
Distribution The method used to distribute log data to the destination. By default, log data is grouped by log stream, but the grouping can be set to
Random
for a more even distribution. This property is only applicable when the destination is an Kinesis Data Streams data stream.
Transformer policy
A transformer policy must include one JSON block with the array of processors and their configurations. For more information about available processors, see Processors that you can use.
Field index policy
A field index filter policy can include the following attribute in a JSON block:
-
Fields The array of field indexes to create.
It must contain at least one field index.
The following is an example of an index policy document that creates two indexes,
RequestId
andTransactionId
.“policyDocument”: “{ "Fields": [ "RequestId", "TransactionId" ] }”
-
policy_type(PolicyType)
/set_policy_type(Option<PolicyType>)
:
required: trueThe type of policy that you’re creating or updating.
scope(Scope)
/set_scope(Option<Scope>)
:
required: falseCurrently the only valid value for this parameter is
ALL
, which specifies that the data protection policy applies to all log groups in the account. If you omit this parameter, the default ofALL
is used.selection_criteria(impl Into<String>)
/set_selection_criteria(Option<String>)
:
required: falseUse this parameter to apply the new policy to a subset of log groups in the account.
Specifing
selectionCriteria
is valid only when you specifySUBSCRIPTION_FILTER_POLICY
,FIELD_INDEX_POLICY
orTRANSFORMER_POLICY
forpolicyType
.If
policyType
isSUBSCRIPTION_FILTER_POLICY
, the only supportedselectionCriteria
filter isLogGroupName NOT IN []
If
policyType
isFIELD_INDEX_POLICY
orTRANSFORMER_POLICY
, the only supportedselectionCriteria
filter isLogGroupNamePrefix
The
selectionCriteria
string can be up to 25KB in length. The length is determined by using its UTF-8 bytes.Using the
selectionCriteria
parameter withSUBSCRIPTION_FILTER_POLICY
is useful to help prevent infinite loops. For more information, see Log recursion prevention.
- On success, responds with
PutAccountPolicyOutput
with field(s):account_policy(Option<AccountPolicy>)
:The account policy that you created.
- On failure, responds with
SdkError<PutAccountPolicyError>
Source§impl Client
impl Client
Sourcepub fn put_data_protection_policy(&self) -> PutDataProtectionPolicyFluentBuilder
pub fn put_data_protection_policy(&self) -> PutDataProtectionPolicyFluentBuilder
Constructs a fluent builder for the PutDataProtectionPolicy
operation.
- The fluent builder is configurable:
log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: trueSpecify either the log group name or log group ARN.
policy_document(impl Into<String>)
/set_policy_document(Option<String>)
:
required: trueSpecify the data protection policy, in JSON.
This policy must include two JSON blocks:
-
The first block must include both a
DataIdentifer
array and anOperation
property with anAudit
action. TheDataIdentifer
array lists the types of sensitive data that you want to mask. For more information about the available options, see Types of data that you can mask.The
Operation
property with anAudit
action is required to find the sensitive data terms. ThisAudit
action must contain aFindingsDestination
object. You can optionally use thatFindingsDestination
object to list one or more destinations to send audit findings to. If you specify destinations such as log groups, Firehose streams, and S3 buckets, they must already exist. -
The second block must include both a
DataIdentifer
array and anOperation
property with anDeidentify
action. TheDataIdentifer
array must exactly match theDataIdentifer
array in the first block of the policy.The
Operation
property with theDeidentify
action is what actually masks the data, and it must contain the“MaskConfig”: {}
object. The“MaskConfig”: {}
object must be empty.
For an example data protection policy, see the Examples section on this page.
The contents of the two
DataIdentifer
arrays must match exactly.In addition to the two JSON blocks, the
policyDocument
can also includeName
,Description
, andVersion
fields. TheName
is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch.The JSON specified in
policyDocument
can be up to 30,720 characters.-
- On success, responds with
PutDataProtectionPolicyOutput
with field(s):log_group_identifier(Option<String>)
:The log group name or ARN that you specified in your request.
policy_document(Option<String>)
:The data protection policy used for this log group.
last_updated_time(Option<i64>)
:The date and time that this policy was most recently updated.
- On failure, responds with
SdkError<PutDataProtectionPolicyError>
Source§impl Client
impl Client
Sourcepub fn put_delivery_destination(&self) -> PutDeliveryDestinationFluentBuilder
pub fn put_delivery_destination(&self) -> PutDeliveryDestinationFluentBuilder
Constructs a fluent builder for the PutDeliveryDestination
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueA name for this delivery destination. This name must be unique for all delivery destinations in your account.
output_format(OutputFormat)
/set_output_format(Option<OutputFormat>)
:
required: falseThe format for the logs that this delivery destination will receive.
delivery_destination_configuration(DeliveryDestinationConfiguration)
/set_delivery_destination_configuration(Option<DeliveryDestinationConfiguration>)
:
required: trueA structure that contains the ARN of the Amazon Web Services resource that will receive the logs.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseAn optional list of key-value pairs to associate with the resource.
For more information about tagging, see Tagging Amazon Web Services resources
- On success, responds with
PutDeliveryDestinationOutput
with field(s):delivery_destination(Option<DeliveryDestination>)
:A structure containing information about the delivery destination that you just created or updated.
- On failure, responds with
SdkError<PutDeliveryDestinationError>
Source§impl Client
impl Client
Sourcepub fn put_delivery_destination_policy(
&self,
) -> PutDeliveryDestinationPolicyFluentBuilder
pub fn put_delivery_destination_policy( &self, ) -> PutDeliveryDestinationPolicyFluentBuilder
Constructs a fluent builder for the PutDeliveryDestinationPolicy
operation.
- The fluent builder is configurable:
delivery_destination_name(impl Into<String>)
/set_delivery_destination_name(Option<String>)
:
required: trueThe name of the delivery destination to assign this policy to.
delivery_destination_policy(impl Into<String>)
/set_delivery_destination_policy(Option<String>)
:
required: trueThe contents of the policy.
- On success, responds with
PutDeliveryDestinationPolicyOutput
with field(s):policy(Option<Policy>)
:The contents of the policy that you just created.
- On failure, responds with
SdkError<PutDeliveryDestinationPolicyError>
Source§impl Client
impl Client
Sourcepub fn put_delivery_source(&self) -> PutDeliverySourceFluentBuilder
pub fn put_delivery_source(&self) -> PutDeliverySourceFluentBuilder
Constructs a fluent builder for the PutDeliverySource
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueA name for this delivery source. This name must be unique for all delivery sources in your account.
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the Amazon Web Services resource that is generating and sending logs. For example,
arn:aws:workmail:us-east-1:123456789012:organization/m-1234EXAMPLEabcd1234abcd1234abcd1234
log_type(impl Into<String>)
/set_log_type(Option<String>)
:
required: trueDefines the type of log that the source is sending.
-
For Amazon Bedrock, the valid value is
APPLICATION_LOGS
. -
For Amazon CodeWhisperer, the valid value is
EVENT_LOGS
. -
For IAM Identity Center, the valid value is
ERROR_LOGS
. -
For Amazon WorkMail, the valid values are
ACCESS_CONTROL_LOGS
,AUTHENTICATION_LOGS
,WORKMAIL_AVAILABILITY_PROVIDER_LOGS
, andWORKMAIL_MAILBOX_ACCESS_LOGS
.
-
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseAn optional list of key-value pairs to associate with the resource.
For more information about tagging, see Tagging Amazon Web Services resources
- On success, responds with
PutDeliverySourceOutput
with field(s):delivery_source(Option<DeliverySource>)
:A structure containing information about the delivery source that was just created or updated.
- On failure, responds with
SdkError<PutDeliverySourceError>
Source§impl Client
impl Client
Sourcepub fn put_destination(&self) -> PutDestinationFluentBuilder
pub fn put_destination(&self) -> PutDestinationFluentBuilder
Constructs a fluent builder for the PutDestination
operation.
- The fluent builder is configurable:
destination_name(impl Into<String>)
/set_destination_name(Option<String>)
:
required: trueA name for the destination.
target_arn(impl Into<String>)
/set_target_arn(Option<String>)
:
required: trueThe ARN of an Amazon Kinesis stream to which to deliver matching log events.
role_arn(impl Into<String>)
/set_role_arn(Option<String>)
:
required: trueThe ARN of an IAM role that grants CloudWatch Logs permissions to call the Amazon Kinesis
PutRecord
operation on the destination stream.tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseAn optional list of key-value pairs to associate with the resource.
For more information about tagging, see Tagging Amazon Web Services resources
- On success, responds with
PutDestinationOutput
with field(s):destination(Option<Destination>)
:The destination.
- On failure, responds with
SdkError<PutDestinationError>
Source§impl Client
impl Client
Sourcepub fn put_destination_policy(&self) -> PutDestinationPolicyFluentBuilder
pub fn put_destination_policy(&self) -> PutDestinationPolicyFluentBuilder
Constructs a fluent builder for the PutDestinationPolicy
operation.
- The fluent builder is configurable:
destination_name(impl Into<String>)
/set_destination_name(Option<String>)
:
required: trueA name for an existing destination.
access_policy(impl Into<String>)
/set_access_policy(Option<String>)
:
required: trueAn IAM policy document that authorizes cross-account users to deliver their log events to the associated destination. This can be up to 5120 bytes.
force_update(bool)
/set_force_update(Option<bool>)
:
required: falseSpecify true if you are updating an existing destination policy to grant permission to an organization ID instead of granting permission to individual Amazon Web Services accounts. Before you update a destination policy this way, you must first update the subscription filters in the accounts that send logs to this destination. If you do not, the subscription filters might stop working. By specifying
true
forforceUpdate
, you are affirming that you have already updated the subscription filters. For more information, see Updating an existing cross-account subscriptionIf you omit this parameter, the default of
false
is used.
- On success, responds with
PutDestinationPolicyOutput
- On failure, responds with
SdkError<PutDestinationPolicyError>
Source§impl Client
impl Client
Sourcepub fn put_index_policy(&self) -> PutIndexPolicyFluentBuilder
pub fn put_index_policy(&self) -> PutIndexPolicyFluentBuilder
Constructs a fluent builder for the PutIndexPolicy
operation.
- The fluent builder is configurable:
log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: trueSpecify 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:region:account-id:log-group:log_group_name Don’t include an * at the end.
policy_document(impl Into<String>)
/set_policy_document(Option<String>)
:
required: trueThe index policy document, in JSON format. The following is an example of an index policy document that creates two indexes,
RequestId
andTransactionId
.“policyDocument”: “{ “Fields”: [ “RequestId”, “TransactionId” ] }“
The policy document must include at least one field index. For more information about the fields that can be included and other restrictions, see Field index syntax and quotas.
- On success, responds with
PutIndexPolicyOutput
with field(s):index_policy(Option<IndexPolicy>)
:The index policy that you just created or updated.
- On failure, responds with
SdkError<PutIndexPolicyError>
Source§impl Client
impl Client
Sourcepub fn put_log_events(&self) -> PutLogEventsFluentBuilder
pub fn put_log_events(&self) -> PutLogEventsFluentBuilder
Constructs a fluent builder for the PutLogEvents
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
log_stream_name(impl Into<String>)
/set_log_stream_name(Option<String>)
:
required: trueThe name of the log stream.
log_events(InputLogEvent)
/set_log_events(Option<Vec::<InputLogEvent>>)
:
required: trueThe log events.
sequence_token(impl Into<String>)
/set_sequence_token(Option<String>)
:
required: falseThe sequence token obtained from the response of the previous
PutLogEvents
call.The
sequenceToken
parameter is now ignored inPutLogEvents
actions.PutLogEvents
actions are now accepted and never returnInvalidSequenceTokenException
orDataAlreadyAcceptedException
even if the sequence token is not valid.entity(Entity)
/set_entity(Option<Entity>)
:
required: falseThe entity associated with the log events.
- On success, responds with
PutLogEventsOutput
with field(s):next_sequence_token(Option<String>)
:The next sequence token.
This field has been deprecated.
The sequence token is now ignored in
PutLogEvents
actions.PutLogEvents
actions are always accepted even if the sequence token is not valid. You can use parallelPutLogEvents
actions on the same log stream and you do not need to wait for the response of a previousPutLogEvents
action to obtain thenextSequenceToken
value.rejected_log_events_info(Option<RejectedLogEventsInfo>)
:The rejected events.
rejected_entity_info(Option<RejectedEntityInfo>)
:Information about why the entity is rejected when calling
PutLogEvents
. Only returned when the entity is rejected.When the entity is rejected, the events may still be accepted.
- On failure, responds with
SdkError<PutLogEventsError>
Source§impl Client
impl Client
Sourcepub fn put_metric_filter(&self) -> PutMetricFilterFluentBuilder
pub fn put_metric_filter(&self) -> PutMetricFilterFluentBuilder
Constructs a fluent builder for the PutMetricFilter
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
filter_name(impl Into<String>)
/set_filter_name(Option<String>)
:
required: trueA name for the metric filter.
filter_pattern(impl Into<String>)
/set_filter_pattern(Option<String>)
:
required: trueA filter pattern for extracting metric data out of ingested log events.
metric_transformations(MetricTransformation)
/set_metric_transformations(Option<Vec::<MetricTransformation>>)
:
required: trueA collection of information that defines how metric data gets emitted.
apply_on_transformed_logs(bool)
/set_apply_on_transformed_logs(Option<bool>)
:
required: falseThis parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.
If the log group uses either a log-group level or account-level transformer, and you specify
true
, the metric filter will be applied on the transformed version of the log events instead of the original ingested log events.
- On success, responds with
PutMetricFilterOutput
- On failure, responds with
SdkError<PutMetricFilterError>
Source§impl Client
impl Client
Sourcepub fn put_query_definition(&self) -> PutQueryDefinitionFluentBuilder
pub fn put_query_definition(&self) -> PutQueryDefinitionFluentBuilder
Constructs a fluent builder for the PutQueryDefinition
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueA name for the query definition. If you are saving numerous query definitions, we recommend that you name them. This way, you can find the ones you want by using the first part of the name as a filter in the
queryDefinitionNamePrefix
parameter of DescribeQueryDefinitions.query_definition_id(impl Into<String>)
/set_query_definition_id(Option<String>)
:
required: falseIf you are updating a query definition, use this parameter to specify the ID of the query definition that you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.
If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the new query definition and include it in the response to this operation.
log_group_names(impl Into<String>)
/set_log_group_names(Option<Vec::<String>>)
:
required: falseUse this parameter to include specific log groups as part of your query definition.
If you are updating a query definition and you omit this parameter, then the updated definition will contain no log groups.
query_string(impl Into<String>)
/set_query_string(Option<String>)
:
required: trueThe query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUsed as an idempotency token, to avoid returning an exception if the service receives the same request twice because of a network error.
- On success, responds with
PutQueryDefinitionOutput
with field(s):query_definition_id(Option<String>)
:The ID of the query definition.
- On failure, responds with
SdkError<PutQueryDefinitionError>
Source§impl Client
impl Client
Sourcepub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
pub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
Constructs a fluent builder for the PutResourcePolicy
operation.
- The fluent builder is configurable:
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: falseName of the new policy. This parameter is required.
policy_document(impl Into<String>)
/set_policy_document(Option<String>)
:
required: falseDetails of the new policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. This parameter is required.
The following example creates a resource policy enabling the Route 53 service to put DNS query logs in to the specified log group. Replace
“logArn”
with the ARN of your CloudWatch Logs resource, such as a log group or log stream.CloudWatch Logs also supports aws:SourceArn and aws:SourceAccount condition context keys.
In the example resource policy, you would replace the value of
SourceArn
with the resource making the call from Route 53 to CloudWatch Logs. You would also replace the value ofSourceAccount
with the Amazon Web Services account ID making that call.{ “Version”: “2012-10-17”, “Statement”: [ { “Sid”: “Route53LogsToCloudWatchLogs”, “Effect”: “Allow”, “Principal”: { “Service”: [ “route53.amazonaws.com” ] }, “Action”: “logs:PutLogEvents”, “Resource”: “logArn”, “Condition”: { “ArnLike”: { “aws:SourceArn”: “myRoute53ResourceArn” }, “StringEquals”: { “aws:SourceAccount”: “myAwsAccountId” } } } ] }
- On success, responds with
PutResourcePolicyOutput
with field(s):resource_policy(Option<ResourcePolicy>)
:The new policy.
- On failure, responds with
SdkError<PutResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn put_retention_policy(&self) -> PutRetentionPolicyFluentBuilder
pub fn put_retention_policy(&self) -> PutRetentionPolicyFluentBuilder
Constructs a fluent builder for the PutRetentionPolicy
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
retention_in_days(i32)
/set_retention_in_days(Option<i32>)
:
required: trueThe number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288, and 3653.
To set a log group so that its log events do not expire, use DeleteRetentionPolicy.
- On success, responds with
PutRetentionPolicyOutput
- On failure, responds with
SdkError<PutRetentionPolicyError>
Source§impl Client
impl Client
Sourcepub fn put_subscription_filter(&self) -> PutSubscriptionFilterFluentBuilder
pub fn put_subscription_filter(&self) -> PutSubscriptionFilterFluentBuilder
Constructs a fluent builder for the PutSubscriptionFilter
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
filter_name(impl Into<String>)
/set_filter_name(Option<String>)
:
required: trueA name for the subscription filter. If you are updating an existing filter, you must specify the correct name in
filterName
. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters.filter_pattern(impl Into<String>)
/set_filter_pattern(Option<String>)
:
required: trueA filter pattern for subscribing to a filtered stream of log events.
destination_arn(impl Into<String>)
/set_destination_arn(Option<String>)
:
required: trueThe ARN of the destination to deliver matching log events to. Currently, the supported destinations are:
-
An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery.
-
A logical destination (specified using an ARN) belonging to a different account, for cross-account delivery.
If you’re setting up a cross-account subscription, the destination must have an IAM policy associated with it. The IAM policy must allow the sender to send logs to the destination. For more information, see PutDestinationPolicy.
-
A Kinesis Data Firehose delivery stream belonging to the same account as the subscription filter, for same-account delivery.
-
A Lambda function belonging to the same account as the subscription filter, for same-account delivery.
-
role_arn(impl Into<String>)
/set_role_arn(Option<String>)
:
required: falseThe ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don’t need to provide the ARN when you are working with a logical destination for cross-account delivery.
distribution(Distribution)
/set_distribution(Option<Distribution>)
:
required: falseThe method used to distribute log data to the destination. By default, log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis data stream.
apply_on_transformed_logs(bool)
/set_apply_on_transformed_logs(Option<bool>)
:
required: falseThis parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.
If the log group uses either a log-group level or account-level transformer, and you specify
true
, the subscription filter will be applied on the transformed version of the log events instead of the original ingested log events.
- On success, responds with
PutSubscriptionFilterOutput
- On failure, responds with
SdkError<PutSubscriptionFilterError>
Source§impl Client
impl Client
Sourcepub fn put_transformer(&self) -> PutTransformerFluentBuilder
pub fn put_transformer(&self) -> PutTransformerFluentBuilder
Constructs a fluent builder for the PutTransformer
operation.
- The fluent builder is configurable:
log_group_identifier(impl Into<String>)
/set_log_group_identifier(Option<String>)
:
required: trueSpecify either the name or ARN of the log group to create the transformer for.
transformer_config(Processor)
/set_transformer_config(Option<Vec::<Processor>>)
:
required: trueThis structure contains the configuration of this log transformer. A log transformer is an array of processors, where each processor applies one type of transformation to the log events that are ingested.
- On success, responds with
PutTransformerOutput
- On failure, responds with
SdkError<PutTransformerError>
Source§impl Client
impl Client
Sourcepub fn start_query(&self) -> StartQueryFluentBuilder
pub fn start_query(&self) -> StartQueryFluentBuilder
Constructs a fluent builder for the StartQuery
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: falseThe log group on which to perform the query.
log_group_names(impl Into<String>)
/set_log_group_names(Option<Vec::<String>>)
:
required: falseThe list of log groups to be queried. You can include up to 50 log groups.
log_group_identifiers(impl Into<String>)
/set_log_group_identifiers(Option<Vec::<String>>)
:
required: falseThe list of log groups to query. You can include up to 50 log groups.
You can specify them by the log group name or ARN. If a log group that you’re querying is in a source account and you’re using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account.
If you specify an ARN, use the format arn:aws:logs:region:account-id:log-group:log_group_name Don’t include an * at the end.
A
StartQuery
operation must include exactly one of the following parameters:logGroupName
,logGroupNames
, orlogGroupIdentifiers
.start_time(i64)
/set_start_time(Option<i64>)
:
required: trueThe beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since
January 1, 1970, 00:00:00 UTC
.end_time(i64)
/set_end_time(Option<i64>)
:
required: trueThe end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since
January 1, 1970, 00:00:00 UTC
.query_string(impl Into<String>)
/set_query_string(Option<String>)
:
required: trueThe query string to use. For more information, see CloudWatch Logs Insights Query Syntax.
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of log events to return in the query. If the query string uses the
fields
command, only the specified fields and their values are returned. The default is 10,000.
- On success, responds with
StartQueryOutput
with field(s):query_id(Option<String>)
:The unique ID of the query.
- On failure, responds with
SdkError<StartQueryError>
Source§impl Client
impl Client
Sourcepub fn stop_query(&self) -> StopQueryFluentBuilder
pub fn stop_query(&self) -> StopQueryFluentBuilder
Constructs a fluent builder for the StopQuery
operation.
- The fluent builder is configurable:
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe ID number of the query to stop. To find this ID number, use
DescribeQueries
.
- On success, responds with
StopQueryOutput
with field(s):success(bool)
:This is true if the query was stopped by the
StopQuery
operation.
- On failure, responds with
SdkError<StopQueryError>
Source§impl Client
impl Client
Sourcepub fn tag_log_group(&self) -> TagLogGroupFluentBuilder
👎Deprecated: Please use the generic tagging API TagResource
pub fn tag_log_group(&self) -> TagLogGroupFluentBuilder
Constructs a fluent builder for the TagLogGroup
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe key-value pairs to use for the tags.
- On success, responds with
TagLogGroupOutput
- On failure, responds with
SdkError<TagLogGroupError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the resource that you’re adding tags to.
The ARN format of a log group is
arn:aws:logs:Region:account-id:log-group:log-group-name
The ARN format of a destination is
arn:aws:logs:Region:account-id:destination:destination-name
For more information about ARN format, see CloudWatch Logs resources and operations.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe list of key-value pairs to associate with the resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn test_metric_filter(&self) -> TestMetricFilterFluentBuilder
pub fn test_metric_filter(&self) -> TestMetricFilterFluentBuilder
Constructs a fluent builder for the TestMetricFilter
operation.
- The fluent builder is configurable:
filter_pattern(impl Into<String>)
/set_filter_pattern(Option<String>)
:
required: trueA symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.
log_event_messages(impl Into<String>)
/set_log_event_messages(Option<Vec::<String>>)
:
required: trueThe log event messages to test.
- On success, responds with
TestMetricFilterOutput
with field(s):matches(Option<Vec::<MetricFilterMatchRecord>>)
:The matched events.
- On failure, responds with
SdkError<TestMetricFilterError>
Source§impl Client
impl Client
Sourcepub fn test_transformer(&self) -> TestTransformerFluentBuilder
pub fn test_transformer(&self) -> TestTransformerFluentBuilder
Constructs a fluent builder for the TestTransformer
operation.
- The fluent builder is configurable:
transformer_config(Processor)
/set_transformer_config(Option<Vec::<Processor>>)
:
required: trueThis structure contains the configuration of this log transformer that you want to test. A log transformer is an array of processors, where each processor applies one type of transformation to the log events that are ingested.
log_event_messages(impl Into<String>)
/set_log_event_messages(Option<Vec::<String>>)
:
required: trueAn array of the raw log events that you want to use to test this transformer.
- On success, responds with
TestTransformerOutput
with field(s):transformed_logs(Option<Vec::<TransformedLogRecord>>)
:An array where each member of the array includes both the original version and the transformed version of one of the log events that you input.
- On failure, responds with
SdkError<TestTransformerError>
Source§impl Client
impl Client
Sourcepub fn untag_log_group(&self) -> UntagLogGroupFluentBuilder
👎Deprecated: Please use the generic tagging API UntagResource
pub fn untag_log_group(&self) -> UntagLogGroupFluentBuilder
Constructs a fluent builder for the UntagLogGroup
operation.
- The fluent builder is configurable:
log_group_name(impl Into<String>)
/set_log_group_name(Option<String>)
:
required: trueThe name of the log group.
tags(impl Into<String>)
/set_tags(Option<Vec::<String>>)
:
required: trueThe tag keys. The corresponding tags are removed from the log group.
- On success, responds with
UntagLogGroupOutput
- On failure, responds with
SdkError<UntagLogGroupError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the CloudWatch Logs resource that you’re removing tags from.
The ARN format of a log group is
arn:aws:logs:Region:account-id:log-group:log-group-name
The ARN format of a destination is
arn:aws:logs:Region:account-id:destination:destination-name
For more information about ARN format, see CloudWatch Logs resources and operations.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe list of tag keys to remove from the resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_anomaly(&self) -> UpdateAnomalyFluentBuilder
pub fn update_anomaly(&self) -> UpdateAnomalyFluentBuilder
Constructs a fluent builder for the UpdateAnomaly
operation.
- The fluent builder is configurable:
anomaly_id(impl Into<String>)
/set_anomaly_id(Option<String>)
:
required: falseIf you are suppressing or unsuppressing an anomaly, specify its unique ID here. You can find anomaly IDs by using the ListAnomalies operation.
pattern_id(impl Into<String>)
/set_pattern_id(Option<String>)
:
required: falseIf you are suppressing or unsuppressing an pattern, specify its unique ID here. You can find pattern IDs by using the ListAnomalies operation.
anomaly_detector_arn(impl Into<String>)
/set_anomaly_detector_arn(Option<String>)
:
required: trueThe ARN of the anomaly detector that this operation is to act on.
suppression_type(SuppressionType)
/set_suppression_type(Option<SuppressionType>)
:
required: falseUse this to specify whether the suppression to be temporary or infinite. If you specify
LIMITED
, you must also specify asuppressionPeriod
. If you specifyINFINITE
, any value forsuppressionPeriod
is ignored.suppression_period(SuppressionPeriod)
/set_suppression_period(Option<SuppressionPeriod>)
:
required: falseIf you are temporarily suppressing an anomaly or pattern, use this structure to specify how long the suppression is to last.
baseline(bool)
/set_baseline(Option<bool>)
:
required: falseSet this to
true
to prevent CloudWatch Logs from displaying this behavior as an anomaly in the future. The behavior is then treated as baseline behavior. However, if similar but more severe occurrences of this behavior occur in the future, those will still be reported as anomalies.The default is
false
- On success, responds with
UpdateAnomalyOutput
- On failure, responds with
SdkError<UpdateAnomalyError>
Source§impl Client
impl Client
Sourcepub fn update_delivery_configuration(
&self,
) -> UpdateDeliveryConfigurationFluentBuilder
pub fn update_delivery_configuration( &self, ) -> UpdateDeliveryConfigurationFluentBuilder
Constructs a fluent builder for the UpdateDeliveryConfiguration
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe ID of the delivery to be updated by this request.
record_fields(impl Into<String>)
/set_record_fields(Option<Vec::<String>>)
:
required: falseThe list of record fields to be delivered to the destination, in order. If the delivery’s log source has mandatory fields, they must be included in this list.
field_delimiter(impl Into<String>)
/set_field_delimiter(Option<String>)
:
required: falseThe field delimiter to use between record fields when the final output format of a delivery is in
Plain
,W3C
, orRaw
format.s3_delivery_configuration(S3DeliveryConfiguration)
/set_s3_delivery_configuration(Option<S3DeliveryConfiguration>)
:
required: falseThis structure contains parameters that are valid only when the delivery’s delivery destination is an S3 bucket.
- On success, responds with
UpdateDeliveryConfigurationOutput
- On failure, responds with
SdkError<UpdateDeliveryConfigurationError>
Source§impl Client
impl Client
Sourcepub fn update_log_anomaly_detector(
&self,
) -> UpdateLogAnomalyDetectorFluentBuilder
pub fn update_log_anomaly_detector( &self, ) -> UpdateLogAnomalyDetectorFluentBuilder
Constructs a fluent builder for the UpdateLogAnomalyDetector
operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)
/set_anomaly_detector_arn(Option<String>)
:
required: trueThe ARN of the anomaly detector that you want to update.
evaluation_frequency(EvaluationFrequency)
/set_evaluation_frequency(Option<EvaluationFrequency>)
:
required: falseSpecifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then setting
evaluationFrequency
toFIFTEEN_MIN
might be appropriate.filter_pattern(impl Into<String>)
/set_filter_pattern(Option<String>)
:
required: falseA symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.
anomaly_visibility_time(i64)
/set_anomaly_visibility_time(Option<i64>)
:
required: falseThe number of days to use as the life cycle of anomalies. After this time, anomalies are automatically baselined and the anomaly detector model will treat new occurrences of similar event as normal. Therefore, if you do not correct the cause of an anomaly during this time, it will be considered normal going forward and will not be detected.
enabled(bool)
/set_enabled(Option<bool>)
:
required: trueUse this parameter to pause or restart the anomaly detector.
- On success, responds with
UpdateLogAnomalyDetectorOutput
- On failure, responds with
SdkError<UpdateLogAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);