pulumi

  1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. cloudwatch
  6. LogGroup

aws logo aws logo

AWS v7.43.0, Aug 20 26

aws logo aws logo

AWS v7.43.0, Aug 20 26

Viewing docs for AWS v7.43.0
published on Thursday, Aug 20, 2026 by Pulumi

pulumi/pulumi-aws

aws logo aws logo

Viewing docs for AWS v7.43.0
published on Thursday, Aug 20, 2026 by Pulumi

pulumi/pulumi-aws

Provides a CloudWatch Log Group resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const yada = new aws.cloudwatch.LogGroup("yada", {
    name: "Yada",
    tags: {
        Environment: "production",
        Application: "serviceA",
    },
});
import pulumi
import pulumi_aws as aws

yada = aws.cloudwatch.LogGroup("yada",
    name="Yada",
    tags={
        "Environment": "production",
        "Application": "serviceA",
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudwatch.NewLogGroup(ctx, "yada", &cloudwatch.LogGroupArgs{
			Name: pulumi.String("Yada"),
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("production"),
				"Application": pulumi.String("serviceA"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var yada = new Aws.CloudWatch.LogGroup("yada", new()
    {
        Name = "Yada",
        Tags =
        {
            { "Environment", "production" },
            { "Application", "serviceA" },
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.LogGroup;
import com.pulumi.aws.cloudwatch.LogGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var yada = new LogGroup("yada", LogGroupArgs.builder()
            .name("Yada")
            .tags(Map.ofEntries(
                Map.entry("Environment", "production"),
                Map.entry("Application", "serviceA")
            ))
            .build());

    }
}
resources:
  yada:
    type: aws:cloudwatch:LogGroup
    properties:
      name: Yada
      tags:
        Environment: production
        Application: serviceA
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_cloudwatch_loggroup" "yada" {
  name = "Yada"
  tags = {
    "Environment" = "production"
    "Application" = "serviceA"
  }
}

Create LogGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

@overload
def LogGroup(resource_name: str,
             args: Optional[LogGroupArgs] = None,
             opts: Optional[ResourceOptions] = None)

@overload
def LogGroup(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             deletion_protection_enabled: Optional[bool] = None,
             kms_key_id: Optional[str] = None,
             log_group_class: Optional[str] = None,
             name: Optional[str] = None,
             name_prefix: Optional[str] = None,
             region: Optional[str] = None,
             retention_in_days: Optional[int] = None,
             skip_destroy: Optional[bool] = None,
             tags: Optional[Mapping[str, str]] = None)
public LogGroup(String name, LogGroupArgs args)
public LogGroup(String name, LogGroupArgs args, CustomResourceOptions options)
type: aws:cloudwatch:LogGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

resource "aws_cloudwatch_log_group" "name" {
    # resource properties
}

Parameters

name string
The unique name of the resource.
args LogGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args LogGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LogGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LogGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args LogGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var logGroupResource = new Aws.CloudWatch.LogGroup("logGroupResource", new()
{
    DeletionProtectionEnabled = false,
    KmsKeyId = "string",
    LogGroupClass = "string",
    Name = "string",
    NamePrefix = "string",
    Region = "string",
    RetentionInDays = 0,
    SkipDestroy = false,
    Tags =
    {
        { "string", "string" },
    },
});
example, err := cloudwatch.NewLogGroup(ctx, "logGroupResource", &cloudwatch.LogGroupArgs{
	DeletionProtectionEnabled: pulumi.Bool(false),
	KmsKeyId:                  pulumi.String("string"),
	LogGroupClass:             pulumi.String("string"),
	Name:                      pulumi.String("string"),
	NamePrefix:                pulumi.String("string"),
	Region:                    pulumi.String("string"),
	RetentionInDays:           pulumi.Int(0),
	SkipDestroy:               pulumi.Bool(false),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
resource "aws_cloudwatch_log_group" "logGroupResource" {
  lifecycle {
    create_before_destroy = true
  }
  deletion_protection_enabled = false
  kms_key_id                  = "string"
  log_group_class             = "string"
  name                        = "string"
  name_prefix                 = "string"
  region                      = "string"
  retention_in_days           = 0
  skip_destroy                = false
  tags = {
    "string" = "string"
  }
}
var logGroupResource = new LogGroup("logGroupResource", LogGroupArgs.builder()
    .deletionProtectionEnabled(false)
    .kmsKeyId("string")
    .logGroupClass("string")
    .name("string")
    .namePrefix("string")
    .region("string")
    .retentionInDays(0)
    .skipDestroy(false)
    .tags(Map.of("string", "string"))
    .build());
log_group_resource = aws.cloudwatch.LogGroup("logGroupResource",
    deletion_protection_enabled=False,
    kms_key_id="string",
    log_group_class="string",
    name="string",
    name_prefix="string",
    region="string",
    retention_in_days=0,
    skip_destroy=False,
    tags={
        "string": "string",
    })
const logGroupResource = new aws.cloudwatch.LogGroup("logGroupResource", {
    deletionProtectionEnabled: false,
    kmsKeyId: "string",
    logGroupClass: "string",
    name: "string",
    namePrefix: "string",
    region: "string",
    retentionInDays: 0,
    skipDestroy: false,
    tags: {
        string: "string",
    },
});
type: aws:cloudwatch:LogGroup
properties:
    deletionProtectionEnabled: false
    kmsKeyId: string
    logGroupClass: string
    name: string
    namePrefix: string
    region: string
    retentionInDays: 0
    skipDestroy: false
    tags:
        string: string

LogGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LogGroup resource accepts the following input properties:

Deletion Protection Enabled bool
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
Kms Key Id string
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
Log Group Class string
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
Name string
The name of the log group. If omitted, this provider will assign a random, unique name.
Name Prefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
Region string
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Retention In Days int
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
Skip Destroy bool
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
Tags Dictionary<string, string>
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Deletion Protection Enabled bool
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
Kms Key Id string
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
Log Group Class string
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
Name string
The name of the log group. If omitted, this provider will assign a random, unique name.
Name Prefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
Region string
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Retention In Days int
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
Skip Destroy bool
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
Tags map[string]string
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
deletion_ protection_ enabled bool
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms_ key_ id string
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log_ group_ class string
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name string
The name of the log group. If omitted, this provider will assign a random, unique name.
name_ prefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
region string
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention_ in_ days number
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip_ destroy bool
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags map(string)
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
deletion Protection Enabled Boolean
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms Key Id String
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log Group Class String
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name String
The name of the log group. If omitted, this provider will assign a random, unique name.
name Prefix String
Creates a unique name beginning with the specified prefix. Conflicts with name.
region String
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention In Days Integer
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip Destroy Boolean
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags Map<String,String>
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
deletion Protection Enabled boolean
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms Key Id string
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log Group Class string
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name string
The name of the log group. If omitted, this provider will assign a random, unique name.
name Prefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
region string
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention In Days number
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip Destroy boolean
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags {[key: string]: string}
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
deletion_ protection_ enabled bool
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms_ key_ id str
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log_ group_ class str
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name str
The name of the log group. If omitted, this provider will assign a random, unique name.
name_ prefix str
Creates a unique name beginning with the specified prefix. Conflicts with name.
region str
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention_ in_ days int
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip_ destroy bool
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags Mapping[str, str]
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
deletion Protection Enabled Boolean
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms Key Id String
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log Group Class String
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name String
The name of the log group. If omitted, this provider will assign a random, unique name.
name Prefix String
Creates a unique name beginning with the specified prefix. Conflicts with name.
region String
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention In Days Number
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip Destroy Boolean
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags Map<String>
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

All input properties are implicitly available as output properties. Additionally, the LogGroup resource produces the following output properties:

Arn string
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
Id string
The provider-assigned unique ID for this managed resource.
Tags All Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
Arn string
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
Id string
The provider-assigned unique ID for this managed resource.
Tags All map[string]string
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn string
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
id string
The provider-assigned unique ID for this managed resource.
tags_ all map(string)
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn String
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
id String
The provider-assigned unique ID for this managed resource.
tags All Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn string
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
id string
The provider-assigned unique ID for this managed resource.
tags All {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn str
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
id str
The provider-assigned unique ID for this managed resource.
tags_ all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn String
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
id String
The provider-assigned unique ID for this managed resource.
tags All Map<String>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Look up Existing LogGroup Resource

Get an existing LogGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        deletion_protection_enabled: Optional[bool] = None,
        kms_key_id: Optional[str] = None,
        log_group_class: Optional[str] = None,
        name: Optional[str] = None,
        name_prefix: Optional[str] = None,
        region: Optional[str] = None,
        retention_in_days: Optional[int] = None,
        skip_destroy: Optional[bool] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> LogGroup
public static LogGroup get(String name, Output<String> id, LogGroupState state, CustomResourceOptions options)
resources:  _:    type: aws:cloudwatch:LogGroup    get:      id: ${id}
import {
  to = aws_cloudwatch_log_group.example
  id = "${id}"
}
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
Deletion Protection Enabled bool
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
Kms Key Id string
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
Log Group Class string
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
Name string
The name of the log group. If omitted, this provider will assign a random, unique name.
Name Prefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
Region string
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Retention In Days int
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
Skip Destroy bool
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
Tags Dictionary<string, string>
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags All Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
Arn string
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
Deletion Protection Enabled bool
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
Kms Key Id string
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
Log Group Class string
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
Name string
The name of the log group. If omitted, this provider will assign a random, unique name.
Name Prefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
Region string
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Retention In Days int
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
Skip Destroy bool
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
Tags map[string]string
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags All map[string]string
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn string
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
deletion_ protection_ enabled bool
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms_ key_ id string
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log_ group_ class string
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name string
The name of the log group. If omitted, this provider will assign a random, unique name.
name_ prefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
region string
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention_ in_ days number
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip_ destroy bool
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags map(string)
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_ all map(string)
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn String
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
deletion Protection Enabled Boolean
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms Key Id String
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log Group Class String
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name String
The name of the log group. If omitted, this provider will assign a random, unique name.
name Prefix String
Creates a unique name beginning with the specified prefix. Conflicts with name.
region String
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention In Days Integer
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip Destroy Boolean
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags Map<String,String>
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags All Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn string
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
deletion Protection Enabled boolean
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms Key Id string
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log Group Class string
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name string
The name of the log group. If omitted, this provider will assign a random, unique name.
name Prefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
region string
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention In Days number
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip Destroy boolean
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags {[key: string]: string}
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags All {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn str
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
deletion_ protection_ enabled bool
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms_ key_ id str
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log_ group_ class str
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name str
The name of the log group. If omitted, this provider will assign a random, unique name.
name_ prefix str
Creates a unique name beginning with the specified prefix. Conflicts with name.
region str
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention_ in_ days int
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip_ destroy bool
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags Mapping[str, str]
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_ all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
arn String
The Amazon Resource Name (ARN) specifying the log group. Any :* suffix added by the API, denoting all CloudWatch Log Streams under the CloudWatch Log Group, is removed for greater compatibility with other AWS services that do not accept the suffix.
deletion Protection Enabled Boolean
Boolean to indicate whether deletion protection is enabled. Defaults to false. Once set, switching to false requires explicitly specifying false rather than removing this argument.
kms Key Id String
The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested.
log Group Class String
Specified the log class of the log group. Possible values are: STANDARD, INFREQUENT_ACCESS, or DELIVERY.
name String
The name of the log group. If omitted, this provider will assign a random, unique name.
name Prefix String
Creates a unique name beginning with the specified prefix. Conflicts with name.
region String
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
retention In Days Number
Specifies the number of days you want to retain 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. If logGroupClass is set to DELIVERY, this argument is ignored and retentionInDays is forcibly set to 2.
skip Destroy Boolean
Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
tags Map<String>
A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags All Map<String>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

Identity Schema

Required

  • name (String) Name of the CloudWatch log group.

Optional

  • accountId (String) AWS Account where this resource is managed.
  • region (String) Region where this resource is managed.

Using pulumi import, import Cloudwatch Log Groups using the name. For example:

$ pulumi import aws:cloudwatch/logGroup:LogGroup example yada

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.

Read the original on pulumi.com ↗