Learn Idem

Learn Idem

Powered by Idem Project

aws.cloudwatch.log_group

**Autogenerated function**

Deletes the specified cloudwatch log group.

Args:
    name(Text): The log Group name.
    resource_id(Text, optional): AWS CloudWatch Log Group Name Prefix. Idem automatically considers this resource
     being absent if this field is not specified.

Returns:
    Dict[str, Any]

Examples:

    .. code-block:: sls

        resource_is_absent:
          aws.cloudwatch.log_group.absent:
            - name: value
**Autogenerated function**

Describe the resource in a way that can be recreated/managed with the corresponding "present" function


Returns a list of cloudwatch log group descriptions. If a log group name is specified, the list contains only
the description of that group.


Returns:
    Dict[str, Any]

Examples:

    .. code-block:: bash

        $ idem describe aws.cloudwatch.log_group
**Autogenerated function**

Creates a log group if it does not already exist. You can create up to 5000 log groups 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).
If you associate a AWS Key Management Service (AWS KMS) customer master key (CMK) with the log group, ingested data is encrypted using the CMK.
This association is stored as long as the data encrypted with the CMK is still within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs
to decrypt this data whenever it is requested.
If you attempt to associate a CMK with the log group but the CMK does not exist or the CMK is disabled, you will receive an InvalidParameterException error.

Args:
    name(Text): An Idem name of the resource.
    resource_id(Text, optional): AWS CloudWatch Log Group Name Prefix
    kms_key_id(Text, optional): The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
    tags(Dict, optional): The key-value pairs to use for the tags. CloudWatch Logs doesn’t support IAM policies that
        prevent users from assigning specified tags to log groups using the aws:Resource/key-name  or
        aws:TagKeys condition keys. For more information about using tags to control access, see
        Controlling access to Amazon Web Services resources using tags. Defaults to None.
    retention_in_days(int, optional): The number of days to retain the 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, 1827, and 3653

Request Syntax:
    [log_group_name]:
      aws.cloudwatch.log_group.present:
      - name: 'string'
      - kms_key_id: 'string'
      - tags:
        - 'string': 'string'

Returns:
    Dict[str, Any]

Examples:

    .. code-block:: sls

        resource_is_present:
          aws.cloudwatch.log_group.present:
            - name: value
            - tags:
                 TestKey4: TestValue4
            - kms_key_id: "arn:aws:kms:us-east-1:xxxxxxxxx:key/xxxx-9500-xxxxx"

Full plugin documentation is available on the Idem documentation site - aws.cloudwatch.log_group .

Last updated on 20 Sep 2022
 Edit on GitHub