Try AWS Native preview for resources not in the classic version.
aws.cloudwatch.LogGroup
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a CloudWatch Log Group resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const yada = new aws.cloudwatch.LogGroup("yada", {
name: "Yada",
tags: {
Environment: "production",
Application: "serviceA",
},
});
import pulumi
import pulumi_aws as aws
yada = aws.cloudwatch.LogGroup("yada",
name="Yada",
tags={
"Environment": "production",
"Application": "serviceA",
})
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.NewLogGroup(ctx, "yada", &cloudwatch.LogGroupArgs{
Name: pulumi.String("Yada"),
Tags: pulumi.StringMap{
"Environment": pulumi.String("production"),
"Application": pulumi.String("serviceA"),
},
})
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 yada = new Aws.CloudWatch.LogGroup("yada", new()
{
Name = "Yada",
Tags =
{
{ "Environment", "production" },
{ "Application", "serviceA" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.LogGroup;
import com.pulumi.aws.cloudwatch.LogGroupArgs;
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) {
var yada = new LogGroup("yada", LogGroupArgs.builder()
.name("Yada")
.tags(Map.ofEntries(
Map.entry("Environment", "production"),
Map.entry("Application", "serviceA")
))
.build());
}
}
resources:
yada:
type: aws:cloudwatch:LogGroup
properties:
name: Yada
tags:
Environment: production
Application: serviceA
Create LogGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogGroup(name: string, args?: LogGroupArgs, opts?: CustomResourceOptions);
@overload
def LogGroup(resource_name: str,
args: Optional[LogGroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def LogGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
kms_key_id: Optional[str] = None,
log_group_class: Optional[str] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
retention_in_days: Optional[int] = None,
skip_destroy: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None)
func NewLogGroup(ctx *Context, name string, args *LogGroupArgs, opts ...ResourceOption) (*LogGroup, error)
public LogGroup(string name, LogGroupArgs? args = null, CustomResourceOptions? opts = null)
public LogGroup(String name, LogGroupArgs args)
public LogGroup(String name, LogGroupArgs args, CustomResourceOptions options)
type: aws:cloudwatch:LogGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args LogGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args LogGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args LogGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var logGroupResource = new Aws.CloudWatch.LogGroup("logGroupResource", new()
{
KmsKeyId = "string",
LogGroupClass = "string",
Name = "string",
NamePrefix = "string",
RetentionInDays = 0,
SkipDestroy = false,
Tags =
{
{ "string", "string" },
},
});
example, err := cloudwatch.NewLogGroup(ctx, "logGroupResource", &cloudwatch.LogGroupArgs{
KmsKeyId: pulumi.String("string"),
LogGroupClass: pulumi.String("string"),
Name: pulumi.String("string"),
NamePrefix: pulumi.String("string"),
RetentionInDays: pulumi.Int(0),
SkipDestroy: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var logGroupResource = new LogGroup("logGroupResource", LogGroupArgs.builder()
.kmsKeyId("string")
.logGroupClass("string")
.name("string")
.namePrefix("string")
.retentionInDays(0)
.skipDestroy(false)
.tags(Map.of("string", "string"))
.build());
log_group_resource = aws.cloudwatch.LogGroup("logGroupResource",
kms_key_id="string",
log_group_class="string",
name="string",
name_prefix="string",
retention_in_days=0,
skip_destroy=False,
tags={
"string": "string",
})
const logGroupResource = new aws.cloudwatch.LogGroup("logGroupResource", {
kmsKeyId: "string",
logGroupClass: "string",
name: "string",
namePrefix: "string",
retentionInDays: 0,
skipDestroy: false,
tags: {
string: "string",
},
});
type: aws:cloudwatch:LogGroup
properties:
kmsKeyId: string
logGroupClass: string
name: string
namePrefix: string
retentionInDays: 0
skipDestroy: false
tags:
string: string
LogGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The LogGroup resource accepts the following input properties:
- Kms
Key stringId - 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.
- Log
Group stringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - Name string
- The name of the log group. If omitted, this provider will assign a random, unique name.
- Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Retention
In intDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- Skip
Destroy bool - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- Dictionary<string, string>
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Kms
Key stringId - 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.
- Log
Group stringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - Name string
- The name of the log group. If omitted, this provider will assign a random, unique name.
- Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Retention
In intDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- Skip
Destroy bool - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- map[string]string
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- kms
Key StringId - 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.
- log
Group StringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - name String
- The name of the log group. If omitted, this provider will assign a random, unique name.
- name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - retention
In IntegerDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- skip
Destroy Boolean - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- Map<String,String>
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- kms
Key stringId - 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.
- log
Group stringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - name string
- The name of the log group. If omitted, this provider will assign a random, unique name.
- name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - retention
In numberDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- skip
Destroy boolean - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- {[key: string]: string}
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- kms_
key_ strid - 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.
- log_
group_ strclass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - name str
- The name of the log group. If omitted, this provider will assign a random, unique name.
- name_
prefix str - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - retention_
in_ intdays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- skip_
destroy bool - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- Mapping[str, str]
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- kms
Key StringId - 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.
- log
Group StringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - name String
- The name of the log group. If omitted, this provider will assign a random, unique name.
- name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - retention
In NumberDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- skip
Destroy Boolean - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- Map<String>
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the LogGroup resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) specifying the 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. - Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The Amazon Resource Name (ARN) specifying the 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. - Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The Amazon Resource Name (ARN) specifying the 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. - id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The Amazon Resource Name (ARN) specifying the 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. - id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The Amazon Resource Name (ARN) specifying the 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. - id str
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The Amazon Resource Name (ARN) specifying the 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. - id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing LogGroup Resource
Get an existing LogGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: LogGroupState, opts?: CustomResourceOptions): LogGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
kms_key_id: Optional[str] = None,
log_group_class: Optional[str] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
retention_in_days: Optional[int] = None,
skip_destroy: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> LogGroup
func GetLogGroup(ctx *Context, name string, id IDInput, state *LogGroupState, opts ...ResourceOption) (*LogGroup, error)
public static LogGroup Get(string name, Input<string> id, LogGroupState? state, CustomResourceOptions? opts = null)
public static LogGroup get(String name, Output<String> id, LogGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- The Amazon Resource Name (ARN) specifying the 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. - Kms
Key stringId - 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.
- Log
Group stringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - Name string
- The name of the log group. If omitted, this provider will assign a random, unique name.
- Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Retention
In intDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- Skip
Destroy bool - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- Dictionary<string, string>
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The Amazon Resource Name (ARN) specifying the 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. - Kms
Key stringId - 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.
- Log
Group stringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - Name string
- The name of the log group. If omitted, this provider will assign a random, unique name.
- Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Retention
In intDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- Skip
Destroy bool - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- map[string]string
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The Amazon Resource Name (ARN) specifying the 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. - kms
Key StringId - 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.
- log
Group StringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - name String
- The name of the log group. If omitted, this provider will assign a random, unique name.
- name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - retention
In IntegerDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- skip
Destroy Boolean - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- Map<String,String>
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The Amazon Resource Name (ARN) specifying the 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. - kms
Key stringId - 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.
- log
Group stringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - name string
- The name of the log group. If omitted, this provider will assign a random, unique name.
- name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - retention
In numberDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- skip
Destroy boolean - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- {[key: string]: string}
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The Amazon Resource Name (ARN) specifying the 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. - kms_
key_ strid - 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.
- log_
group_ strclass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - name str
- The name of the log group. If omitted, this provider will assign a random, unique name.
- name_
prefix str - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - retention_
in_ intdays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- skip_
destroy bool - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- Mapping[str, str]
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The Amazon Resource Name (ARN) specifying the 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. - kms
Key StringId - 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.
- log
Group StringClass - Specified the log class of the log group. Possible values are:
STANDARD
orINFREQUENT_ACCESS
. - name String
- The name of the log group. If omitted, this provider will assign a random, unique name.
- name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - retention
In NumberDays - 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, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
- skip
Destroy Boolean - Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the state.
- Map<String>
- A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Import
Using pulumi import
, import Cloudwatch Log Groups using the name
. For example:
$ pulumi import aws:cloudwatch/logGroup:LogGroup test_group yada
To learn more about importing existing cloud resources, see Importing resources.
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.