Show / Hide Table of Contents

Class LogGroup

Provides a CloudWatch Log Group resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var yada = new Aws.CloudWatch.LogGroup("yada", new Aws.CloudWatch.LogGroupArgs
    {
        Tags = 
        {
            { "Application", "serviceA" },
            { "Environment", "production" },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
LogGroup
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.CloudWatch
Assembly: Pulumi.Aws.dll
Syntax
public class LogGroup : CustomResource

Constructors

View Source

LogGroup(String, LogGroupArgs, CustomResourceOptions)

Create a LogGroup resource with the given unique name, arguments, and options.

Declaration
public LogGroup(string name, LogGroupArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

LogGroupArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The Amazon Resource Name (ARN) specifying the log group.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

KmsKeyId

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.

Declaration
public Output<string> KmsKeyId { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the log group. If omitted, this provider will assign a random, unique name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NamePrefix

Creates a unique name beginning with the specified prefix. Conflicts with name.

Declaration
public Output<string> NamePrefix { get; }
Property Value
Type Description
Output<System.String>
View Source

RetentionInDays

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, 1827, and 3653.

Declaration
public Output<int?> RetentionInDays { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Tags

A map of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>

Methods

View Source

Get(String, Input<String>, LogGroupState, CustomResourceOptions)

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

Declaration
public static LogGroup Get(string name, Input<string> id, LogGroupState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

LogGroupState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
LogGroup
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.