GetLogGroup

Use this data source to get information about an AWS Cloudwatch Log Group

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.CloudWatch.GetLogGroup.InvokeAsync(new Aws.CloudWatch.GetLogGroupArgs
        {
            Name = "MyImportantLogs",
        }));
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudwatch.LookupLogGroup(ctx, &cloudwatch.LookupLogGroupArgs{
            Name: "MyImportantLogs",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.cloudwatch.get_log_group(name="MyImportantLogs")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.cloudwatch.getLogGroup({
    name: "MyImportantLogs",
}, { async: true }));

Using GetLogGroup

function getLogGroup(args: GetLogGroupArgs, opts?: InvokeOptions): Promise<GetLogGroupResult>
function  get_log_group(name=None, tags=None, opts=None)
func LookupLogGroup(ctx *Context, args *LookupLogGroupArgs, opts ...InvokeOption) (*LookupLogGroupResult, error)

Note: This function is named LookupLogGroup in the Go SDK.

public static class GetLogGroup {
    public static Task<GetLogGroupResult> InvokeAsync(GetLogGroupArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Cloudwatch log group

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Name string

The name of the Cloudwatch log group

Tags map[string]string

A map of tags to assign to the resource.

name string

The name of the Cloudwatch log group

tags {[key: string]: string}

A map of tags to assign to the resource.

name str

The name of the Cloudwatch log group

tags Dict[str, str]

A map of tags to assign to the resource.

GetLogGroup Result

The following output properties are available:

Arn string

The ARN of the Cloudwatch log group

CreationTime int

The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

Id string

The provider-assigned unique ID for this managed resource.

KmsKeyId string

The ARN of the KMS Key to use when encrypting log data.

Name string
RetentionInDays int

The number of days log events retained in the specified log group.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Arn string

The ARN of the Cloudwatch log group

CreationTime int

The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

Id string

The provider-assigned unique ID for this managed resource.

KmsKeyId string

The ARN of the KMS Key to use when encrypting log data.

Name string
RetentionInDays int

The number of days log events retained in the specified log group.

Tags map[string]string

A map of tags to assign to the resource.

arn string

The ARN of the Cloudwatch log group

creationTime number

The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

id string

The provider-assigned unique ID for this managed resource.

kmsKeyId string

The ARN of the KMS Key to use when encrypting log data.

name string
retentionInDays number

The number of days log events retained in the specified log group.

tags {[key: string]: string}

A map of tags to assign to the resource.

arn str

The ARN of the Cloudwatch log group

creation_time float

The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

id str

The provider-assigned unique ID for this managed resource.

kms_key_id str

The ARN of the KMS Key to use when encrypting log data.

name str
retention_in_days float

The number of days log events retained in the specified log group.

tags Dict[str, str]

A map of tags to assign to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.