AWS Classic
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/v5/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Output.of(CloudwatchFunctions.getLogGroup(GetLogGroupArgs.builder()
.name("MyImportantLogs")
.build()));
}
}
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",
}));
variables:
example:
Fn::Invoke:
Function: aws:cloudwatch:getLogGroup
Arguments:
name: MyImportantLogs
Using getLogGroup
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLogGroup(args: GetLogGroupArgs, opts?: InvokeOptions): Promise<GetLogGroupResult>
function getLogGroupOutput(args: GetLogGroupOutputArgs, opts?: InvokeOptions): Output<GetLogGroupResult>
def get_log_group(name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetLogGroupResult
def get_log_group_output(name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLogGroupResult]
func LookupLogGroup(ctx *Context, args *LookupLogGroupArgs, opts ...InvokeOption) (*LookupLogGroupResult, error)
func LookupLogGroupOutput(ctx *Context, args *LookupLogGroupOutputArgs, opts ...InvokeOption) LookupLogGroupResultOutput
> Note: This function is named LookupLogGroup
in the Go SDK.
public static class GetLogGroup
{
public static Task<GetLogGroupResult> InvokeAsync(GetLogGroupArgs args, InvokeOptions? opts = null)
public static Output<GetLogGroupResult> Invoke(GetLogGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLogGroupResult> getLogGroup(GetLogGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: aws:cloudwatch/getLogGroup:getLogGroup
Arguments:
# Arguments dictionary
The following arguments are supported:
- Name string
The name of the Cloudwatch log group
- Dictionary<string, string>
A map of tags to assign to the resource.
- Name string
The name of the Cloudwatch log group
- map[string]string
A map of tags to assign to the resource.
- name String
The name of the Cloudwatch log group
- Map<String,String>
A map of tags to assign to the resource.
- name string
The name of the Cloudwatch log group
- {[key: string]: string}
A map of tags to assign to the resource.
- name str
The name of the Cloudwatch log group
- Mapping[str, str]
A map of tags to assign to the resource.
- name String
The name of the Cloudwatch log group
- Map<String>
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. 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.- 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. 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.- 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. 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.- creation
Time Integer 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 IntegerDays 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. 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.- 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. 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.- 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 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_ intdays The number of days log events retained in the specified log group.
- Mapping[str, str]
A map of tags to assign to the resource.
- arn String
The ARN of the Cloudwatch 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.- 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.
- Map<String>
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.