Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
aws.cloudwatch.getLogGroup
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
Use this data source to get information about an AWS Cloudwatch Log Group
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.cloudwatch.getLogGroup({
name: "MyImportantLogs",
});
import pulumi
import pulumi_aws as aws
example = aws.cloudwatch.get_log_group(name="MyImportantLogs")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.CloudWatch.GetLogGroup.Invoke(new()
{
Name = "MyImportantLogs",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.CloudwatchFunctions;
import com.pulumi.aws.cloudwatch.inputs.GetLogGroupArgs;
import java.util.List;
import java.util.ArrayList;
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) {
final var example = CloudwatchFunctions.getLogGroup(GetLogGroupArgs.builder()
.name("MyImportantLogs")
.build());
}
}
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
- Name of the Cloudwatch log group
- Dictionary<string, string>
- Map of tags to assign to the resource.
- Name string
- Name of the Cloudwatch log group
- map[string]string
- Map of tags to assign to the resource.
- name String
- Name of the Cloudwatch log group
- Map<String,String>
- Map of tags to assign to the resource.
- name string
- Name of the Cloudwatch log group
- {[key: string]: string}
- Map of tags to assign to the resource.
- name str
- Name of the Cloudwatch log group
- Mapping[str, str]
- Map of tags to assign to the resource.
- name String
- Name of the Cloudwatch log group
- Map<String>
- Map of tags to assign to the resource.
getLogGroup Result
The following output properties are available:
- Arn string
- 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 - 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 - ARN of the KMS Key to use when encrypting log data.
- Log
Group stringClass - The log class of the log group.
- Name string
- Retention
In intDays - Number of days log events retained in the specified log group.
- Dictionary<string, string>
- Map of tags to assign to the resource.
- Arn string
- 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 - 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 - ARN of the KMS Key to use when encrypting log data.
- Log
Group stringClass - The log class of the log group.
- Name string
- Retention
In intDays - Number of days log events retained in the specified log group.
- map[string]string
- Map of tags to assign to the resource.
- arn String
- 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 - 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 - ARN of the KMS Key to use when encrypting log data.
- log
Group StringClass - The log class of the log group.
- name String
- retention
In IntegerDays - Number of days log events retained in the specified log group.
- Map<String,String>
- Map of tags to assign to the resource.
- arn string
- 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 - 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 - ARN of the KMS Key to use when encrypting log data.
- log
Group stringClass - The log class of the log group.
- name string
- retention
In numberDays - Number of days log events retained in the specified log group.
- {[key: string]: string}
- Map of tags to assign to the resource.
- arn str
- 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 - 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 - ARN of the KMS Key to use when encrypting log data.
- log_
group_ strclass - The log class of the log group.
- name str
- retention_
in_ intdays - Number of days log events retained in the specified log group.
- Mapping[str, str]
- Map of tags to assign to the resource.
- arn String
- 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 - 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 - ARN of the KMS Key to use when encrypting log data.
- log
Group StringClass - The log class of the log group.
- name String
- retention
In NumberDays - Number of days log events retained in the specified log group.
- Map<String>
- Map of tags to assign to the resource.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi