cloudwatchlogs: Amazon CloudWatch Logs

Description Usage Arguments Value Service syntax Operations Examples

View source: R/cloudwatchlogs_service.R

Description

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from EC2 instances, AWS CloudTrail, or other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console, CloudWatch Logs commands in the AWS CLI, CloudWatch Logs API, or CloudWatch Logs SDK.

You can use CloudWatch Logs to:

Usage

1
cloudwatchlogs(config = list())

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

Value

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
svc <- cloudwatchlogs(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string"
    ),
    endpoint = "string",
    region = "string"
  )
)

Operations

associate_kms_key Associates the specified AWS Key Management Service (AWS KMS) customer master key (CMK) with the specified log group
cancel_export_task Cancels the specified export task
create_export_task Creates an export task, which allows you to efficiently export data from a log group to an Amazon S3 bucket
create_log_group Creates a log group with the specified name
create_log_stream Creates a log stream for the specified log group
delete_destination Deletes the specified destination, and eventually disables all the subscription filters that publish to it
delete_log_group Deletes the specified log group and permanently deletes all the archived log events associated with the log group
delete_log_stream Deletes the specified log stream and permanently deletes all the archived log events associated with the log stream
delete_metric_filter Deletes the specified metric filter
delete_query_definition Deletes a saved CloudWatch Logs Insights query definition
delete_resource_policy Deletes a resource policy from this account
delete_retention_policy Deletes the specified retention policy
delete_subscription_filter Deletes the specified subscription filter
describe_destinations Lists all your destinations
describe_export_tasks Lists the specified export tasks
describe_log_groups Lists the specified log groups
describe_log_streams Lists the log streams for the specified log group
describe_metric_filters Lists the specified metric filters
describe_queries Returns a list of CloudWatch Logs Insights queries that are scheduled, executing, or have been executed recently in this account
describe_query_definitions This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions
describe_resource_policies Lists the resource policies in this account
describe_subscription_filters Lists the subscription filters for the specified log group
disassociate_kms_key Disassociates the associated AWS Key Management Service (AWS KMS) customer master key (CMK) from the specified log group
filter_log_events Lists log events from the specified log group
get_log_events Lists log events from the specified log stream
get_log_group_fields Returns a list of the fields that are included in log events in the specified log group, along with the percentage of log events that contain each field
get_log_record Retrieves all of the fields and values of a single log event
get_query_results Returns the results from the specified query
list_tags_log_group Lists the tags for the specified log group
put_destination Creates or updates a destination
put_destination_policy Creates or updates an access policy associated with an existing destination
put_log_events Uploads a batch of log events to the specified log stream
put_metric_filter Creates or updates a metric filter and associates it with the specified log group
put_query_definition Creates or updates a query definition for CloudWatch Logs Insights
put_resource_policy Creates or updates a resource policy allowing other AWS services to put log events to this account, such as Amazon Route 53
put_retention_policy Sets the retention of the specified log group
put_subscription_filter Creates or updates a subscription filter and associates it with the specified log group
start_query Schedules a query of a log group using CloudWatch Logs Insights
stop_query Stops a CloudWatch Logs Insights query that is in progress
tag_log_group Adds or updates the specified tags for the specified log group
test_metric_filter Tests the filter pattern of a metric filter against a sample of log event messages
untag_log_group Removes the specified tags from the specified log group

Examples

1
2
3
4
5
6
7
## Not run: 
svc <- cloudwatchlogs()
svc$associate_kms_key(
  Foo = 123
)

## End(Not run)

paws.management documentation built on Aug. 23, 2021, 9:11 a.m.