Show / Hide Table of Contents

Class CfnLogGroup

The AWS::Logs::LogGroup resource specifies a log group.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnLogGroup
Implements
IInspectable
ITaggable
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLogGroup : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnLogGroup Inherits CfnResource Implements IInspectable, ITaggable
Remarks

A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

    CloudformationResource: AWS::Logs::LogGroup

    ExampleMetadata: fixture=_generated

    Examples
    // The code below shows an example of how to instantiate this type.
                 // The values are placeholders you should change.
                 using Amazon.CDK.AWS.Logs;
    
                 var dataProtectionPolicy;
                 var fieldIndexPolicies;
    
                 var cfnLogGroup = new CfnLogGroup(this, "MyCfnLogGroup", new CfnLogGroupProps {
                     DataProtectionPolicy = dataProtectionPolicy,
                     FieldIndexPolicies = new [] { fieldIndexPolicies },
                     KmsKeyId = "kmsKeyId",
                     LogGroupClass = "logGroupClass",
                     LogGroupName = "logGroupName",
                     RetentionInDays = 123,
                     Tags = new [] { new CfnTag {
                         Key = "key",
                         Value = "value"
                     } }
                 });

    Synopsis

    Constructors

    CfnLogGroup(Construct, string, ICfnLogGroupProps?)

    The AWS::Logs::LogGroup resource specifies a log group.

    Properties

    AttrArn

    The ARN of the log group, such as arn:aws:logs:us-west-1:123456789012:log-group:/mystack-testgroup-12ABC1AB12A1:*.

    CFN_RESOURCE_TYPE_NAME

    The CloudFormation resource type name for this resource class.

    CfnProperties

    The AWS::Logs::LogGroup resource specifies a log group.

    DataProtectionPolicy

    Creates a data protection policy and assigns it to the log group.

    FieldIndexPolicies

    Creates or updates a field index policy for the specified log group.

    KmsKeyId

    The Amazon Resource Name (ARN) of the AWS KMS key to use when encrypting log data.

    LogGroupClass

    Specifies the log group class for this log group.

    LogGroupName

    The name of the log group.

    RetentionInDays

    The number of days to retain the log events in the specified log group.

    Tags

    Tag Manager which manages the tags for this resource.

    TagsRaw

    An array of key-value pairs to apply to the log group.

    Methods

    Inspect(TreeInspector)

    Examines the CloudFormation resource and discloses attributes.

    RenderProperties(IDictionary<string, object>)

    The AWS::Logs::LogGroup resource specifies a log group.

    Constructors

    CfnLogGroup(Construct, string, ICfnLogGroupProps?)

    The AWS::Logs::LogGroup resource specifies a log group.

    public CfnLogGroup(Construct scope, string id, ICfnLogGroupProps? props = null)
    Parameters
    scope Construct

    Scope in which this resource is defined.

    id string

    Construct identifier for this resource (unique in its scope).

    props ICfnLogGroupProps

    Resource properties.

    Remarks

    A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

    You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

      CloudformationResource: AWS::Logs::LogGroup

      ExampleMetadata: fixture=_generated

      Properties

      AttrArn

      The ARN of the log group, such as arn:aws:logs:us-west-1:123456789012:log-group:/mystack-testgroup-12ABC1AB12A1:*.

      public virtual string AttrArn { get; }
      Property Value

      string

      Remarks

      CloudformationAttribute: Arn

      CFN_RESOURCE_TYPE_NAME

      The CloudFormation resource type name for this resource class.

      public static string CFN_RESOURCE_TYPE_NAME { get; }
      Property Value

      string

      Remarks

      A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

      You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

        See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

        CloudformationResource: AWS::Logs::LogGroup

        ExampleMetadata: fixture=_generated

        CfnProperties

        The AWS::Logs::LogGroup resource specifies a log group.

        protected override IDictionary<string, object> CfnProperties { get; }
        Property Value

        IDictionary<string, object>

        Overrides
        CfnResource.CfnProperties
        Remarks

        A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

        You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

          See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

          CloudformationResource: AWS::Logs::LogGroup

          ExampleMetadata: fixture=_generated

          DataProtectionPolicy

          Creates a data protection policy and assigns it to the log group.

          public virtual object? DataProtectionPolicy { get; set; }
          Property Value

          object

          Remarks

          A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

          You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

            See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

            CloudformationResource: AWS::Logs::LogGroup

            ExampleMetadata: fixture=_generated

            FieldIndexPolicies

            Creates or updates a field index policy for the specified log group.

            public virtual object? FieldIndexPolicies { get; set; }
            Property Value

            object

            Remarks

            A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

            You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

              See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

              CloudformationResource: AWS::Logs::LogGroup

              ExampleMetadata: fixture=_generated

              KmsKeyId

              The Amazon Resource Name (ARN) of the AWS KMS key to use when encrypting log data.

              public virtual string? KmsKeyId { get; set; }
              Property Value

              string

              Remarks

              A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

              You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

                See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

                CloudformationResource: AWS::Logs::LogGroup

                ExampleMetadata: fixture=_generated

                LogGroupClass

                Specifies the log group class for this log group.

                public virtual string? LogGroupClass { get; set; }
                Property Value

                string

                Remarks

                There are two classes:.

                LogGroupName

                The name of the log group.

                public virtual string? LogGroupName { get; set; }
                Property Value

                string

                Remarks

                A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

                You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

                  See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

                  CloudformationResource: AWS::Logs::LogGroup

                  ExampleMetadata: fixture=_generated

                  RetentionInDays

                  The number of days to retain the log events in the specified log group.

                  public virtual double? RetentionInDays { get; set; }
                  Property Value

                  double?

                  Remarks

                  A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

                  You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

                    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

                    CloudformationResource: AWS::Logs::LogGroup

                    ExampleMetadata: fixture=_generated

                    Tags

                    Tag Manager which manages the tags for this resource.

                    public virtual TagManager Tags { get; }
                    Property Value

                    TagManager

                    Remarks

                    A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

                    You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

                      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

                      CloudformationResource: AWS::Logs::LogGroup

                      ExampleMetadata: fixture=_generated

                      TagsRaw

                      An array of key-value pairs to apply to the log group.

                      public virtual ICfnTag[]? TagsRaw { get; set; }
                      Property Value

                      ICfnTag[]

                      Remarks

                      A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

                      You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

                        See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

                        CloudformationResource: AWS::Logs::LogGroup

                        ExampleMetadata: fixture=_generated

                        Methods

                        Inspect(TreeInspector)

                        Examines the CloudFormation resource and discloses attributes.

                        public virtual void Inspect(TreeInspector inspector)
                        Parameters
                        inspector TreeInspector

                        tree inspector to collect and process attributes.

                        Remarks

                        A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

                        You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

                          See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

                          CloudformationResource: AWS::Logs::LogGroup

                          ExampleMetadata: fixture=_generated

                          RenderProperties(IDictionary<string, object>)

                          The AWS::Logs::LogGroup resource specifies a log group.

                          protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
                          Parameters
                          props IDictionary<string, object>
                          Returns

                          IDictionary<string, object>

                          Overrides
                          CfnResource.RenderProperties(IDictionary<string, object>)
                          Remarks

                          A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.

                          You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:

                            See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

                            CloudformationResource: AWS::Logs::LogGroup

                            ExampleMetadata: fixture=_generated

                            Implements

                            IInspectable
                            ITaggable
                            Back to top Generated by DocFX