CfnLogGroupPropsMixin

class aws_cdk.mixins_preview.aws_logs.mixins.CfnLogGroupPropsMixin(props, *, strategy=None)

Bases: Mixin

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

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:

  • Log group names must be unique within a Region for an AWS account.

  • Log group names can be between 1 and 512 characters long.

  • Log group names consist of the following characters: a-z, A-Z, 0-9, ‘_’ (underscore), ‘-’ (hyphen), ‘/’ (forward slash), and ‘.’ (period).

See:

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

CloudformationResource:

AWS::Logs::LogGroup

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins

# data_protection_policy: Any
# field_index_policies: Any
# resource_policy_document: Any

cfn_log_group_props_mixin = logs_mixins.CfnLogGroupPropsMixin(logs_mixins.CfnLogGroupMixinProps(
    data_protection_policy=data_protection_policy,
    field_index_policies=[field_index_policies],
    kms_key_id="kmsKeyId",
    log_group_class="logGroupClass",
    log_group_name="logGroupName",
    resource_policy_document=resource_policy_document,
    retention_in_days=123,
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Logs::LogGroup.

Parameters:
  • props (Union[CfnLogGroupMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['dataProtectionPolicy', 'fieldIndexPolicies', 'kmsKeyId', 'logGroupClass', 'logGroupName', 'resourcePolicyDocument', 'retentionInDays', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental