cloudwatchlogs_create_log_group: Creates a log group with the specified name

Description Usage Arguments Value Request syntax

View source: R/cloudwatchlogs_operations.R

Description

Creates a log group with the specified name. You can create up to 20,000 log groups per account.

You must use the following guidelines when naming a log group:

When you create a log group, by default the log events in the log group never expire. To set a retention policy so that events expire and are deleted after a specified time, use put_retention_policy.

If you associate a AWS Key Management Service (AWS KMS) customer master key (CMK) with the log group, ingested data is encrypted using the CMK. This association is stored as long as the data encrypted with the CMK is still within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt this data whenever it is requested.

If you attempt to associate a CMK with the log group but the CMK does not exist or the CMK is disabled, you receive an InvalidParameterException error.

CloudWatch Logs supports only symmetric CMKs. Do not associate an asymmetric CMK with your log group. For more information, see Using Symmetric and Asymmetric Keys.

Usage

1
cloudwatchlogs_create_log_group(logGroupName, kmsKeyId, tags)

Arguments

logGroupName

[required] The name of the log group.

kmsKeyId

The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. For more information, see Amazon Resource Names - AWS Key Management Service (AWS KMS).

tags

The key-value pairs to use for the tags.

Value

An empty list.

Request syntax

1
2
3
4
5
6
7
svc$create_log_group(
  logGroupName = "string",
  kmsKeyId = "string",
  tags = list(
    "string"
  )
)

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