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
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.
client = boto3.client("logs")
try:
do_something(client)
except (
client.ClientError,
client.DataAlreadyAcceptedException,
client.InvalidOperationException,
client.InvalidParameterException,
client.InvalidSequenceTokenException,
client.LimitExceededException,
client.MalformedQueryException,
client.OperationAbortedException,
client.ResourceAlreadyExistsException,
client.ResourceNotFoundException,
client.ServiceUnavailableException,
client.TooManyTagsException,
client.UnrecognizedClientException,
) as e:
print(e)
from mypy_boto3_logs.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods
associate_kms_key
Associates the specified KMS key with the specified log group.
Type annotations and code completion for boto3.client("logs").associate_kms_key
method.
boto3 documentation
def associate_kms_key(
self,
*,
logGroupName: str,
kmsKeyId: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: AssociateKmsKeyRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"kmsKeyId": ...,
}
parent.associate_kms_key(**kwargs)
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("logs").can_paginate
method.
boto3 documentation
cancel_export_task
Cancels the specified export task.
Type annotations and code completion for boto3.client("logs").cancel_export_task
method.
boto3 documentation
def cancel_export_task(
self,
*,
taskId: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: CancelExportTaskRequestRequestTypeDef = { # (1)
"taskId": ...,
}
parent.cancel_export_task(**kwargs)
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("logs").close
method.
boto3 documentation
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
def create_export_task(
self,
*,
logGroupName: str,
fromTime: int,
to: int,
destination: str,
taskName: str = ...,
logStreamNamePrefix: str = ...,
destinationPrefix: str = ...,
) -> CreateExportTaskResponseTypeDef: # (1)
...
kwargs: CreateExportTaskRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"fromTime": ...,
"to": ...,
"destination": ...,
}
parent.create_export_task(**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
def create_log_group(
self,
*,
logGroupName: str,
kmsKeyId: str = ...,
tags: Mapping[str, str] = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def create_log_stream(
self,
*,
logGroupName: str,
logStreamName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: CreateLogStreamRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"logStreamName": ...,
}
parent.create_log_stream(**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
def delete_data_protection_policy(
self,
*,
logGroupIdentifier: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteDataProtectionPolicyRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
}
parent.delete_data_protection_policy(**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
def delete_destination(
self,
*,
destinationName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteDestinationRequestRequestTypeDef = { # (1)
"destinationName": ...,
}
parent.delete_destination(**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
def delete_log_group(
self,
*,
logGroupName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def delete_log_stream(
self,
*,
logGroupName: str,
logStreamName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def delete_metric_filter(
self,
*,
logGroupName: str,
filterName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def delete_query_definition(
self,
*,
queryDefinitionId: str,
) -> DeleteQueryDefinitionResponseTypeDef: # (1)
...
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
def delete_resource_policy(
self,
*,
policyName: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def delete_retention_policy(
self,
*,
logGroupName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def delete_subscription_filter(
self,
*,
logGroupName: str,
filterName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteSubscriptionFilterRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"filterName": ...,
}
parent.delete_subscription_filter(**kwargs)
describe_destinations
Lists all your destinations.
Type annotations and code completion for boto3.client("logs").describe_destinations
method.
boto3 documentation
def describe_destinations(
self,
*,
DestinationNamePrefix: str = ...,
nextToken: str = ...,
limit: int = ...,
) -> DescribeDestinationsResponseTypeDef: # (1)
...
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
def describe_export_tasks(
self,
*,
taskId: str = ...,
statusCode: ExportTaskStatusCodeType = ..., # (1)
nextToken: str = ...,
limit: int = ...,
) -> DescribeExportTasksResponseTypeDef: # (2)
...
kwargs: DescribeExportTasksRequestRequestTypeDef = { # (1)
"taskId": ...,
}
parent.describe_export_tasks(**kwargs)
describe_log_groups
Lists the specified log groups.
Type annotations and code completion for boto3.client("logs").describe_log_groups
method.
boto3 documentation
def describe_log_groups(
self,
*,
accountIdentifiers: Sequence[str] = ...,
logGroupNamePrefix: str = ...,
logGroupNamePattern: str = ...,
nextToken: str = ...,
limit: int = ...,
includeLinkedAccounts: bool = ...,
) -> DescribeLogGroupsResponseTypeDef: # (1)
...
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
def describe_log_streams(
self,
*,
logGroupName: str = ...,
logGroupIdentifier: str = ...,
logStreamNamePrefix: str = ...,
orderBy: OrderByType = ..., # (1)
descending: bool = ...,
nextToken: str = ...,
limit: int = ...,
) -> DescribeLogStreamsResponseTypeDef: # (2)
...
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
def describe_metric_filters(
self,
*,
logGroupName: str = ...,
filterNamePrefix: str = ...,
nextToken: str = ...,
limit: int = ...,
metricName: str = ...,
metricNamespace: str = ...,
) -> DescribeMetricFiltersResponseTypeDef: # (1)
...
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
def describe_queries(
self,
*,
logGroupName: str = ...,
status: QueryStatusType = ..., # (1)
maxResults: int = ...,
nextToken: str = ...,
) -> DescribeQueriesResponseTypeDef: # (2)
...
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
def describe_query_definitions(
self,
*,
queryDefinitionNamePrefix: str = ...,
maxResults: int = ...,
nextToken: str = ...,
) -> DescribeQueryDefinitionsResponseTypeDef: # (1)
...
kwargs: DescribeQueryDefinitionsRequestRequestTypeDef = { # (1)
"queryDefinitionNamePrefix": ...,
}
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
def describe_resource_policies(
self,
*,
nextToken: str = ...,
limit: int = ...,
) -> DescribeResourcePoliciesResponseTypeDef: # (1)
...
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
def describe_subscription_filters(
self,
*,
logGroupName: str,
filterNamePrefix: str = ...,
nextToken: str = ...,
limit: int = ...,
) -> DescribeSubscriptionFiltersResponseTypeDef: # (1)
...
kwargs: DescribeSubscriptionFiltersRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.describe_subscription_filters(**kwargs)
disassociate_kms_key
Disassociates the associated KMS key from the specified log group.
Type annotations and code completion for boto3.client("logs").disassociate_kms_key
method.
boto3 documentation
def disassociate_kms_key(
self,
*,
logGroupName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
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)
...
kwargs: FilterLogEventsRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.filter_log_events(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("logs").generate_presigned_url
method.
boto3 documentation
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
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
def get_data_protection_policy(
self,
*,
logGroupIdentifier: str,
) -> GetDataProtectionPolicyResponseTypeDef: # (1)
...
kwargs: GetDataProtectionPolicyRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
}
parent.get_data_protection_policy(**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
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)
...
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
def get_log_group_fields(
self,
*,
logGroupName: str = ...,
time: int = ...,
logGroupIdentifier: str = ...,
) -> GetLogGroupFieldsResponseTypeDef: # (1)
...
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
def get_log_record(
self,
*,
logRecordPointer: str,
unmask: bool = ...,
) -> GetLogRecordResponseTypeDef: # (1)
...
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
def get_query_results(
self,
*,
queryId: str,
) -> GetQueryResultsResponseTypeDef: # (1)
...
kwargs: GetQueryResultsRequestRequestTypeDef = { # (1)
"queryId": ...,
}
parent.get_query_results(**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
def list_tags_for_resource(
self,
*,
resourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
list_tags_log_group
.
Type annotations and code completion for boto3.client("logs").list_tags_log_group
method.
boto3 documentation
def list_tags_log_group(
self,
*,
logGroupName: str,
) -> ListTagsLogGroupResponseTypeDef: # (1)
...
kwargs: ListTagsLogGroupRequestRequestTypeDef = { # (1)
"logGroupName": ...,
}
parent.list_tags_log_group(**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
def put_data_protection_policy(
self,
*,
logGroupIdentifier: str,
policyDocument: str,
) -> PutDataProtectionPolicyResponseTypeDef: # (1)
...
kwargs: PutDataProtectionPolicyRequestRequestTypeDef = { # (1)
"logGroupIdentifier": ...,
"policyDocument": ...,
}
parent.put_data_protection_policy(**kwargs)
put_destination
Creates or updates a destination.
Type annotations and code completion for boto3.client("logs").put_destination
method.
boto3 documentation
def put_destination(
self,
*,
destinationName: str,
targetArn: str,
roleArn: str,
tags: Mapping[str, str] = ...,
) -> PutDestinationResponseTypeDef: # (1)
...
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
def put_destination_policy(
self,
*,
destinationName: str,
accessPolicy: str,
forceUpdate: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: PutDestinationPolicyRequestRequestTypeDef = { # (1)
"destinationName": ...,
"accessPolicy": ...,
}
parent.put_destination_policy(**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
def put_log_events(
self,
*,
logGroupName: str,
logStreamName: str,
logEvents: Sequence[InputLogEventTypeDef], # (1)
sequenceToken: str = ...,
) -> PutLogEventsResponseTypeDef: # (2)
...
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
def put_metric_filter(
self,
*,
logGroupName: str,
filterName: str,
filterPattern: str,
metricTransformations: Sequence[MetricTransformationTypeDef], # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
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
def put_query_definition(
self,
*,
name: str,
queryString: str,
queryDefinitionId: str = ...,
logGroupNames: Sequence[str] = ...,
) -> PutQueryDefinitionResponseTypeDef: # (1)
...
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
def put_resource_policy(
self,
*,
policyName: str = ...,
policyDocument: str = ...,
) -> PutResourcePolicyResponseTypeDef: # (1)
...
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
def put_retention_policy(
self,
*,
logGroupName: str,
retentionInDays: int,
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def put_subscription_filter(
self,
*,
logGroupName: str,
filterName: str,
filterPattern: str,
destinationArn: str,
roleArn: str = ...,
distribution: DistributionType = ..., # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
kwargs: PutSubscriptionFilterRequestRequestTypeDef = { # (1)
"logGroupName": ...,
"filterName": ...,
"filterPattern": ...,
"destinationArn": ...,
}
parent.put_subscription_filter(**kwargs)
start_query
Schedules a query of a log group using CloudWatch Logs Insights.
Type annotations and code completion for boto3.client("logs").start_query
method.
boto3 documentation
def start_query(
self,
*,
startTime: int,
endTime: int,
queryString: str,
logGroupName: str = ...,
logGroupNames: Sequence[str] = ...,
logGroupIdentifiers: Sequence[str] = ...,
limit: int = ...,
) -> StartQueryResponseTypeDef: # (1)
...
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
kwargs: StopQueryRequestRequestTypeDef = { # (1)
"queryId": ...,
}
parent.stop_query(**kwargs)
tag_log_group
.
Type annotations and code completion for boto3.client("logs").tag_log_group
method.
boto3 documentation
def tag_log_group(
self,
*,
logGroupName: str,
tags: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def tag_resource(
self,
*,
resourceArn: str,
tags: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def test_metric_filter(
self,
*,
filterPattern: str,
logEventMessages: Sequence[str],
) -> TestMetricFilterResponseTypeDef: # (1)
...
kwargs: TestMetricFilterRequestRequestTypeDef = { # (1)
"filterPattern": ...,
"logEventMessages": ...,
}
parent.test_metric_filter(**kwargs)
untag_log_group
.
Type annotations and code completion for boto3.client("logs").untag_log_group
method.
boto3 documentation
def untag_log_group(
self,
*,
logGroupName: str,
tags: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
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
def untag_resource(
self,
*,
resourceArn: str,
tagKeys: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"tagKeys": ...,
}
parent.untag_resource(**kwargs)
get_paginator
Type annotations and code completion for boto3.client("logs").get_paginator
method with overloads.
client.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")
-> FilterLogEventsPaginator