CloudWatchLogsClient#
Index > CloudWatchLogs > CloudWatchLogsClient
Auto-generated documentation for CloudWatchLogs type annotations stubs module mypy-boto3-logs.
CloudWatchLogsClient#
Type annotations and code completion for boto3.client("logs")
.
boto3 documentation
# CloudWatchLogsClient usage example
from boto3.session import Session
from mypy_boto3_logs.client import CloudWatchLogsClient
def get_logs_client() -> CloudWatchLogsClient:
return Session().client("logs")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("logs").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("logs")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.ClientError,
client.exceptions.ConflictException,
client.exceptions.DataAlreadyAcceptedException,
client.exceptions.InvalidOperationException,
client.exceptions.InvalidParameterException,
client.exceptions.InvalidSequenceTokenException,
client.exceptions.LimitExceededException,
client.exceptions.MalformedQueryException,
client.exceptions.OperationAbortedException,
client.exceptions.ResourceAlreadyExistsException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.ServiceUnavailableException,
client.exceptions.SessionStreamingException,
client.exceptions.SessionTimeoutException,
client.exceptions.ThrottlingException,
client.exceptions.TooManyTagsException,
client.exceptions.UnrecognizedClientException,
client.exceptions.ValidationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_logs.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("logs").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("logs").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
associate_kms_key#
Associates the specified KMS key with either one log group in the account, or with all stored CloudWatch Logs query insights results in the account.
Type annotations and code completion for boto3.client("logs").associate_kms_key
method.
boto3 documentation
# associate_kms_key method definition
def associate_kms_key(
self,
*,
kmsKeyId: str,
logGroupName: str = ...,
resourceIdentifier: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# associate_kms_key method usage example with argument unpacking
kwargs: AssociateKmsKeyRequestRequestTypeDef = { # (1)
"kmsKeyId": ...,
}
parent.associate_kms_key(**kwargs)
cancel_export_task#
Cancels the specified export task.
Type annotations and code completion for boto3.client("logs").cancel_export_task
method.
boto3 documentation
# cancel_export_task method definition
def cancel_export_task(
self,
*,
taskId: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# cancel_export_task method usage example with argument unpacking
kwargs: CancelExportTaskRequestRequestTypeDef = { # (1)
"taskId": ...,
}
parent.cancel_export_task(**kwargs)
create_delivery#
Creates a delivery.
Type annotations and code completion for boto3.client("logs").create_delivery
method.
boto3 documentation
# create_delivery method definition
def create_delivery(
self,
*,
deliverySourceName: str,
deliveryDestinationArn: str,
recordFields: Sequence[str] = ...,
fieldDelimiter: str = ...,
s3DeliveryConfiguration: S3DeliveryConfigurationTypeDef = ..., # (1)
tags: Mapping[str, str] = ...,
) -> CreateDeliveryResponseTypeDef: # (2)
...
# create_delivery method usage example with argument unpacking
kwargs: CreateDeliveryRequestRequestTypeDef = { # (1)
"deliverySourceName": ...,
"deliveryDestinationArn": ...,
}
parent.create_delivery(**kwargs)
create_export_task#
Creates an export task so that you can efficiently export data from a log group to an Amazon S3 bucket.
Type annotations and code completion for boto3.client("logs").create_export_task
method.
boto3 documentation
# create_export_task method definition
def create_export_task(
self,
*,
logGroupName: str,
fromTime: int,
to: int,
destination: str,
taskName: str = ...,
logStreamNamePrefix: str = ...,
destinationPrefix: str = ...,
) -> CreateExportTaskResponseTypeDef: # (1)
...
# create_export_task method usage example with argument unpacking
kwargs: CreateExportTaskRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"fromTime": ...,
"to": ...,
"destination": ...,
}
parent.create_export_task(**kwargs)
create_log_anomaly_detector#
Creates an anomaly detector that regularly scans one or more log groups and look for patterns and anomalies in the logs.
Type annotations and code completion for boto3.client("logs").create_log_anomaly_detector
method.
boto3 documentation
# create_log_anomaly_detector method definition
def create_log_anomaly_detector(
self,
*,
logGroupArnList: Sequence[str],
detectorName: str = ...,
evaluationFrequency: EvaluationFrequencyType = ..., # (1)
filterPattern: str = ...,
kmsKeyId: str = ...,
anomalyVisibilityTime: int = ...,
tags: Mapping[str, str] = ...,
) -> CreateLogAnomalyDetectorResponseTypeDef: # (2)
...
# create_log_anomaly_detector method usage example with argument unpacking
kwargs: CreateLogAnomalyDetectorRequestRequestTypeDef = { # (1)
"logGroupArnList": ...,
}
parent.create_log_anomaly_detector(**kwargs)
create_log_group#
Creates a log group with the specified name.
Type annotations and code completion for boto3.client("logs").create_log_group
method.
boto3 documentation
# create_log_group method definition
def create_log_group(
self,
*,
logGroupName: str,
kmsKeyId: str = ...,
tags: Mapping[str, str] = ...,
logGroupClass: LogGroupClassType = ..., # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
# create_log_group method usage example with argument unpacking
kwargs: CreateLogGroupRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.create_log_group(**kwargs)
create_log_stream#
Creates a log stream for the specified log group.
Type annotations and code completion for boto3.client("logs").create_log_stream
method.
boto3 documentation
# create_log_stream method definition
def create_log_stream(
self,
*,
logGroupName: str,
logStreamName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# create_log_stream method usage example with argument unpacking
kwargs: CreateLogStreamRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"logStreamName": ...,
}
parent.create_log_stream(**kwargs)
delete_account_policy#
Deletes a CloudWatch Logs account policy.
Type annotations and code completion for boto3.client("logs").delete_account_policy
method.
boto3 documentation
# delete_account_policy method definition
def delete_account_policy(
self,
*,
policyName: str,
policyType: PolicyTypeType, # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
# delete_account_policy method usage example with argument unpacking
kwargs: DeleteAccountPolicyRequestRequestTypeDef = { # (1)
"policyName": ...,
"policyType": ...,
}
parent.delete_account_policy(**kwargs)
delete_data_protection_policy#
Deletes the data protection policy from the specified log group.
Type annotations and code completion for boto3.client("logs").delete_data_protection_policy
method.
boto3 documentation
# delete_data_protection_policy method definition
def delete_data_protection_policy(
self,
*,
logGroupIdentifier: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_data_protection_policy method usage example with argument unpacking
kwargs: DeleteDataProtectionPolicyRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
}
parent.delete_data_protection_policy(**kwargs)
delete_delivery#
Deletes s delivery.
Type annotations and code completion for boto3.client("logs").delete_delivery
method.
boto3 documentation
# delete_delivery method definition
def delete_delivery(
self,
*,
id: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_delivery method usage example with argument unpacking
kwargs: DeleteDeliveryRequestRequestTypeDef = { # (1)
"id": ...,
}
parent.delete_delivery(**kwargs)
delete_delivery_destination#
Deletes a delivery destination.
Type annotations and code completion for boto3.client("logs").delete_delivery_destination
method.
boto3 documentation
# delete_delivery_destination method definition
def delete_delivery_destination(
self,
*,
name: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_delivery_destination method usage example with argument unpacking
kwargs: DeleteDeliveryDestinationRequestRequestTypeDef = { # (1)
"name": ...,
}
parent.delete_delivery_destination(**kwargs)
delete_delivery_destination_policy#
Deletes a delivery destination policy.
Type annotations and code completion for boto3.client("logs").delete_delivery_destination_policy
method.
boto3 documentation
# delete_delivery_destination_policy method definition
def delete_delivery_destination_policy(
self,
*,
deliveryDestinationName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_delivery_destination_policy method usage example with argument unpacking
kwargs: DeleteDeliveryDestinationPolicyRequestRequestTypeDef = { # (1)
"deliveryDestinationName": ...,
}
parent.delete_delivery_destination_policy(**kwargs)
delete_delivery_source#
Deletes a delivery source.
Type annotations and code completion for boto3.client("logs").delete_delivery_source
method.
boto3 documentation
# delete_delivery_source method definition
def delete_delivery_source(
self,
*,
name: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_delivery_source method usage example with argument unpacking
kwargs: DeleteDeliverySourceRequestRequestTypeDef = { # (1)
"name": ...,
}
parent.delete_delivery_source(**kwargs)
delete_destination#
Deletes the specified destination, and eventually disables all the subscription filters that publish to it.
Type annotations and code completion for boto3.client("logs").delete_destination
method.
boto3 documentation
# delete_destination method definition
def delete_destination(
self,
*,
destinationName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_destination method usage example with argument unpacking
kwargs: DeleteDestinationRequestRequestTypeDef = { # (1)
"destinationName": ...,
}
parent.delete_destination(**kwargs)
delete_index_policy#
Deletes a log-group level field index policy that was applied to a single log group.
Type annotations and code completion for boto3.client("logs").delete_index_policy
method.
boto3 documentation
# delete_index_policy method definition
def delete_index_policy(
self,
*,
logGroupIdentifier: str,
) -> dict[str, Any]:
...
# delete_index_policy method usage example with argument unpacking
kwargs: DeleteIndexPolicyRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
}
parent.delete_index_policy(**kwargs)
delete_integration#
Deletes the integration between CloudWatch Logs and OpenSearch Service.
Type annotations and code completion for boto3.client("logs").delete_integration
method.
boto3 documentation
# delete_integration method definition
def delete_integration(
self,
*,
integrationName: str,
force: bool = ...,
) -> dict[str, Any]:
...
# delete_integration method usage example with argument unpacking
kwargs: DeleteIntegrationRequestRequestTypeDef = { # (1)
"integrationName": ...,
}
parent.delete_integration(**kwargs)
delete_log_anomaly_detector#
Deletes the specified CloudWatch Logs anomaly detector.
Type annotations and code completion for boto3.client("logs").delete_log_anomaly_detector
method.
boto3 documentation
# delete_log_anomaly_detector method definition
def delete_log_anomaly_detector(
self,
*,
anomalyDetectorArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_log_anomaly_detector method usage example with argument unpacking
kwargs: DeleteLogAnomalyDetectorRequestRequestTypeDef = { # (1)
"anomalyDetectorArn": ...,
}
parent.delete_log_anomaly_detector(**kwargs)
delete_log_group#
Deletes the specified log group and permanently deletes all the archived log events associated with the log group.
Type annotations and code completion for boto3.client("logs").delete_log_group
method.
boto3 documentation
# delete_log_group method definition
def delete_log_group(
self,
*,
logGroupName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_log_group method usage example with argument unpacking
kwargs: DeleteLogGroupRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.delete_log_group(**kwargs)
delete_log_stream#
Deletes the specified log stream and permanently deletes all the archived log events associated with the log stream.
Type annotations and code completion for boto3.client("logs").delete_log_stream
method.
boto3 documentation
# delete_log_stream method definition
def delete_log_stream(
self,
*,
logGroupName: str,
logStreamName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_log_stream method usage example with argument unpacking
kwargs: DeleteLogStreamRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"logStreamName": ...,
}
parent.delete_log_stream(**kwargs)
delete_metric_filter#
Deletes the specified metric filter.
Type annotations and code completion for boto3.client("logs").delete_metric_filter
method.
boto3 documentation
# delete_metric_filter method definition
def delete_metric_filter(
self,
*,
logGroupName: str,
filterName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_metric_filter method usage example with argument unpacking
kwargs: DeleteMetricFilterRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"filterName": ...,
}
parent.delete_metric_filter(**kwargs)
delete_query_definition#
Deletes a saved CloudWatch Logs Insights query definition.
Type annotations and code completion for boto3.client("logs").delete_query_definition
method.
boto3 documentation
# delete_query_definition method definition
def delete_query_definition(
self,
*,
queryDefinitionId: str,
) -> DeleteQueryDefinitionResponseTypeDef: # (1)
...
# delete_query_definition method usage example with argument unpacking
kwargs: DeleteQueryDefinitionRequestRequestTypeDef = { # (1)
"queryDefinitionId": ...,
}
parent.delete_query_definition(**kwargs)
delete_resource_policy#
Deletes a resource policy from this account.
Type annotations and code completion for boto3.client("logs").delete_resource_policy
method.
boto3 documentation
# delete_resource_policy method definition
def delete_resource_policy(
self,
*,
policyName: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_resource_policy method usage example with argument unpacking
kwargs: DeleteResourcePolicyRequestRequestTypeDef = { # (1)
"policyName": ...,
}
parent.delete_resource_policy(**kwargs)
delete_retention_policy#
Deletes the specified retention policy.
Type annotations and code completion for boto3.client("logs").delete_retention_policy
method.
boto3 documentation
# delete_retention_policy method definition
def delete_retention_policy(
self,
*,
logGroupName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_retention_policy method usage example with argument unpacking
kwargs: DeleteRetentionPolicyRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.delete_retention_policy(**kwargs)
delete_subscription_filter#
Deletes the specified subscription filter.
Type annotations and code completion for boto3.client("logs").delete_subscription_filter
method.
boto3 documentation
# delete_subscription_filter method definition
def delete_subscription_filter(
self,
*,
logGroupName: str,
filterName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_subscription_filter method usage example with argument unpacking
kwargs: DeleteSubscriptionFilterRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"filterName": ...,
}
parent.delete_subscription_filter(**kwargs)
delete_transformer#
Deletes the log transformer for the specified log group.
Type annotations and code completion for boto3.client("logs").delete_transformer
method.
boto3 documentation
# delete_transformer method definition
def delete_transformer(
self,
*,
logGroupIdentifier: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_transformer method usage example with argument unpacking
kwargs: DeleteTransformerRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
}
parent.delete_transformer(**kwargs)
describe_account_policies#
Returns a list of all CloudWatch Logs account policies in the account.
Type annotations and code completion for boto3.client("logs").describe_account_policies
method.
boto3 documentation
# describe_account_policies method definition
def describe_account_policies(
self,
*,
policyType: PolicyTypeType, # (1)
policyName: str = ...,
accountIdentifiers: Sequence[str] = ...,
nextToken: str = ...,
) -> DescribeAccountPoliciesResponseTypeDef: # (2)
...
# describe_account_policies method usage example with argument unpacking
kwargs: DescribeAccountPoliciesRequestRequestTypeDef = { # (1)
"policyType": ...,
}
parent.describe_account_policies(**kwargs)
describe_configuration_templates#
Use this operation to return the valid and default values that are used when creating delivery sources, delivery destinations, and deliveries.
Type annotations and code completion for boto3.client("logs").describe_configuration_templates
method.
boto3 documentation
# describe_configuration_templates method definition
def describe_configuration_templates(
self,
*,
service: str = ...,
logTypes: Sequence[str] = ...,
resourceTypes: Sequence[str] = ...,
deliveryDestinationTypes: Sequence[DeliveryDestinationTypeType] = ..., # (1)
nextToken: str = ...,
limit: int = ...,
) -> DescribeConfigurationTemplatesResponseTypeDef: # (2)
...
# describe_configuration_templates method usage example with argument unpacking
kwargs: DescribeConfigurationTemplatesRequestRequestTypeDef = { # (1)
"service": ...,
}
parent.describe_configuration_templates(**kwargs)
describe_deliveries#
Retrieves a list of the deliveries that have been created in the account.
Type annotations and code completion for boto3.client("logs").describe_deliveries
method.
boto3 documentation
# describe_deliveries method definition
def describe_deliveries(
self,
*,
nextToken: str = ...,
limit: int = ...,
) -> DescribeDeliveriesResponseTypeDef: # (1)
...
# describe_deliveries method usage example with argument unpacking
kwargs: DescribeDeliveriesRequestRequestTypeDef = { # (1)
"nextToken": ...,
}
parent.describe_deliveries(**kwargs)
describe_delivery_destinations#
Retrieves a list of the delivery destinations that have been created in the account.
Type annotations and code completion for boto3.client("logs").describe_delivery_destinations
method.
boto3 documentation
# describe_delivery_destinations method definition
def describe_delivery_destinations(
self,
*,
nextToken: str = ...,
limit: int = ...,
) -> DescribeDeliveryDestinationsResponseTypeDef: # (1)
...
# describe_delivery_destinations method usage example with argument unpacking
kwargs: DescribeDeliveryDestinationsRequestRequestTypeDef = { # (1)
"nextToken": ...,
}
parent.describe_delivery_destinations(**kwargs)
describe_delivery_sources#
Retrieves a list of the delivery sources that have been created in the account.
Type annotations and code completion for boto3.client("logs").describe_delivery_sources
method.
boto3 documentation
# describe_delivery_sources method definition
def describe_delivery_sources(
self,
*,
nextToken: str = ...,
limit: int = ...,
) -> DescribeDeliverySourcesResponseTypeDef: # (1)
...
# describe_delivery_sources method usage example with argument unpacking
kwargs: DescribeDeliverySourcesRequestRequestTypeDef = { # (1)
"nextToken": ...,
}
parent.describe_delivery_sources(**kwargs)
describe_destinations#
Lists all your destinations.
Type annotations and code completion for boto3.client("logs").describe_destinations
method.
boto3 documentation
# describe_destinations method definition
def describe_destinations(
self,
*,
DestinationNamePrefix: str = ...,
nextToken: str = ...,
limit: int = ...,
) -> DescribeDestinationsResponseTypeDef: # (1)
...
# describe_destinations method usage example with argument unpacking
kwargs: DescribeDestinationsRequestRequestTypeDef = { # (1)
"DestinationNamePrefix": ...,
}
parent.describe_destinations(**kwargs)
describe_export_tasks#
Lists the specified export tasks.
Type annotations and code completion for boto3.client("logs").describe_export_tasks
method.
boto3 documentation
# describe_export_tasks method definition
def describe_export_tasks(
self,
*,
taskId: str = ...,
statusCode: ExportTaskStatusCodeType = ..., # (1)
nextToken: str = ...,
limit: int = ...,
) -> DescribeExportTasksResponseTypeDef: # (2)
...
# describe_export_tasks method usage example with argument unpacking
kwargs: DescribeExportTasksRequestRequestTypeDef = { # (1)
"taskId": ...,
}
parent.describe_export_tasks(**kwargs)
describe_field_indexes#
Returns a list of field indexes listed in the field index policies of one or more log groups.
Type annotations and code completion for boto3.client("logs").describe_field_indexes
method.
boto3 documentation
# describe_field_indexes method definition
def describe_field_indexes(
self,
*,
logGroupIdentifiers: Sequence[str],
nextToken: str = ...,
) -> DescribeFieldIndexesResponseTypeDef: # (1)
...
# describe_field_indexes method usage example with argument unpacking
kwargs: DescribeFieldIndexesRequestRequestTypeDef = { # (1)
"logGroupIdentifiers": ...,
}
parent.describe_field_indexes(**kwargs)
describe_index_policies#
Returns the field index policies of one or more log groups.
Type annotations and code completion for boto3.client("logs").describe_index_policies
method.
boto3 documentation
# describe_index_policies method definition
def describe_index_policies(
self,
*,
logGroupIdentifiers: Sequence[str],
nextToken: str = ...,
) -> DescribeIndexPoliciesResponseTypeDef: # (1)
...
# describe_index_policies method usage example with argument unpacking
kwargs: DescribeIndexPoliciesRequestRequestTypeDef = { # (1)
"logGroupIdentifiers": ...,
}
parent.describe_index_policies(**kwargs)
describe_log_groups#
Lists the specified log groups.
Type annotations and code completion for boto3.client("logs").describe_log_groups
method.
boto3 documentation
# describe_log_groups method definition
def describe_log_groups(
self,
*,
accountIdentifiers: Sequence[str] = ...,
logGroupNamePrefix: str = ...,
logGroupNamePattern: str = ...,
nextToken: str = ...,
limit: int = ...,
includeLinkedAccounts: bool = ...,
logGroupClass: LogGroupClassType = ..., # (1)
) -> DescribeLogGroupsResponseTypeDef: # (2)
...
# describe_log_groups method usage example with argument unpacking
kwargs: DescribeLogGroupsRequestRequestTypeDef = { # (1)
"accountIdentifiers": ...,
}
parent.describe_log_groups(**kwargs)
describe_log_streams#
Lists the log streams for the specified log group.
Type annotations and code completion for boto3.client("logs").describe_log_streams
method.
boto3 documentation
# describe_log_streams method definition
def describe_log_streams(
self,
*,
logGroupName: str = ...,
logGroupIdentifier: str = ...,
logStreamNamePrefix: str = ...,
orderBy: OrderByType = ..., # (1)
descending: bool = ...,
nextToken: str = ...,
limit: int = ...,
) -> DescribeLogStreamsResponseTypeDef: # (2)
...
# describe_log_streams method usage example with argument unpacking
kwargs: DescribeLogStreamsRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.describe_log_streams(**kwargs)
describe_metric_filters#
Lists the specified metric filters.
Type annotations and code completion for boto3.client("logs").describe_metric_filters
method.
boto3 documentation
# describe_metric_filters method definition
def describe_metric_filters(
self,
*,
logGroupName: str = ...,
filterNamePrefix: str = ...,
nextToken: str = ...,
limit: int = ...,
metricName: str = ...,
metricNamespace: str = ...,
) -> DescribeMetricFiltersResponseTypeDef: # (1)
...
# describe_metric_filters method usage example with argument unpacking
kwargs: DescribeMetricFiltersRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.describe_metric_filters(**kwargs)
describe_queries#
Returns a list of CloudWatch Logs Insights queries that are scheduled, running, or have been run recently in this account.
Type annotations and code completion for boto3.client("logs").describe_queries
method.
boto3 documentation
# describe_queries method definition
def describe_queries(
self,
*,
logGroupName: str = ...,
status: QueryStatusType = ..., # (1)
maxResults: int = ...,
nextToken: str = ...,
queryLanguage: QueryLanguageType = ..., # (2)
) -> DescribeQueriesResponseTypeDef: # (3)
...
# describe_queries method usage example with argument unpacking
kwargs: DescribeQueriesRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.describe_queries(**kwargs)
describe_query_definitions#
This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions.
Type annotations and code completion for boto3.client("logs").describe_query_definitions
method.
boto3 documentation
# describe_query_definitions method definition
def describe_query_definitions(
self,
*,
queryLanguage: QueryLanguageType = ..., # (1)
queryDefinitionNamePrefix: str = ...,
maxResults: int = ...,
nextToken: str = ...,
) -> DescribeQueryDefinitionsResponseTypeDef: # (2)
...
# describe_query_definitions method usage example with argument unpacking
kwargs: DescribeQueryDefinitionsRequestRequestTypeDef = { # (1)
"queryLanguage": ...,
}
parent.describe_query_definitions(**kwargs)
describe_resource_policies#
Lists the resource policies in this account.
Type annotations and code completion for boto3.client("logs").describe_resource_policies
method.
boto3 documentation
# describe_resource_policies method definition
def describe_resource_policies(
self,
*,
nextToken: str = ...,
limit: int = ...,
) -> DescribeResourcePoliciesResponseTypeDef: # (1)
...
# describe_resource_policies method usage example with argument unpacking
kwargs: DescribeResourcePoliciesRequestRequestTypeDef = { # (1)
"nextToken": ...,
}
parent.describe_resource_policies(**kwargs)
describe_subscription_filters#
Lists the subscription filters for the specified log group.
Type annotations and code completion for boto3.client("logs").describe_subscription_filters
method.
boto3 documentation
# describe_subscription_filters method definition
def describe_subscription_filters(
self,
*,
logGroupName: str,
filterNamePrefix: str = ...,
nextToken: str = ...,
limit: int = ...,
) -> DescribeSubscriptionFiltersResponseTypeDef: # (1)
...
# describe_subscription_filters method usage example with argument unpacking
kwargs: DescribeSubscriptionFiltersRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.describe_subscription_filters(**kwargs)
disassociate_kms_key#
Disassociates the specified KMS key from the specified log group or from all CloudWatch Logs Insights query results in the account.
Type annotations and code completion for boto3.client("logs").disassociate_kms_key
method.
boto3 documentation
# disassociate_kms_key method definition
def disassociate_kms_key(
self,
*,
logGroupName: str = ...,
resourceIdentifier: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# disassociate_kms_key method usage example with argument unpacking
kwargs: DisassociateKmsKeyRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.disassociate_kms_key(**kwargs)
filter_log_events#
Lists log events from the specified log group.
Type annotations and code completion for boto3.client("logs").filter_log_events
method.
boto3 documentation
# filter_log_events method definition
def filter_log_events(
self,
*,
logGroupName: str = ...,
logGroupIdentifier: str = ...,
logStreamNames: Sequence[str] = ...,
logStreamNamePrefix: str = ...,
startTime: int = ...,
endTime: int = ...,
filterPattern: str = ...,
nextToken: str = ...,
limit: int = ...,
interleaved: bool = ...,
unmask: bool = ...,
) -> FilterLogEventsResponseTypeDef: # (1)
...
# filter_log_events method usage example with argument unpacking
kwargs: FilterLogEventsRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.filter_log_events(**kwargs)
get_data_protection_policy#
Returns information about a log group data protection policy.
Type annotations and code completion for boto3.client("logs").get_data_protection_policy
method.
boto3 documentation
# get_data_protection_policy method definition
def get_data_protection_policy(
self,
*,
logGroupIdentifier: str,
) -> GetDataProtectionPolicyResponseTypeDef: # (1)
...
# get_data_protection_policy method usage example with argument unpacking
kwargs: GetDataProtectionPolicyRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
}
parent.get_data_protection_policy(**kwargs)
get_delivery#
Returns complete information about one logical delivery.
Type annotations and code completion for boto3.client("logs").get_delivery
method.
boto3 documentation
# get_delivery method definition
def get_delivery(
self,
*,
id: str,
) -> GetDeliveryResponseTypeDef: # (1)
...
# get_delivery method usage example with argument unpacking
kwargs: GetDeliveryRequestRequestTypeDef = { # (1)
"id": ...,
}
parent.get_delivery(**kwargs)
get_delivery_destination#
Retrieves complete information about one delivery destination.
Type annotations and code completion for boto3.client("logs").get_delivery_destination
method.
boto3 documentation
# get_delivery_destination method definition
def get_delivery_destination(
self,
*,
name: str,
) -> GetDeliveryDestinationResponseTypeDef: # (1)
...
# get_delivery_destination method usage example with argument unpacking
kwargs: GetDeliveryDestinationRequestRequestTypeDef = { # (1)
"name": ...,
}
parent.get_delivery_destination(**kwargs)
get_delivery_destination_policy#
Retrieves the delivery destination policy assigned to the delivery destination that you specify.
Type annotations and code completion for boto3.client("logs").get_delivery_destination_policy
method.
boto3 documentation
# get_delivery_destination_policy method definition
def get_delivery_destination_policy(
self,
*,
deliveryDestinationName: str,
) -> GetDeliveryDestinationPolicyResponseTypeDef: # (1)
...
# get_delivery_destination_policy method usage example with argument unpacking
kwargs: GetDeliveryDestinationPolicyRequestRequestTypeDef = { # (1)
"deliveryDestinationName": ...,
}
parent.get_delivery_destination_policy(**kwargs)
get_delivery_source#
Retrieves complete information about one delivery source.
Type annotations and code completion for boto3.client("logs").get_delivery_source
method.
boto3 documentation
# get_delivery_source method definition
def get_delivery_source(
self,
*,
name: str,
) -> GetDeliverySourceResponseTypeDef: # (1)
...
# get_delivery_source method usage example with argument unpacking
kwargs: GetDeliverySourceRequestRequestTypeDef = { # (1)
"name": ...,
}
parent.get_delivery_source(**kwargs)
get_integration#
Returns information about one integration between CloudWatch Logs and OpenSearch Service.
Type annotations and code completion for boto3.client("logs").get_integration
method.
boto3 documentation
# get_integration method definition
def get_integration(
self,
*,
integrationName: str,
) -> GetIntegrationResponseTypeDef: # (1)
...
# get_integration method usage example with argument unpacking
kwargs: GetIntegrationRequestRequestTypeDef = { # (1)
"integrationName": ...,
}
parent.get_integration(**kwargs)
get_log_anomaly_detector#
Retrieves information about the log anomaly detector that you specify.
Type annotations and code completion for boto3.client("logs").get_log_anomaly_detector
method.
boto3 documentation
# get_log_anomaly_detector method definition
def get_log_anomaly_detector(
self,
*,
anomalyDetectorArn: str,
) -> GetLogAnomalyDetectorResponseTypeDef: # (1)
...
# get_log_anomaly_detector method usage example with argument unpacking
kwargs: GetLogAnomalyDetectorRequestRequestTypeDef = { # (1)
"anomalyDetectorArn": ...,
}
parent.get_log_anomaly_detector(**kwargs)
get_log_events#
Lists log events from the specified log stream.
Type annotations and code completion for boto3.client("logs").get_log_events
method.
boto3 documentation
# get_log_events method definition
def get_log_events(
self,
*,
logStreamName: str,
logGroupName: str = ...,
logGroupIdentifier: str = ...,
startTime: int = ...,
endTime: int = ...,
nextToken: str = ...,
limit: int = ...,
startFromHead: bool = ...,
unmask: bool = ...,
) -> GetLogEventsResponseTypeDef: # (1)
...
# get_log_events method usage example with argument unpacking
kwargs: GetLogEventsRequestRequestTypeDef = { # (1)
"logStreamName": ...,
}
parent.get_log_events(**kwargs)
get_log_group_fields#
Returns a list of the fields that are included in log events in the specified log group.
Type annotations and code completion for boto3.client("logs").get_log_group_fields
method.
boto3 documentation
# get_log_group_fields method definition
def get_log_group_fields(
self,
*,
logGroupName: str = ...,
time: int = ...,
logGroupIdentifier: str = ...,
) -> GetLogGroupFieldsResponseTypeDef: # (1)
...
# get_log_group_fields method usage example with argument unpacking
kwargs: GetLogGroupFieldsRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.get_log_group_fields(**kwargs)
get_log_record#
Retrieves all of the fields and values of a single log event.
Type annotations and code completion for boto3.client("logs").get_log_record
method.
boto3 documentation
# get_log_record method definition
def get_log_record(
self,
*,
logRecordPointer: str,
unmask: bool = ...,
) -> GetLogRecordResponseTypeDef: # (1)
...
# get_log_record method usage example with argument unpacking
kwargs: GetLogRecordRequestRequestTypeDef = { # (1)
"logRecordPointer": ...,
}
parent.get_log_record(**kwargs)
get_query_results#
Returns the results from the specified query.
Type annotations and code completion for boto3.client("logs").get_query_results
method.
boto3 documentation
# get_query_results method definition
def get_query_results(
self,
*,
queryId: str,
) -> GetQueryResultsResponseTypeDef: # (1)
...
# get_query_results method usage example with argument unpacking
kwargs: GetQueryResultsRequestRequestTypeDef = { # (1)
"queryId": ...,
}
parent.get_query_results(**kwargs)
get_transformer#
Returns the information about the log transformer associated with this log group.
Type annotations and code completion for boto3.client("logs").get_transformer
method.
boto3 documentation
# get_transformer method definition
def get_transformer(
self,
*,
logGroupIdentifier: str,
) -> GetTransformerResponseTypeDef: # (1)
...
# get_transformer method usage example with argument unpacking
kwargs: GetTransformerRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
}
parent.get_transformer(**kwargs)
list_anomalies#
Returns a list of anomalies that log anomaly detectors have found.
Type annotations and code completion for boto3.client("logs").list_anomalies
method.
boto3 documentation
# list_anomalies method definition
def list_anomalies(
self,
*,
anomalyDetectorArn: str = ...,
suppressionState: SuppressionStateType = ..., # (1)
limit: int = ...,
nextToken: str = ...,
) -> ListAnomaliesResponseTypeDef: # (2)
...
# list_anomalies method usage example with argument unpacking
kwargs: ListAnomaliesRequestRequestTypeDef = { # (1)
"anomalyDetectorArn": ...,
}
parent.list_anomalies(**kwargs)
list_integrations#
Returns a list of integrations between CloudWatch Logs and other services in this account.
Type annotations and code completion for boto3.client("logs").list_integrations
method.
boto3 documentation
# list_integrations method definition
def list_integrations(
self,
*,
integrationNamePrefix: str = ...,
integrationType: IntegrationTypeType = ..., # (1)
integrationStatus: IntegrationStatusType = ..., # (2)
) -> ListIntegrationsResponseTypeDef: # (3)
...
# list_integrations method usage example with argument unpacking
kwargs: ListIntegrationsRequestRequestTypeDef = { # (1)
"integrationNamePrefix": ...,
}
parent.list_integrations(**kwargs)
list_log_anomaly_detectors#
Retrieves a list of the log anomaly detectors in the account.
Type annotations and code completion for boto3.client("logs").list_log_anomaly_detectors
method.
boto3 documentation
# list_log_anomaly_detectors method definition
def list_log_anomaly_detectors(
self,
*,
filterLogGroupArn: str = ...,
limit: int = ...,
nextToken: str = ...,
) -> ListLogAnomalyDetectorsResponseTypeDef: # (1)
...
# list_log_anomaly_detectors method usage example with argument unpacking
kwargs: ListLogAnomalyDetectorsRequestRequestTypeDef = { # (1)
"filterLogGroupArn": ...,
}
parent.list_log_anomaly_detectors(**kwargs)
list_log_groups_for_query#
Returns a list of the log groups that were analyzed during a single CloudWatch Logs Insights query.
Type annotations and code completion for boto3.client("logs").list_log_groups_for_query
method.
boto3 documentation
# list_log_groups_for_query method definition
def list_log_groups_for_query(
self,
*,
queryId: str,
nextToken: str = ...,
maxResults: int = ...,
) -> ListLogGroupsForQueryResponseTypeDef: # (1)
...
# list_log_groups_for_query method usage example with argument unpacking
kwargs: ListLogGroupsForQueryRequestRequestTypeDef = { # (1)
"queryId": ...,
}
parent.list_log_groups_for_query(**kwargs)
list_tags_for_resource#
Displays the tags associated with a CloudWatch Logs resource.
Type annotations and code completion for boto3.client("logs").list_tags_for_resource
method.
boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
self,
*,
resourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
list_tags_log_group#
The ListTagsLogGroup operation is on the path to deprecation.
Type annotations and code completion for boto3.client("logs").list_tags_log_group
method.
boto3 documentation
# list_tags_log_group method definition
def list_tags_log_group(
self,
*,
logGroupName: str,
) -> ListTagsLogGroupResponseTypeDef: # (1)
...
# list_tags_log_group method usage example with argument unpacking
kwargs: ListTagsLogGroupRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.list_tags_log_group(**kwargs)
put_account_policy#
Creates an account-level data protection policy, subscription filter policy, or field index policy that applies to all log groups or a subset of log groups in the account.
Type annotations and code completion for boto3.client("logs").put_account_policy
method.
boto3 documentation
# put_account_policy method definition
def put_account_policy(
self,
*,
policyName: str,
policyDocument: str,
policyType: PolicyTypeType, # (1)
scope: ScopeType = ..., # (2)
selectionCriteria: str = ...,
) -> PutAccountPolicyResponseTypeDef: # (3)
...
- See PolicyTypeType
- See ScopeType
- See PutAccountPolicyResponseTypeDef
# put_account_policy method usage example with argument unpacking
kwargs: PutAccountPolicyRequestRequestTypeDef = { # (1)
"policyName": ...,
"policyDocument": ...,
"policyType": ...,
}
parent.put_account_policy(**kwargs)
put_data_protection_policy#
Creates a data protection policy for the specified log group.
Type annotations and code completion for boto3.client("logs").put_data_protection_policy
method.
boto3 documentation
# put_data_protection_policy method definition
def put_data_protection_policy(
self,
*,
logGroupIdentifier: str,
policyDocument: str,
) -> PutDataProtectionPolicyResponseTypeDef: # (1)
...
# put_data_protection_policy method usage example with argument unpacking
kwargs: PutDataProtectionPolicyRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
"policyDocument": ...,
}
parent.put_data_protection_policy(**kwargs)
put_delivery_destination#
Creates or updates a logical delivery destination.
Type annotations and code completion for boto3.client("logs").put_delivery_destination
method.
boto3 documentation
# put_delivery_destination method definition
def put_delivery_destination(
self,
*,
name: str,
deliveryDestinationConfiguration: DeliveryDestinationConfigurationTypeDef, # (1)
outputFormat: OutputFormatType = ..., # (2)
tags: Mapping[str, str] = ...,
) -> PutDeliveryDestinationResponseTypeDef: # (3)
...
- See DeliveryDestinationConfigurationTypeDef
- See OutputFormatType
- See PutDeliveryDestinationResponseTypeDef
# put_delivery_destination method usage example with argument unpacking
kwargs: PutDeliveryDestinationRequestRequestTypeDef = { # (1)
"name": ...,
"deliveryDestinationConfiguration": ...,
}
parent.put_delivery_destination(**kwargs)
put_delivery_destination_policy#
Creates and assigns an IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account.
Type annotations and code completion for boto3.client("logs").put_delivery_destination_policy
method.
boto3 documentation
# put_delivery_destination_policy method definition
def put_delivery_destination_policy(
self,
*,
deliveryDestinationName: str,
deliveryDestinationPolicy: str,
) -> PutDeliveryDestinationPolicyResponseTypeDef: # (1)
...
# put_delivery_destination_policy method usage example with argument unpacking
kwargs: PutDeliveryDestinationPolicyRequestRequestTypeDef = { # (1)
"deliveryDestinationName": ...,
"deliveryDestinationPolicy": ...,
}
parent.put_delivery_destination_policy(**kwargs)
put_delivery_source#
Creates or updates a logical delivery source.
Type annotations and code completion for boto3.client("logs").put_delivery_source
method.
boto3 documentation
# put_delivery_source method definition
def put_delivery_source(
self,
*,
name: str,
resourceArn: str,
logType: str,
tags: Mapping[str, str] = ...,
) -> PutDeliverySourceResponseTypeDef: # (1)
...
# put_delivery_source method usage example with argument unpacking
kwargs: PutDeliverySourceRequestRequestTypeDef = { # (1)
"name": ...,
"resourceArn": ...,
"logType": ...,
}
parent.put_delivery_source(**kwargs)
put_destination#
Creates or updates a destination.
Type annotations and code completion for boto3.client("logs").put_destination
method.
boto3 documentation
# put_destination method definition
def put_destination(
self,
*,
destinationName: str,
targetArn: str,
roleArn: str,
tags: Mapping[str, str] = ...,
) -> PutDestinationResponseTypeDef: # (1)
...
# put_destination method usage example with argument unpacking
kwargs: PutDestinationRequestRequestTypeDef = { # (1)
"destinationName": ...,
"targetArn": ...,
"roleArn": ...,
}
parent.put_destination(**kwargs)
put_destination_policy#
Creates or updates an access policy associated with an existing destination.
Type annotations and code completion for boto3.client("logs").put_destination_policy
method.
boto3 documentation
# put_destination_policy method definition
def put_destination_policy(
self,
*,
destinationName: str,
accessPolicy: str,
forceUpdate: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# put_destination_policy method usage example with argument unpacking
kwargs: PutDestinationPolicyRequestRequestTypeDef = { # (1)
"destinationName": ...,
"accessPolicy": ...,
}
parent.put_destination_policy(**kwargs)
put_index_policy#
Creates or updates a field index policy for the specified log group.
Type annotations and code completion for boto3.client("logs").put_index_policy
method.
boto3 documentation
# put_index_policy method definition
def put_index_policy(
self,
*,
logGroupIdentifier: str,
policyDocument: str,
) -> PutIndexPolicyResponseTypeDef: # (1)
...
# put_index_policy method usage example with argument unpacking
kwargs: PutIndexPolicyRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
"policyDocument": ...,
}
parent.put_index_policy(**kwargs)
put_integration#
Creates an integration between CloudWatch Logs and another service in this account.
Type annotations and code completion for boto3.client("logs").put_integration
method.
boto3 documentation
# put_integration method definition
def put_integration(
self,
*,
integrationName: str,
resourceConfig: ResourceConfigTypeDef, # (1)
integrationType: IntegrationTypeType, # (2)
) -> PutIntegrationResponseTypeDef: # (3)
...
# put_integration method usage example with argument unpacking
kwargs: PutIntegrationRequestRequestTypeDef = { # (1)
"integrationName": ...,
"resourceConfig": ...,
"integrationType": ...,
}
parent.put_integration(**kwargs)
put_log_events#
Uploads a batch of log events to the specified log stream.
Type annotations and code completion for boto3.client("logs").put_log_events
method.
boto3 documentation
# put_log_events method definition
def put_log_events(
self,
*,
logGroupName: str,
logStreamName: str,
logEvents: Sequence[InputLogEventTypeDef], # (1)
sequenceToken: str = ...,
entity: EntityTypeDef = ..., # (2)
) -> PutLogEventsResponseTypeDef: # (3)
...
# put_log_events method usage example with argument unpacking
kwargs: PutLogEventsRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"logStreamName": ...,
"logEvents": ...,
}
parent.put_log_events(**kwargs)
put_metric_filter#
Creates or updates a metric filter and associates it with the specified log group.
Type annotations and code completion for boto3.client("logs").put_metric_filter
method.
boto3 documentation
# put_metric_filter method definition
def put_metric_filter(
self,
*,
logGroupName: str,
filterName: str,
filterPattern: str,
metricTransformations: Sequence[MetricTransformationUnionTypeDef], # (1)
applyOnTransformedLogs: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (2)
...
# put_metric_filter method usage example with argument unpacking
kwargs: PutMetricFilterRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"filterName": ...,
"filterPattern": ...,
"metricTransformations": ...,
}
parent.put_metric_filter(**kwargs)
put_query_definition#
Creates or updates a query definition for CloudWatch Logs Insights.
Type annotations and code completion for boto3.client("logs").put_query_definition
method.
boto3 documentation
# put_query_definition method definition
def put_query_definition(
self,
*,
name: str,
queryString: str,
queryLanguage: QueryLanguageType = ..., # (1)
queryDefinitionId: str = ...,
logGroupNames: Sequence[str] = ...,
clientToken: str = ...,
) -> PutQueryDefinitionResponseTypeDef: # (2)
...
# put_query_definition method usage example with argument unpacking
kwargs: PutQueryDefinitionRequestRequestTypeDef = { # (1)
"name": ...,
"queryString": ...,
}
parent.put_query_definition(**kwargs)
put_resource_policy#
Creates or updates a resource policy allowing other Amazon Web Services services to put log events to this account, such as Amazon Route 53.
Type annotations and code completion for boto3.client("logs").put_resource_policy
method.
boto3 documentation
# put_resource_policy method definition
def put_resource_policy(
self,
*,
policyName: str = ...,
policyDocument: str = ...,
) -> PutResourcePolicyResponseTypeDef: # (1)
...
# put_resource_policy method usage example with argument unpacking
kwargs: PutResourcePolicyRequestRequestTypeDef = { # (1)
"policyName": ...,
}
parent.put_resource_policy(**kwargs)
put_retention_policy#
Sets the retention of the specified log group.
Type annotations and code completion for boto3.client("logs").put_retention_policy
method.
boto3 documentation
# put_retention_policy method definition
def put_retention_policy(
self,
*,
logGroupName: str,
retentionInDays: int,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# put_retention_policy method usage example with argument unpacking
kwargs: PutRetentionPolicyRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"retentionInDays": ...,
}
parent.put_retention_policy(**kwargs)
put_subscription_filter#
Creates or updates a subscription filter and associates it with the specified log group.
Type annotations and code completion for boto3.client("logs").put_subscription_filter
method.
boto3 documentation
# put_subscription_filter method definition
def put_subscription_filter(
self,
*,
logGroupName: str,
filterName: str,
filterPattern: str,
destinationArn: str,
roleArn: str = ...,
distribution: DistributionType = ..., # (1)
applyOnTransformedLogs: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (2)
...
# put_subscription_filter method usage example with argument unpacking
kwargs: PutSubscriptionFilterRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"filterName": ...,
"filterPattern": ...,
"destinationArn": ...,
}
parent.put_subscription_filter(**kwargs)
put_transformer#
Creates or updates a log transformer for a single log group.
Type annotations and code completion for boto3.client("logs").put_transformer
method.
boto3 documentation
# put_transformer method definition
def put_transformer(
self,
*,
logGroupIdentifier: str,
transformerConfig: Sequence[ProcessorUnionTypeDef], # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
# put_transformer method usage example with argument unpacking
kwargs: PutTransformerRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
"transformerConfig": ...,
}
parent.put_transformer(**kwargs)
start_live_tail#
Starts a Live Tail streaming session for one or more log groups.
Type annotations and code completion for boto3.client("logs").start_live_tail
method.
boto3 documentation
# start_live_tail method definition
def start_live_tail(
self,
*,
logGroupIdentifiers: Sequence[str],
logStreamNames: Sequence[str] = ...,
logStreamNamePrefixes: Sequence[str] = ...,
logEventFilterPattern: str = ...,
) -> StartLiveTailResponseTypeDef: # (1)
...
# start_live_tail method usage example with argument unpacking
kwargs: StartLiveTailRequestRequestTypeDef = { # (1)
"logGroupIdentifiers": ...,
}
parent.start_live_tail(**kwargs)
start_query#
Starts a query of one or more log groups using CloudWatch Logs Insights.
Type annotations and code completion for boto3.client("logs").start_query
method.
boto3 documentation
# start_query method definition
def start_query(
self,
*,
startTime: int,
endTime: int,
queryString: str,
queryLanguage: QueryLanguageType = ..., # (1)
logGroupName: str = ...,
logGroupNames: Sequence[str] = ...,
logGroupIdentifiers: Sequence[str] = ...,
limit: int = ...,
) -> StartQueryResponseTypeDef: # (2)
...
# start_query method usage example with argument unpacking
kwargs: StartQueryRequestRequestTypeDef = { # (1)
"startTime": ...,
"endTime": ...,
"queryString": ...,
}
parent.start_query(**kwargs)
stop_query#
Stops a CloudWatch Logs Insights query that is in progress.
Type annotations and code completion for boto3.client("logs").stop_query
method.
boto3 documentation
# stop_query method definition
def stop_query(
self,
*,
queryId: str,
) -> StopQueryResponseTypeDef: # (1)
...
# stop_query method usage example with argument unpacking
kwargs: StopQueryRequestRequestTypeDef = { # (1)
"queryId": ...,
}
parent.stop_query(**kwargs)
tag_log_group#
The TagLogGroup operation is on the path to deprecation.
Type annotations and code completion for boto3.client("logs").tag_log_group
method.
boto3 documentation
# tag_log_group method definition
def tag_log_group(
self,
*,
logGroupName: str,
tags: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# tag_log_group method usage example with argument unpacking
kwargs: TagLogGroupRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"tags": ...,
}
parent.tag_log_group(**kwargs)
tag_resource#
Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs resource.
Type annotations and code completion for boto3.client("logs").tag_resource
method.
boto3 documentation
# tag_resource method definition
def tag_resource(
self,
*,
resourceArn: str,
tags: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"tags": ...,
}
parent.tag_resource(**kwargs)
test_metric_filter#
Tests the filter pattern of a metric filter against a sample of log event messages.
Type annotations and code completion for boto3.client("logs").test_metric_filter
method.
boto3 documentation
# test_metric_filter method definition
def test_metric_filter(
self,
*,
filterPattern: str,
logEventMessages: Sequence[str],
) -> TestMetricFilterResponseTypeDef: # (1)
...
# test_metric_filter method usage example with argument unpacking
kwargs: TestMetricFilterRequestRequestTypeDef = { # (1)
"filterPattern": ...,
"logEventMessages": ...,
}
parent.test_metric_filter(**kwargs)
test_transformer#
Use this operation to test a log transformer.
Type annotations and code completion for boto3.client("logs").test_transformer
method.
boto3 documentation
# test_transformer method definition
def test_transformer(
self,
*,
transformerConfig: Sequence[ProcessorTypeDef], # (1)
logEventMessages: Sequence[str],
) -> TestTransformerResponseTypeDef: # (2)
...
# test_transformer method usage example with argument unpacking
kwargs: TestTransformerRequestRequestTypeDef = { # (1)
"transformerConfig": ...,
"logEventMessages": ...,
}
parent.test_transformer(**kwargs)
untag_log_group#
The UntagLogGroup operation is on the path to deprecation.
Type annotations and code completion for boto3.client("logs").untag_log_group
method.
boto3 documentation
# untag_log_group method definition
def untag_log_group(
self,
*,
logGroupName: str,
tags: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# untag_log_group method usage example with argument unpacking
kwargs: UntagLogGroupRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"tags": ...,
}
parent.untag_log_group(**kwargs)
untag_resource#
Removes one or more tags from the specified resource.
Type annotations and code completion for boto3.client("logs").untag_resource
method.
boto3 documentation
# untag_resource method definition
def untag_resource(
self,
*,
resourceArn: str,
tagKeys: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"tagKeys": ...,
}
parent.untag_resource(**kwargs)
update_anomaly#
Use this operation to suppress anomaly detection for a specified anomaly or pattern.
Type annotations and code completion for boto3.client("logs").update_anomaly
method.
boto3 documentation
# update_anomaly method definition
def update_anomaly(
self,
*,
anomalyDetectorArn: str,
anomalyId: str = ...,
patternId: str = ...,
suppressionType: SuppressionTypeType = ..., # (1)
suppressionPeriod: SuppressionPeriodTypeDef = ..., # (2)
baseline: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (3)
...
# update_anomaly method usage example with argument unpacking
kwargs: UpdateAnomalyRequestRequestTypeDef = { # (1)
"anomalyDetectorArn": ...,
}
parent.update_anomaly(**kwargs)
update_delivery_configuration#
Use this operation to update the configuration of a delivery to change either the S3 path pattern or the format of the delivered logs.
Type annotations and code completion for boto3.client("logs").update_delivery_configuration
method.
boto3 documentation
# update_delivery_configuration method definition
def update_delivery_configuration(
self,
*,
id: str,
recordFields: Sequence[str] = ...,
fieldDelimiter: str = ...,
s3DeliveryConfiguration: S3DeliveryConfigurationTypeDef = ..., # (1)
) -> dict[str, Any]:
...
# update_delivery_configuration method usage example with argument unpacking
kwargs: UpdateDeliveryConfigurationRequestRequestTypeDef = { # (1)
"id": ...,
}
parent.update_delivery_configuration(**kwargs)
update_log_anomaly_detector#
Updates an existing log anomaly detector.
Type annotations and code completion for boto3.client("logs").update_log_anomaly_detector
method.
boto3 documentation
# update_log_anomaly_detector method definition
def update_log_anomaly_detector(
self,
*,
anomalyDetectorArn: str,
enabled: bool,
evaluationFrequency: EvaluationFrequencyType = ..., # (1)
filterPattern: str = ...,
anomalyVisibilityTime: int = ...,
) -> EmptyResponseMetadataTypeDef: # (2)
...
# update_log_anomaly_detector method usage example with argument unpacking
kwargs: UpdateLogAnomalyDetectorRequestRequestTypeDef = { # (1)
"anomalyDetectorArn": ...,
"enabled": ...,
}
parent.update_log_anomaly_detector(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("logs").get_paginator
method with overloads.
client.get_paginator("describe_configuration_templates")
-> DescribeConfigurationTemplatesPaginatorclient.get_paginator("describe_deliveries")
-> DescribeDeliveriesPaginatorclient.get_paginator("describe_delivery_destinations")
-> DescribeDeliveryDestinationsPaginatorclient.get_paginator("describe_delivery_sources")
-> DescribeDeliverySourcesPaginatorclient.get_paginator("describe_destinations")
-> DescribeDestinationsPaginatorclient.get_paginator("describe_export_tasks")
-> DescribeExportTasksPaginatorclient.get_paginator("describe_log_groups")
-> DescribeLogGroupsPaginatorclient.get_paginator("describe_log_streams")
-> DescribeLogStreamsPaginatorclient.get_paginator("describe_metric_filters")
-> DescribeMetricFiltersPaginatorclient.get_paginator("describe_queries")
-> DescribeQueriesPaginatorclient.get_paginator("describe_resource_policies")
-> DescribeResourcePoliciesPaginatorclient.get_paginator("describe_subscription_filters")
-> DescribeSubscriptionFiltersPaginatorclient.get_paginator("filter_log_events")
-> FilterLogEventsPaginatorclient.get_paginator("list_anomalies")
-> ListAnomaliesPaginatorclient.get_paginator("list_log_anomaly_detectors")
-> ListLogAnomalyDetectorsPaginatorclient.get_paginator("list_log_groups_for_query")
-> ListLogGroupsForQueryPaginator