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
LookupLogGroupin the Go SDK.
public static class GetLogGroup {
public static Task<GetLogGroupResult> InvokeAsync(GetLogGroupArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetLogGroup Result
The following output properties are available:
- Arn string
The ARN of the Cloudwatch log group
- Creation
Time 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.
- Kms
Key stringId The ARN of the KMS Key to use when encrypting log data.
- Name string
- Retention
In intDays The number of days log events retained in the specified log group.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Arn string
The ARN of the Cloudwatch log group
- Creation
Time 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.
- Kms
Key stringId The ARN of the KMS Key to use when encrypting log data.
- Name string
- Retention
In intDays The number of days log events retained in the specified log group.
- map[string]string
A map of tags to assign to the resource.
- arn string
The ARN of the Cloudwatch log group
- creation
Time 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.
- kms
Key stringId The ARN of the KMS Key to use when encrypting log data.
- name string
- retention
In numberDays The number of days log events retained in the specified log group.
- {[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_ strid The ARN of the KMS Key to use when encrypting log data.
- name str
- retention_
in_ floatdays The number of days log events retained in the specified log group.
- 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
awsTerraform Provider.