

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# CloudWatch Logs
<a name="AWS_Logs"></a>

**Resource types**
+ [AWS::Logs::AccountPolicy](aws-resource-logs-accountpolicy.md)
+ [AWS::Logs::Delivery](aws-resource-logs-delivery.md)
+ [AWS::Logs::DeliveryDestination](aws-resource-logs-deliverydestination.md)
+ [AWS::Logs::DeliverySource](aws-resource-logs-deliverysource.md)
+ [AWS::Logs::Destination](aws-resource-logs-destination.md)
+ [AWS::Logs::Integration](aws-resource-logs-integration.md)
+ [AWS::Logs::LogAnomalyDetector](aws-resource-logs-loganomalydetector.md)
+ [AWS::Logs::LogGroup](aws-resource-logs-loggroup.md)
+ [AWS::Logs::LogStream](aws-resource-logs-logstream.md)
+ [AWS::Logs::MetricFilter](aws-resource-logs-metricfilter.md)
+ [AWS::Logs::QueryDefinition](aws-resource-logs-querydefinition.md)
+ [AWS::Logs::ResourcePolicy](aws-resource-logs-resourcepolicy.md)
+ [AWS::Logs::ScheduledQuery](aws-resource-logs-scheduledquery.md)
+ [AWS::Logs::SubscriptionFilter](aws-resource-logs-subscriptionfilter.md)
+ [AWS::Logs::Transformer](aws-resource-logs-transformer.md)

# AWS::Logs::AccountPolicy
<a name="aws-resource-logs-accountpolicy"></a>

Creates or updates an account-level data protection policy or subscription filter policy that applies to all log groups or a subset of log groups in the account.

 **Data protection policy** 

A data protection policy can help safeguard sensitive data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only one account-level data protection policy.

**Important**  
Sensitive data is detected and masked when it is ingested into a log group. When you set a data protection policy, log events ingested into the log groups before that time are not masked.

If you create a data protection policy for your whole account, it applies to both existing log groups and all log groups that are created later in this account. The account policy is applied to existing log groups with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked.

By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the `logs:Unmask` permission can use a [GetLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) or [FilterLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) operation with the `unmask` parameter set to `true` to view the unmasked log events. Users with the `logs:Unmask` can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the `unmask` query command.

For more information, including a list of types of data that can be audited and masked, see [Protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html).

To create an account-level policy, you must be signed on with the `logs:PutDataProtectionPolicy` and `logs:PutAccountPolicy` permissions.

An account-level policy applies to all log groups in the account. You can also create a data protection policy that applies to just one log group. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked.

 **Subscription filter policy** 

A subscription filter policy sets up a real-time feed of log events from CloudWatch Logs to other AWS services. Account-level subscription filter policies apply to both existing log groups and log groups that are created later in this account. Supported destinations are Kinesis Data Streams, Firehose, and Lambda. When log events are sent to the receiving service, they are Base64 encoded and compressed with the GZIP format.

The following destinations are supported for subscription filters:
+ An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.
+ An Firehose data stream in the same account as the subscription policy, for same-account delivery.
+ A Lambda function in the same account as the subscription policy, for same-account delivery.
+ A logical destination in a different account created with [PutDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html), for cross-account delivery. Kinesis Data Streams and Firehose are supported as logical destinations.

Each account can have one account-level subscription filter policy. If you are updating an existing filter, you must specify the correct name in `PolicyName`. To perform a `PutAccountPolicy` subscription filter operation for any destination except a Lambda function, you must also have the `iam:PassRole` permission.

 **Field index policy** 

You can use field index policies to create indexes on fields found in log events in the log group. Creating field indexes lowers the scan volume for CloudWatch Logs Insights queries that reference those fields, because these queries attempt to skip the processing of log events that are known to not match the indexed field. Good fields to index are fields that you often need to query for. Common examples of indexes include request ID, session ID, user IDs, or instance IDs. For more information, see [Create field indexes to improve query performance and reduce costs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing.html)

For example, suppose you have created a field index for `requestId`. Then, any CloudWatch Logs Insights query on that log group that includes `requestId = value` or `requestId IN [value, value, ...]` will attempt to process only the log events where the indexed field matches the specified value.

Matches of log events to the names of indexed fields are case-sensitive. For example, an indexed field of `RequestId` won't match a log event containing `requestId`.

You can have one account-level field index policy that applies to all log groups in the account. Or you can create as many as 20 account-level field index policies that are each scoped to a subset of log groups with the `SelectionCriteria` parameter. If you have multiple account-level index policies with selection criteria, no two of them can use the same or overlapping log group name prefixes. For example, if you have one policy filtered to log groups that start with `my-log`, you can't have another field index policy filtered to `my-logpprod` or `my-logging`.

 **Transformer policy** 

A *log transformer policy* transforms ingested log events into a different format, making them easier for you to process and analyze. You can also transform logs from different sources into standardized formats that contain relevant, source-specific information. After you have created a transformer, CloudWatch Logs performs this transformation at the time of log ingestion. You can then refer to the transformed versions of the logs during operations such as querying with CloudWatch Logs Insights or creating metric filters or subscription filters.

You can also use a transformer to copy metadata from metadata keys into the log events themselves. This metadata can include log group name, log stream name, account ID and Region.

A transformer for a log group is a series of processors, where each processor applies one type of transformation to the log events ingested into this log group. For more information about the available processors to use in a transformer, see [ Processors that you can use](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-Processors).

Having log events in standardized format enables visibility across your applications for your log analysis, reporting, and alarming needs. CloudWatch Logs provides transformation for common log types with out-of-the-box transformation templates for major AWS log sources such as VPC flow logs, Lambda, and Amazon RDS. You can use pre-built transformation templates or create custom transformation policies.

You can create transformers only for the log groups in the Standard log class.

You can have one account-level transformer policy that applies to all log groups in the account. Or you can create as many as 20 account-level transformer policies that are each scoped to a subset of log groups with the `selectionCriteria` parameter. If you have multiple account-level transformer policies with selection criteria, no two of them can use the same or overlapping log group name prefixes. For example, if you have one policy filtered to log groups that start with `my-log`, you can't have another field index policy filtered to `my-logpprod` or `my-logging`.

You can also set up a transformer at the log-group level. For more information, see [AWS::Logs::Transformer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-transformer.html). If there is both a log-group level transformer created with `PutTransformer` and an account-level transformer that could apply to the same log group, the log group uses only the log-group level transformer. It ignores the account-level transformer.

## Syntax
<a name="aws-resource-logs-accountpolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-accountpolicy-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::AccountPolicy",
  "Properties" : {
      "[PolicyDocument](#cfn-logs-accountpolicy-policydocument)" : String,
      "[PolicyName](#cfn-logs-accountpolicy-policyname)" : String,
      "[PolicyType](#cfn-logs-accountpolicy-policytype)" : String,
      "[Scope](#cfn-logs-accountpolicy-scope)" : String,
      "[SelectionCriteria](#cfn-logs-accountpolicy-selectioncriteria)" : String
    }
}
```

### YAML
<a name="aws-resource-logs-accountpolicy-syntax.yaml"></a>

```
Type: AWS::Logs::AccountPolicy
Properties:
  [PolicyDocument](#cfn-logs-accountpolicy-policydocument): String
  [PolicyName](#cfn-logs-accountpolicy-policyname): String
  [PolicyType](#cfn-logs-accountpolicy-policytype): String
  [Scope](#cfn-logs-accountpolicy-scope): String
  [SelectionCriteria](#cfn-logs-accountpolicy-selectioncriteria): String
```

## Properties
<a name="aws-resource-logs-accountpolicy-properties"></a>

`PolicyDocument`  <a name="cfn-logs-accountpolicy-policydocument"></a>
Specify the policy, in JSON.  
 **Data protection policy**   
A data protection policy must include two JSON blocks:  
+ The first block must include both a `DataIdentifer` array and an `Operation` property with an `Audit` action. The `DataIdentifer` array lists the types of sensitive data that you want to mask. For more information about the available options, see [Types of data that you can mask](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html).

  The `Operation` property with an `Audit` action is required to find the sensitive data terms. This `Audit` action must contain a `FindingsDestination` object. You can optionally use that `FindingsDestination` object to list one or more destinations to send audit findings to. If you specify destinations such as log groups, Firehose streams, and S3 buckets, they must already exist.
+ The second block must include both a `DataIdentifer` array and an `Operation` property with an `Deidentify` action. The `DataIdentifer` array must exactly match the `DataIdentifer` array in the first block of the policy.

  The `Operation` property with the `Deidentify` action is what actually masks the data, and it must contain the ` "MaskConfig": {}` object. The ` "MaskConfig": {}` object must be empty.
The contents of the two `DataIdentifer` arrays must match exactly.
In addition to the two JSON blocks, the `policyDocument` can also include `Name`, `Description`, and `Version` fields. The `Name` is different than the operation's `policyName` parameter, and is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch.  
The JSON specified in `policyDocument` can be up to 30,720 characters long.  
 **Subscription filter policy**   
A subscription filter policy can include the following attributes in a JSON block:  
+ **DestinationArn** The ARN of the destination to deliver log events to. Supported destinations are:
  + An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.
  + An Firehose data stream in the same account as the subscription policy, for same-account delivery.
  + A Lambda function in the same account as the subscription policy, for same-account delivery.
  + A logical destination in a different account created with [PutDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html), for cross-account delivery. Kinesis Data Streams and Firehose are supported as logical destinations.
+ **RoleArn** The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
+ **FilterPattern** A filter pattern for subscribing to a filtered stream of log events.
+ **Distribution**The method used to distribute log data to the destination. By default, log data is grouped by log stream, but the grouping can be set to `Random` for a more even distribution. This property is only applicable when the destination is an Kinesis Data Streams data stream.
 **Field index policy**   
A field index filter policy can include the following attribute in a JSON block:  
+ **Fields** The array of field indexes to create.
The following is an example of an index policy document that creates two indexes, `RequestId` and `TransactionId`.  
 `"policyDocument": "{ \"Fields\": [ \"RequestId\", \"TransactionId\" ] }"`   
 **Transformer policy**   
A transformer policy must include one JSON block with the array of processors and their configurations. For more information about available processors, see [ Processors that you can use](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-Processors).   
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `30720`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PolicyName`  <a name="cfn-logs-accountpolicy-policyname"></a>
A name for the policy. This must be unique within the account.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[^:*]{1,256}$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PolicyType`  <a name="cfn-logs-accountpolicy-policytype"></a>
The type of policy that you're creating or updating.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `DATA_PROTECTION_POLICY | SUBSCRIPTION_FILTER_POLICY | FIELD_INDEX_POLICY | TRANSFORMER_POLICY | METRIC_EXTRACTION_POLICY`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Scope`  <a name="cfn-logs-accountpolicy-scope"></a>
Currently the only valid value for this parameter is `ALL`, which specifies that the policy applies to all log groups in the account. If you omit this parameter, the default of `ALL` is used. To scope down a subscription filter policy to a subset of log groups, use the `SelectionCriteria` parameter.  
*Required*: No  
*Type*: String  
*Allowed values*: `ALL`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SelectionCriteria`  <a name="cfn-logs-accountpolicy-selectioncriteria"></a>
Use this parameter to apply the new policy to a subset of log groups in the account.  
You need to specify `SelectionCriteria` only when you specify `SUBSCRIPTION_FILTER_POLICY`, `FIELD_INDEX_POLICY` or `TRANSFORMER_POLICY`for `PolicyType`.  
If `PolicyType` is `SUBSCRIPTION_FILTER_POLICY`, the only supported `SelectionCriteria` filter is `LogGroupName NOT IN []`  
If `PolicyType` is `FIELD_INDEX_POLICY` or `TRANSFORMER_POLICY`, the only supported `SelectionCriteria` filter is `LogGroupNamePrefix`  
The `SelectionCriteria` string can be up to 25KB in length. The length is determined by using its UTF-8 bytes.  
Using the `SelectionCriteria` parameter with `SUBSCRIPTION_FILTER_POLICY` is useful to help prevent infinite loops. For more information, see [Log recursion prevention](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Subscriptions-recursion-prevention.html).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-accountpolicy-return-values"></a>

### Fn::GetAtt
<a name="aws-resource-logs-accountpolicy-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-logs-accountpolicy-return-values-fn--getatt-fn--getatt"></a>

`AccountId`  <a name="AccountId-fn::getatt"></a>
The account ID of the account where this policy was created. For example, `123456789012`.

## Examples
<a name="aws-resource-logs-accountpolicy--examples"></a>



**Topics**
+ [Create an account-level field index policy](#aws-resource-logs-accountpolicy--examples--Create_an_account-level_field_index_policy)
+ [Create an account-level data protection policy](#aws-resource-logs-accountpolicy--examples--Create_an_account-level_data_protection_policy)
+ [Create an account-level subscription filter policy](#aws-resource-logs-accountpolicy--examples--Create_an_account-level_subscription_filter_policy)

### Create an account-level field index policy
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_field_index_policy"></a>

The following example creates an account-level field index policy that creates an index on the `RequestId` and `TransactionId` fields for log groups with names with the `/aws/` prefix.

#### JSON
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_field_index_policy--json"></a>

```
"IndexingAccountPolicy": {
    "Type": "AWS::Logs::AccountPolicy", 
    "Properties": {
        "PolicyName": "test-fieldindexing-policy",
        "PolicyDocument": "{\"Fields\": [\"RequestId\", \"TransactionId\"]}",
        "SelectionCriteria": "LogGroupNamePrefix=\"/aws/\"",            
        "PolicyType": "FIELD_INDEX_POLICY",                
        "Scope": "ALL"
      }    
 }
```

#### YAML
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_field_index_policy--yaml"></a>

```
IndexingAccountPolicy:
  Type: AWS::Logs::AccountPolicy
    Properties:
      PolicyName: "test-fieldindexing-policy"
      PolicyDocument: "{\"Fields\": [\"RequestId\", \"TransactionId\"]}"
      SelectionCriteria: "LogGroupNamePrefix = \"/aws/\""
      PolicyType: "FIELD_INDEX_POLICY"
      Scope: "ALL"
```

### Create an account-level data protection policy
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_data_protection_policy"></a>

The following example creates an account-level data protection policy that finds and masks email addresses in log events. It also sends audit findings to the `EXISTING_LOG_GROUP_NAME` log group in CloudWatch Logs.

#### JSON
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_data_protection_policy--json"></a>

```
{
    "Resources": {
        "AccountPolicy": {
            "Type": "AWS::Logs::AccountPolicy",
            "Properties": {
                "PolicyName": "TestPolicy",
                "PolicyDocument": "{ \"Name\": \"data-protection-policy\", \"Description\": \"\", \"Version\": \"2021-06-01\", \"Statement\": [ { \"Sid\": \"audit-policy\", \"DataIdentifier\": [ \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\" ], \"Operation\": { \"Audit\": { \"FindingsDestination\": { \"CloudWatchLogs\": { \"LogGroup\": \"EXISTING_LOG_GROUP_NAME\" } } } } }, { \"Sid\": \"redact-policy\", \"DataIdentifier\": [ \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\" ], \"Operation\": { \"Deidentify\": { \"MaskConfig\": {} } } } ] }",
                "PolicyType": "DATA_PROTECTION_POLICY",
                "Scope": "ALL"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_data_protection_policy--yaml"></a>

```
Resources:
  AccountPolicy:
    Type: AWS::Logs::AccountPolicy
    Properties:
      PolicyName: "TestPolicy"
      PolicyDocument: '{
        "Name": "data-protection-policy",
        "Description": "",
        "Version": "2021-06-01",
        "Statement": [
          {
            "Sid": "audit-policy",
            "DataIdentifier": [
              "arn:aws:dataprotection::aws:data-identifier/EmailAddress"
            ],
            "Operation": {
              "Audit": {
                "FindingsDestination": {
                  "CloudWatchLogs": {
                    "LogGroup": "EXISTING_LOG_GROUP_NAME"
                  }
                }
              }
            }
          },
          {
            "Sid": "redact-policy",
            "DataIdentifier": [
              "arn:aws:dataprotection::aws:data-identifier/EmailAddress"
            ],
            "Operation": {
              "Deidentify": {
                "MaskConfig": {}
              }
            }
          }
        ]
      }'
      PolicyType: "DATA_PROTECTION_POLICY"
      Scope: "ALL"
```

### Create an account-level subscription filter policy
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_subscription_filter_policy"></a>

The following example creates an account-level subscription filter policy that forwards the log events matching the `FilterPattern` from all the log groups in an account to the specified ak Kinesis Data Streams stream. It forwards the log events from all the log groups except the ones that are specified in the `SelectionCriteria` field. 

#### JSON
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_subscription_filter_policy--json"></a>

```
{
    "Resources": {
        "AccountPolicy": {
            "Type": "AWS::Logs::AccountPolicy",
            "Properties": {
                "PolicyName": "test-subscriptionfilter-policy",
                "PolicyDocument": {
                    "Fn::Sub": "{\"RoleArn\":\"arn:${AWS::Partition}:iam::${AWS::AccountId}:role/MyCWLtoKinesisRole\", \"DestinationArn\":\"arn:${AWS::Partition}:kinesis:${AWS::Region}:${AWS::AccountId}:stream/MyKinesisStream\", \"FilterPattern\": \"Test\", \"Distribution\": \"Random\"}"
                },
                "SelectionCriteria": {
                    "Fn::Sub": "LogGroupName NOT IN [\"MyLogGroup\", \"MyAnotherLogGroup\"]"
                },
                "PolicyType": "SUBSCRIPTION_FILTER_POLICY",
                "Scope": "ALL"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-logs-accountpolicy--examples--Create_an_account-level_subscription_filter_policy--yaml"></a>

```
Resources:
  AccountPolicy:
    Type: AWS::Logs::AccountPolicy
    Properties:
      PolicyName: test-subscriptionfilter-policy
      PolicyDocument: !Sub "{\"RoleArn\":\"arn:${AWS::Partition}:iam::${AWS::AccountId}:role/MyCWLtoKinesisRole\", \"DestinationArn\":\"arn:${AWS::Partition}:kinesis:${AWS::Region}:${AWS::AccountId}:stream/MyKinesisStream\", \"FilterPattern\": \"Test\", \"Distribution\": \"Random\"}"
      SelectionCriteria: !Sub "LogGroupName NOT IN [\"MyLogGroup\", \"MyAnotherLogGroup\"]"
      PolicyType: "SUBSCRIPTION_FILTER_POLICY"
      Scope: "ALL"
```

# AWS::Logs::Delivery
<a name="aws-resource-logs-delivery"></a>

This structure contains information about one *delivery* in your account. 

A delivery is a connection between a logical *delivery source* and a logical *delivery destination*.

For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html).

To update an existing delivery configuration, use [UpdateDeliveryConfiguration](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateDeliveryConfiguration.html).

## Syntax
<a name="aws-resource-logs-delivery-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-delivery-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::Delivery",
  "Properties" : {
      "[DeliveryDestinationArn](#cfn-logs-delivery-deliverydestinationarn)" : String,
      "[DeliverySourceName](#cfn-logs-delivery-deliverysourcename)" : String,
      "[FieldDelimiter](#cfn-logs-delivery-fielddelimiter)" : String,
      "[RecordFields](#cfn-logs-delivery-recordfields)" : [ String, ... ],
      "[S3EnableHiveCompatiblePath](#cfn-logs-delivery-s3enablehivecompatiblepath)" : Boolean,
      "[S3SuffixPath](#cfn-logs-delivery-s3suffixpath)" : String,
      "[Tags](#cfn-logs-delivery-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-logs-delivery-syntax.yaml"></a>

```
Type: AWS::Logs::Delivery
Properties:
  [DeliveryDestinationArn](#cfn-logs-delivery-deliverydestinationarn): String
  [DeliverySourceName](#cfn-logs-delivery-deliverysourcename): String
  [FieldDelimiter](#cfn-logs-delivery-fielddelimiter): String
  [RecordFields](#cfn-logs-delivery-recordfields): 
    - String
  [S3EnableHiveCompatiblePath](#cfn-logs-delivery-s3enablehivecompatiblepath): Boolean
  [S3SuffixPath](#cfn-logs-delivery-s3suffixpath): String
  [Tags](#cfn-logs-delivery-tags): 
    - Tag
```

## Properties
<a name="aws-resource-logs-delivery-properties"></a>

`DeliveryDestinationArn`  <a name="cfn-logs-delivery-deliverydestinationarn"></a>
The ARN of the delivery destination that is associated with this delivery.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w#+=/:,.@-]*\*?`  
*Minimum*: `16`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DeliverySourceName`  <a name="cfn-logs-delivery-deliverysourcename"></a>
The name of the delivery source that is associated with this delivery.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]*$`  
*Minimum*: `1`  
*Maximum*: `60`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FieldDelimiter`  <a name="cfn-logs-delivery-fielddelimiter"></a>
The field delimiter that is used between record fields when the final output format of a delivery is in `Plain`, `W3C`, or `Raw` format.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RecordFields`  <a name="cfn-logs-delivery-recordfields"></a>
The list of record fields to be delivered to the destination, in order. If the delivery's log source has mandatory fields, they must be included in this list.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3EnableHiveCompatiblePath`  <a name="cfn-logs-delivery-s3enablehivecompatiblepath"></a>
Use this parameter to cause the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3SuffixPath`  <a name="cfn-logs-delivery-s3suffixpath"></a>
Use this to reconfigure the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source. To find the values supported for the suffix path for each log source, use the [DescribeConfigurationTemplates](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeConfigurationTemplates.html) operation and check the `allowedSuffixPathFields` field in the response.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-logs-delivery-tags"></a>
An array of key-value pairs to apply to the delivery.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-logs-delivery-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-delivery-return-values"></a>

### Ref
<a name="aws-resource-logs-delivery-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-logs-delivery-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-logs-delivery-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) that uniquely identifies this delivery.

`DeliveryDestinationType`  <a name="DeliveryDestinationType-fn::getatt"></a>
Displays whether the delivery destination associated with this delivery is CloudWatch Logs, Amazon S3, or Firehose.

`DeliveryId`  <a name="DeliveryId-fn::getatt"></a>
The unique ID that identifies this delivery in your account.

# AWS::Logs::Delivery Tag
<a name="aws-properties-logs-delivery-tag"></a>

One key-value pair to apply to the delivery.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-logs-delivery-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-delivery-tag-syntax.json"></a>

```
{
  "[Key](#cfn-logs-delivery-tag-key)" : String,
  "[Value](#cfn-logs-delivery-tag-value)" : String
}
```

### YAML
<a name="aws-properties-logs-delivery-tag-syntax.yaml"></a>

```
  [Key](#cfn-logs-delivery-tag-key): String
  [Value](#cfn-logs-delivery-tag-value): String
```

## Properties
<a name="aws-properties-logs-delivery-tag-properties"></a>

`Key`  <a name="cfn-logs-delivery-tag-key"></a>
The key of this key-value pair.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-logs-delivery-tag-value"></a>
The value of this key-value pair.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::DeliveryDestination
<a name="aws-resource-logs-deliverydestination"></a>

This structure contains information about one *delivery destination* in your account. A delivery destination is an AWS resource that represents an AWS service that logs can be sent to. CloudWatch Logs, Amazon S3, Firehose, and X-Ray are supported as delivery destinations.

To configure logs delivery between a supported AWS service and a destination, you must do the following:
+ Create a delivery source, which is a logical object that represents the resource that is actually sending the logs. For more information, see [PutDeliverySource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html).
+ Create a *delivery destination*, which is a logical object that represents the actual delivery destination. 
+ If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html) in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination. 
+ Create a *delivery* by pairing exactly one delivery source and one delivery destination. For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html).

You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

## Syntax
<a name="aws-resource-logs-deliverydestination-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-deliverydestination-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::DeliveryDestination",
  "Properties" : {
      "[DeliveryDestinationPolicy](#cfn-logs-deliverydestination-deliverydestinationpolicy)" : DestinationPolicy,
      "[DeliveryDestinationType](#cfn-logs-deliverydestination-deliverydestinationtype)" : String,
      "[DestinationResourceArn](#cfn-logs-deliverydestination-destinationresourcearn)" : String,
      "[Name](#cfn-logs-deliverydestination-name)" : String,
      "[OutputFormat](#cfn-logs-deliverydestination-outputformat)" : String,
      "[Tags](#cfn-logs-deliverydestination-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-logs-deliverydestination-syntax.yaml"></a>

```
Type: AWS::Logs::DeliveryDestination
Properties:
  [DeliveryDestinationPolicy](#cfn-logs-deliverydestination-deliverydestinationpolicy): 
    DestinationPolicy
  [DeliveryDestinationType](#cfn-logs-deliverydestination-deliverydestinationtype): String
  [DestinationResourceArn](#cfn-logs-deliverydestination-destinationresourcearn): String
  [Name](#cfn-logs-deliverydestination-name): String
  [OutputFormat](#cfn-logs-deliverydestination-outputformat): String
  [Tags](#cfn-logs-deliverydestination-tags): 
    - Tag
```

## Properties
<a name="aws-resource-logs-deliverydestination-properties"></a>

`DeliveryDestinationPolicy`  <a name="cfn-logs-deliverydestination-deliverydestinationpolicy"></a>
An IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account. For examples of this policy, see [Examples](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html#API_PutDeliveryDestinationPolicy_Examples) in the CloudWatch Logs API Reference.  
*Required*: No  
*Type*: [DestinationPolicy](aws-properties-logs-deliverydestination-destinationpolicy.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeliveryDestinationType`  <a name="cfn-logs-deliverydestination-deliverydestinationtype"></a>
Displays whether this delivery destination is CloudWatch Logs, Amazon S3, Firehose, or X-Ray.  
*Required*: No  
*Type*: String  
*Pattern*: `^[0-9A-Za-z]+$`  
*Minimum*: `1`  
*Maximum*: `12`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DestinationResourceArn`  <a name="cfn-logs-deliverydestination-destinationresourcearn"></a>
The ARN of the AWS destination that this delivery destination represents. That AWS destination can be a log group in CloudWatch Logs, an Amazon S3 bucket, or a Firehose stream.  
*Required*: No  
*Type*: String  
*Pattern*: `[\w#+=/:,.@-]*\*?`  
*Minimum*: `16`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-logs-deliverydestination-name"></a>
The name of this delivery destination.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]*$`  
*Minimum*: `1`  
*Maximum*: `60`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OutputFormat`  <a name="cfn-logs-deliverydestination-outputformat"></a>
The format of the logs that are sent to this delivery destination.   
*Required*: No  
*Type*: String  
*Pattern*: `^[0-9A-Za-z]+$`  
*Minimum*: `1`  
*Maximum*: `12`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-logs-deliverydestination-tags"></a>
An array of key-value pairs to apply to the delivery destination.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-logs-deliverydestination-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-deliverydestination-return-values"></a>

### Ref
<a name="aws-resource-logs-deliverydestination-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-logs-deliverydestination-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-logs-deliverydestination-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) that uniquely identifies this delivery destination.

# AWS::Logs::DeliveryDestination DestinationPolicy
<a name="aws-properties-logs-deliverydestination-destinationpolicy"></a>

An IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account.

## Syntax
<a name="aws-properties-logs-deliverydestination-destinationpolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-deliverydestination-destinationpolicy-syntax.json"></a>

```
{
  "[DeliveryDestinationName](#cfn-logs-deliverydestination-destinationpolicy-deliverydestinationname)" : String,
  "[DeliveryDestinationPolicy](#cfn-logs-deliverydestination-destinationpolicy-deliverydestinationpolicy)" : Json
}
```

### YAML
<a name="aws-properties-logs-deliverydestination-destinationpolicy-syntax.yaml"></a>

```
  [DeliveryDestinationName](#cfn-logs-deliverydestination-destinationpolicy-deliverydestinationname): String
  [DeliveryDestinationPolicy](#cfn-logs-deliverydestination-destinationpolicy-deliverydestinationpolicy): Json
```

## Properties
<a name="aws-properties-logs-deliverydestination-destinationpolicy-properties"></a>

`DeliveryDestinationName`  <a name="cfn-logs-deliverydestination-destinationpolicy-deliverydestinationname"></a>
A name for an existing destination.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `60`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeliveryDestinationPolicy`  <a name="cfn-logs-deliverydestination-destinationpolicy-deliverydestinationpolicy"></a>
Creates or updates an access policy associated with an existing destination. An access policy is an [IAM policy document](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) that is used to authorize claims to register a subscription filter against a given destination.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::DeliveryDestination Tag
<a name="aws-properties-logs-deliverydestination-tag"></a>

One key-value pair to apply to the delivery destination.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-logs-deliverydestination-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-deliverydestination-tag-syntax.json"></a>

```
{
  "[Key](#cfn-logs-deliverydestination-tag-key)" : String,
  "[Value](#cfn-logs-deliverydestination-tag-value)" : String
}
```

### YAML
<a name="aws-properties-logs-deliverydestination-tag-syntax.yaml"></a>

```
  [Key](#cfn-logs-deliverydestination-tag-key): String
  [Value](#cfn-logs-deliverydestination-tag-value): String
```

## Properties
<a name="aws-properties-logs-deliverydestination-tag-properties"></a>

`Key`  <a name="cfn-logs-deliverydestination-tag-key"></a>
The key of this key-value pair.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-logs-deliverydestination-tag-value"></a>
The value of this key-value pair.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::DeliverySource
<a name="aws-resource-logs-deliverysource"></a>

Creates or updates one *delivery source* in your account. A delivery source is an AWS resource that sends logs to an AWS destination. The destination can be CloudWatch Logs, Amazon S3, or Firehose.

Only some AWS services support being configured as a delivery source. These services are listed as **Supported [V2 Permissions]** in the table at [Enabling logging from AWS services.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html)

To configure logs delivery between a supported AWS service and a destination, you must do the following:
+ Create a delivery source, which is a logical object that represents the resource that is actually sending the logs.
+ Create a *delivery destination*, which is a logical object that represents the actual delivery destination. For more information, see [AWS::Logs::DeliveryDestination](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-deliverydestination.html) or [PutDeliveryDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html).
+ Create a *delivery* by pairing exactly one delivery source and one delivery destination. For more information, see [AWS::Logs::Delivery](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-delivery.html) or [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html).

You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

## Syntax
<a name="aws-resource-logs-deliverysource-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-deliverysource-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::DeliverySource",
  "Properties" : {
      "[LogType](#cfn-logs-deliverysource-logtype)" : String,
      "[Name](#cfn-logs-deliverysource-name)" : String,
      "[ResourceArn](#cfn-logs-deliverysource-resourcearn)" : String,
      "[Tags](#cfn-logs-deliverysource-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-logs-deliverysource-syntax.yaml"></a>

```
Type: AWS::Logs::DeliverySource
Properties:
  [LogType](#cfn-logs-deliverysource-logtype): String
  [Name](#cfn-logs-deliverysource-name): String
  [ResourceArn](#cfn-logs-deliverysource-resourcearn): String
  [Tags](#cfn-logs-deliverysource-tags): 
    - Tag
```

## Properties
<a name="aws-resource-logs-deliverysource-properties"></a>

`LogType`  <a name="cfn-logs-deliverysource-logtype"></a>
The type of log that the source is sending. For valid values for this parameter, see the documentation for the source service.  
*Required*: No  
*Type*: String  
*Pattern*: `[\w-]*$`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-logs-deliverysource-name"></a>
The unique name of the delivery source.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]*$`  
*Minimum*: `1`  
*Maximum*: `60`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceArn`  <a name="cfn-logs-deliverysource-resourcearn"></a>
The ARN of the AWS resource that is generating and sending logs. For example, `arn:aws:workmail:us-east-1:123456789012:organization/m-1234EXAMPLEabcd1234abcd1234abcd1234`  
*Required*: No  
*Type*: String  
*Pattern*: `[\w#+=/:,.@-]*\*?`  
*Minimum*: `16`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-logs-deliverysource-tags"></a>
An array of key-value pairs to apply to the delivery source.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-logs-deliverysource-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-deliverysource-return-values"></a>

### Ref
<a name="aws-resource-logs-deliverysource-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-logs-deliverysource-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-logs-deliverysource-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) that uniquely identifies this delivery source.

`ResourceArns`  <a name="ResourceArns-fn::getatt"></a>
This array contains the ARN of the AWS resource that sends logs and is represented by this delivery source. Currently, only one ARN can be in the array.

`Service`  <a name="Service-fn::getatt"></a>
The AWS service that is sending logs.

# AWS::Logs::DeliverySource Tag
<a name="aws-properties-logs-deliverysource-tag"></a>

One key-value pair to apply to the delivery source.

For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).

## Syntax
<a name="aws-properties-logs-deliverysource-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-deliverysource-tag-syntax.json"></a>

```
{
  "[Key](#cfn-logs-deliverysource-tag-key)" : String,
  "[Value](#cfn-logs-deliverysource-tag-value)" : String
}
```

### YAML
<a name="aws-properties-logs-deliverysource-tag-syntax.yaml"></a>

```
  [Key](#cfn-logs-deliverysource-tag-key): String
  [Value](#cfn-logs-deliverysource-tag-value): String
```

## Properties
<a name="aws-properties-logs-deliverysource-tag-properties"></a>

`Key`  <a name="cfn-logs-deliverysource-tag-key"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-logs-deliverysource-tag-value"></a>
The value of this key-value pair.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Destination
<a name="aws-resource-logs-destination"></a>

The AWS::Logs::Destination resource specifies a CloudWatch Logs destination. A destination encapsulates a physical resource (such as an Amazon Kinesis data stream) and enables you to subscribe that resource to a stream of log events. 

## Syntax
<a name="aws-resource-logs-destination-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-destination-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::Destination",
  "Properties" : {
      "[DestinationName](#cfn-logs-destination-destinationname)" : String,
      "[DestinationPolicy](#cfn-logs-destination-destinationpolicy)" : String,
      "[RoleArn](#cfn-logs-destination-rolearn)" : String,
      "[Tags](#cfn-logs-destination-tags)" : [ Tag, ... ],
      "[TargetArn](#cfn-logs-destination-targetarn)" : String
    }
}
```

### YAML
<a name="aws-resource-logs-destination-syntax.yaml"></a>

```
Type: AWS::Logs::Destination
Properties:
  [DestinationName](#cfn-logs-destination-destinationname): String
  [DestinationPolicy](#cfn-logs-destination-destinationpolicy): String
  [RoleArn](#cfn-logs-destination-rolearn): String
  [Tags](#cfn-logs-destination-tags): 
    - Tag
  [TargetArn](#cfn-logs-destination-targetarn): String
```

## Properties
<a name="aws-resource-logs-destination-properties"></a>

`DestinationName`  <a name="cfn-logs-destination-destinationname"></a>
The name of the destination.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[^:*]{1,512}$`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DestinationPolicy`  <a name="cfn-logs-destination-destinationpolicy"></a>
An IAM policy document that governs which AWS accounts can create subscription filters against this destination.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-logs-destination-rolearn"></a>
The ARN of an IAM role that permits CloudWatch Logs to send data to the specified AWS resource.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-logs-destination-tags"></a>
The tags that have been assigned to this delivery destination.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-logs-destination-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetArn`  <a name="cfn-logs-destination-targetarn"></a>
The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream).  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-destination-return-values"></a>

### Ref
<a name="aws-resource-logs-destination-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name, such as `TestDestination`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-logs-destination-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-logs-destination-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The ARN of the CloudWatch Logs destination, such as `arn:aws:logs:us-west-1:123456789012:destination:MyDestination`.

## Examples
<a name="aws-resource-logs-destination--examples"></a>



### Create a Destination
<a name="aws-resource-logs-destination--examples--Create_a_Destination"></a>

In the following example, the target stream (`TestStream`) can receive log events from CloudWatch Logs. CloudWatch Logs can use only the `PutSubscriptionFilter` action against the `TestDestination` destination.

#### JSON
<a name="aws-resource-logs-destination--examples--Create_a_Destination--json"></a>

```
"DestinationWithName" : {
  "Type" : "AWS::Logs::Destination",
  "Properties" : {
    "DestinationName": "TestDestination",
    "RoleArn": "arn:aws:iam::123456789012:role/LogKinesisRole",
    "TargetArn": "arn:aws:kinesis:us-east-1:123456789012:stream/TestStream",
    "DestinationPolicy": "{ \"Version\": \"2012-10-17\", \"Statement\": [{ \"Effect\": \"Allow\", \"Principal\": { \"AWS\": \"logs.amazonaws.com\"}, \"Action\": \"logs:PutSubscriptionFilter\",\"Resource\": \"arn:aws:logs:us-east-1:123456789012:destination:TestDestination\"}]}"
  }
}
```

#### YAML
<a name="aws-resource-logs-destination--examples--Create_a_Destination--yaml"></a>

```
DestinationWithName: 
  Type: AWS::Logs::Destination
  Properties: 
    DestinationName: "TestDestination"
    RoleArn: "arn:aws:iam::123456789012:role/LogKinesisRole"
    TargetArn: "arn:aws:kinesis:us-east-1:123456789012:stream/TestStream"
    DestinationPolicy: >
      {"Version" : "2012-10-17","Statement" : [{"Effect" : "Allow", "Principal" : {"AWS" : "logs.amazonaws.com"}, "Action" : "logs:PutSubscriptionFilter", "Resource" : "arn:aws:logs:us-east-1:123456789012:destination:TestDestination"}]}
```

# AWS::Logs::Destination Tag
<a name="aws-properties-logs-destination-tag"></a>

The tag value assigned to the log destination.

## Syntax
<a name="aws-properties-logs-destination-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-destination-tag-syntax.json"></a>

```
{
  "[Key](#cfn-logs-destination-tag-key)" : String,
  "[Value](#cfn-logs-destination-tag-value)" : String
}
```

### YAML
<a name="aws-properties-logs-destination-tag-syntax.yaml"></a>

```
  [Key](#cfn-logs-destination-tag-key): String
  [Value](#cfn-logs-destination-tag-value): String
```

## Properties
<a name="aws-properties-logs-destination-tag-properties"></a>

`Key`  <a name="cfn-logs-destination-tag-key"></a>
An optional list of key-value pairs to associate with the resource.  
For more information about tagging, see [Tagging AWS resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html)  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-logs-destination-tag-value"></a>
The list of tags associated with the requested resource.>  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Integration
<a name="aws-resource-logs-integration"></a>

Creates an integration between CloudWatch Logs and another service in this account. Currently, only integrations with OpenSearch Service are supported, and currently you can have only one integration in your account.

Integrating with OpenSearch Service makes it possible for you to create curated vended logs dashboards, powered by OpenSearch Service analytics. For more information, see [Vended log dashboards powered by Amazon OpenSearch Service](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-OpenSearch-Dashboards.html).

You can use this operation only to create a new integration. You can't modify an existing integration.

## Syntax
<a name="aws-resource-logs-integration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-integration-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::Integration",
  "Properties" : {
      "[IntegrationName](#cfn-logs-integration-integrationname)" : String,
      "[IntegrationType](#cfn-logs-integration-integrationtype)" : String,
      "[ResourceConfig](#cfn-logs-integration-resourceconfig)" : ResourceConfig
    }
}
```

### YAML
<a name="aws-resource-logs-integration-syntax.yaml"></a>

```
Type: AWS::Logs::Integration
Properties:
  [IntegrationName](#cfn-logs-integration-integrationname): String
  [IntegrationType](#cfn-logs-integration-integrationtype): String
  [ResourceConfig](#cfn-logs-integration-resourceconfig): 
    ResourceConfig
```

## Properties
<a name="aws-resource-logs-integration-properties"></a>

`IntegrationName`  <a name="cfn-logs-integration-integrationname"></a>
The name of this integration.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\.\-_/#A-Za-z0-9]+`  
*Minimum*: `1`  
*Maximum*: `50`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IntegrationType`  <a name="cfn-logs-integration-integrationtype"></a>
The type of integration. Integrations with OpenSearch Service have the type `OPENSEARCH`.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `OPENSEARCH`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceConfig`  <a name="cfn-logs-integration-resourceconfig"></a>
This structure contains configuration details about an integration between CloudWatch Logs and another entity.  
*Required*: Yes  
*Type*: [ResourceConfig](aws-properties-logs-integration-resourceconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-logs-integration-return-values"></a>

### Ref
<a name="aws-resource-logs-integration-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-logs-integration-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-logs-integration-return-values-fn--getatt-fn--getatt"></a>

`IntegrationStatus`  <a name="IntegrationStatus-fn::getatt"></a>
The current status of this integration.

# AWS::Logs::Integration OpenSearchResourceConfig
<a name="aws-properties-logs-integration-opensearchresourceconfig"></a>

This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.

## Syntax
<a name="aws-properties-logs-integration-opensearchresourceconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-integration-opensearchresourceconfig-syntax.json"></a>

```
{
  "[ApplicationARN](#cfn-logs-integration-opensearchresourceconfig-applicationarn)" : String,
  "[DashboardViewerPrincipals](#cfn-logs-integration-opensearchresourceconfig-dashboardviewerprincipals)" : [ String, ... ],
  "[DataSourceRoleArn](#cfn-logs-integration-opensearchresourceconfig-datasourcerolearn)" : String,
  "[KmsKeyArn](#cfn-logs-integration-opensearchresourceconfig-kmskeyarn)" : String,
  "[RetentionDays](#cfn-logs-integration-opensearchresourceconfig-retentiondays)" : Integer
}
```

### YAML
<a name="aws-properties-logs-integration-opensearchresourceconfig-syntax.yaml"></a>

```
  [ApplicationARN](#cfn-logs-integration-opensearchresourceconfig-applicationarn): String
  [DashboardViewerPrincipals](#cfn-logs-integration-opensearchresourceconfig-dashboardviewerprincipals): 
    - String
  [DataSourceRoleArn](#cfn-logs-integration-opensearchresourceconfig-datasourcerolearn): String
  [KmsKeyArn](#cfn-logs-integration-opensearchresourceconfig-kmskeyarn): String
  [RetentionDays](#cfn-logs-integration-opensearchresourceconfig-retentiondays): Integer
```

## Properties
<a name="aws-properties-logs-integration-opensearchresourceconfig-properties"></a>

`ApplicationARN`  <a name="cfn-logs-integration-opensearchresourceconfig-applicationarn"></a>
If you want to use an existing OpenSearch Service application for your integration with OpenSearch Service, specify it here. If you omit this, a new application will be created.  
*Required*: No  
*Type*: String  
*Pattern*: `[\w#+=/:,.@-]*\*?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DashboardViewerPrincipals`  <a name="cfn-logs-integration-opensearchresourceconfig-dashboardviewerprincipals"></a>
Specify the ARNs of IAM roles and IAM users who you want to grant permission to for viewing the dashboards.  
In addition to specifying these users here, you must also grant them the **CloudWatchOpenSearchDashboardAccess** IAM policy. For more information, see [IAM policies for users](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/OpenSearch-Dashboards-UserRoles.html).
*Required*: Yes  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DataSourceRoleArn`  <a name="cfn-logs-integration-opensearchresourceconfig-datasourcerolearn"></a>
Specify the ARN of an IAM role that CloudWatch Logs will use to create the integration. This role must have the permissions necessary to access the OpenSearch Service collection to be able to create the dashboards. For more information about the permissions needed, see [Permissions that the integration needs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/OpenSearch-Dashboards-CreateRole.html) in the CloudWatch Logs User Guide.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w#+=/:,.@-]*\*?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`KmsKeyArn`  <a name="cfn-logs-integration-opensearchresourceconfig-kmskeyarn"></a>
To have the vended dashboard data encrypted with AWS KMS instead of the CloudWatch Logs default encryption method, specify the ARN of the AWS KMS key that you want to use.  
*Required*: No  
*Type*: String  
*Pattern*: `[\w#+=/:,.@-]*\*?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RetentionDays`  <a name="cfn-logs-integration-opensearchresourceconfig-retentiondays"></a>
Specify how many days that you want the data derived by OpenSearch Service to be retained in the index that the dashboard refers to. This also sets the maximum time period that you can choose when viewing data in the dashboard. Choosing a longer time frame will incur additional costs.   
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `3650`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Logs::Integration ResourceConfig
<a name="aws-properties-logs-integration-resourceconfig"></a>

This structure contains configuration details about an integration between CloudWatch Logs and another entity.

## Syntax
<a name="aws-properties-logs-integration-resourceconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-integration-resourceconfig-syntax.json"></a>

```
{
  "[OpenSearchResourceConfig](#cfn-logs-integration-resourceconfig-opensearchresourceconfig)" : OpenSearchResourceConfig
}
```

### YAML
<a name="aws-properties-logs-integration-resourceconfig-syntax.yaml"></a>

```
  [OpenSearchResourceConfig](#cfn-logs-integration-resourceconfig-opensearchresourceconfig): 
    OpenSearchResourceConfig
```

## Properties
<a name="aws-properties-logs-integration-resourceconfig-properties"></a>

`OpenSearchResourceConfig`  <a name="cfn-logs-integration-resourceconfig-opensearchresourceconfig"></a>
This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.  
*Required*: No  
*Type*: [OpenSearchResourceConfig](aws-properties-logs-integration-opensearchresourceconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Logs::LogAnomalyDetector
<a name="aws-resource-logs-loganomalydetector"></a>

Creates or updates an *anomaly detector* that regularly scans one or more log groups and look for patterns and anomalies in the logs.

An anomaly detector can help surface issues by automatically discovering anomalies in your log event traffic. An anomaly detector uses machine learning algorithms to scan log events and find *patterns*. A pattern is a shared text structure that recurs among your log fields. Patterns provide a useful tool for analyzing large sets of logs because a large number of log events can often be compressed into a few patterns.

The anomaly detector uses pattern recognition to find `anomalies`, which are unusual log events. It compares current log events and patterns with trained baselines. 

Fields within a pattern are called *tokens*. Fields that vary within a pattern, such as a request ID or timestamp, are referred to as *dynamic tokens* and represented by `<*>`. 

For more information see [Log anomaly detection](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/LogsAnomalyDetection.html).

## Syntax
<a name="aws-resource-logs-loganomalydetector-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-loganomalydetector-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::LogAnomalyDetector",
  "Properties" : {
      "[AccountId](#cfn-logs-loganomalydetector-accountid)" : String,
      "[AnomalyVisibilityTime](#cfn-logs-loganomalydetector-anomalyvisibilitytime)" : Number,
      "[DetectorName](#cfn-logs-loganomalydetector-detectorname)" : String,
      "[EvaluationFrequency](#cfn-logs-loganomalydetector-evaluationfrequency)" : String,
      "[FilterPattern](#cfn-logs-loganomalydetector-filterpattern)" : String,
      "[KmsKeyId](#cfn-logs-loganomalydetector-kmskeyid)" : String,
      "[LogGroupArnList](#cfn-logs-loganomalydetector-loggrouparnlist)" : [ String, ... ]
    }
}
```

### YAML
<a name="aws-resource-logs-loganomalydetector-syntax.yaml"></a>

```
Type: AWS::Logs::LogAnomalyDetector
Properties:
  [AccountId](#cfn-logs-loganomalydetector-accountid): String
  [AnomalyVisibilityTime](#cfn-logs-loganomalydetector-anomalyvisibilitytime): Number
  [DetectorName](#cfn-logs-loganomalydetector-detectorname): String
  [EvaluationFrequency](#cfn-logs-loganomalydetector-evaluationfrequency): String
  [FilterPattern](#cfn-logs-loganomalydetector-filterpattern): String
  [KmsKeyId](#cfn-logs-loganomalydetector-kmskeyid): String
  [LogGroupArnList](#cfn-logs-loganomalydetector-loggrouparnlist): 
    - String
```

## Properties
<a name="aws-resource-logs-loganomalydetector-properties"></a>

`AccountId`  <a name="cfn-logs-loganomalydetector-accountid"></a>
The ID of the account to create the anomaly detector in.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AnomalyVisibilityTime`  <a name="cfn-logs-loganomalydetector-anomalyvisibilitytime"></a>
The number of days to have visibility on an anomaly. After this time period has elapsed for an anomaly, it will be automatically baselined and the anomaly detector will treat new occurrences of a similar anomaly as normal. Therefore, if you do not correct the cause of an anomaly during the time period specified in `AnomalyVisibilityTime`, it will be considered normal going forward and will not be detected as an anomaly.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DetectorName`  <a name="cfn-logs-loganomalydetector-detectorname"></a>
A name for this anomaly detector.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EvaluationFrequency`  <a name="cfn-logs-loganomalydetector-evaluationfrequency"></a>
Specifies how often the anomaly detector is to run and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then 15 minutes might be a good setting for `EvaluationFrequency` .  
*Required*: No  
*Type*: String  
*Allowed values*: `FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FilterPattern`  <a name="cfn-logs-loganomalydetector-filterpattern"></a>
You can use this parameter to limit the anomaly detection model to examine only log events that match the pattern you specify here. For more information, see [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyId`  <a name="cfn-logs-loganomalydetector-kmskeyid"></a>
Optionally assigns a AWS KMS key to secure this anomaly detector and its findings. If a key is assigned, the anomalies found and the model used by this detector are encrypted at rest with the key. If a key is assigned to an anomaly detector, a user must have permissions for both this key and for the anomaly detector to retrieve information about the anomalies that it finds.  
For more information about using a AWS KMS key and to see the required IAM policy, see [Use a AWS KMS key with an anomaly detector](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/LogsAnomalyDetection-KMS.html).  
*Required*: No  
*Type*: String  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogGroupArnList`  <a name="cfn-logs-loganomalydetector-loggrouparnlist"></a>
The ARN of the log group that is associated with this anomaly detector. You can specify only one log group ARN.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-loganomalydetector-return-values"></a>

### Ref
<a name="aws-resource-logs-loganomalydetector-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-logs-loganomalydetector-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-logs-loganomalydetector-return-values-fn--getatt-fn--getatt"></a>

`AnomalyDetectorArn`  <a name="AnomalyDetectorArn-fn::getatt"></a>
The ARN of the anomaly detector.

`AnomalyDetectorStatus`  <a name="AnomalyDetectorStatus-fn::getatt"></a>
Specifies whether the anomaly detector is currently active.

`CreationTimeStamp`  <a name="CreationTimeStamp-fn::getatt"></a>
The time that the anomaly detector was created.

`LastModifiedTimeStamp`  <a name="LastModifiedTimeStamp-fn::getatt"></a>
The time that the anomaly detector was most recently modified.

# AWS::Logs::LogGroup
<a name="aws-resource-logs-loggroup"></a>

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, '\$1' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).

## Syntax
<a name="aws-resource-logs-loggroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-loggroup-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::LogGroup",
  "Properties" : {
      "[BearerTokenAuthenticationEnabled](#cfn-logs-loggroup-bearertokenauthenticationenabled)" : Boolean,
      "[DataProtectionPolicy](#cfn-logs-loggroup-dataprotectionpolicy)" : Json,
      "[DeletionProtectionEnabled](#cfn-logs-loggroup-deletionprotectionenabled)" : Boolean,
      "[FieldIndexPolicies](#cfn-logs-loggroup-fieldindexpolicies)" : [ {Key: Value, ...}, ... ],
      "[KmsKeyId](#cfn-logs-loggroup-kmskeyid)" : String,
      "[LogGroupClass](#cfn-logs-loggroup-loggroupclass)" : String,
      "[LogGroupName](#cfn-logs-loggroup-loggroupname)" : String,
      "[ResourcePolicyDocument](#cfn-logs-loggroup-resourcepolicydocument)" : Json,
      "[RetentionInDays](#cfn-logs-loggroup-retentionindays)" : Integer,
      "[Tags](#cfn-logs-loggroup-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-logs-loggroup-syntax.yaml"></a>

```
Type: AWS::Logs::LogGroup
Properties:
  [BearerTokenAuthenticationEnabled](#cfn-logs-loggroup-bearertokenauthenticationenabled): Boolean
  [DataProtectionPolicy](#cfn-logs-loggroup-dataprotectionpolicy): Json
  [DeletionProtectionEnabled](#cfn-logs-loggroup-deletionprotectionenabled): Boolean
  [FieldIndexPolicies](#cfn-logs-loggroup-fieldindexpolicies): 
    - 
    Key: Value
  [KmsKeyId](#cfn-logs-loggroup-kmskeyid): String
  [LogGroupClass](#cfn-logs-loggroup-loggroupclass): String
  [LogGroupName](#cfn-logs-loggroup-loggroupname): String
  [ResourcePolicyDocument](#cfn-logs-loggroup-resourcepolicydocument): Json
  [RetentionInDays](#cfn-logs-loggroup-retentionindays): Integer
  [Tags](#cfn-logs-loggroup-tags): 
    - Tag
```

## Properties
<a name="aws-resource-logs-loggroup-properties"></a>

`BearerTokenAuthenticationEnabled`  <a name="cfn-logs-loggroup-bearertokenauthenticationenabled"></a>
Indicates whether bearer token authentication is enabled for this log group. When enabled, bearer token authentication is allowed on operations until it is explicitly disabled.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DataProtectionPolicy`  <a name="cfn-logs-loggroup-dataprotectionpolicy"></a>
Creates a data protection policy and assigns it to the log group. A data protection policy can help safeguard sensitive data that's ingested by the log group by auditing and masking the sensitive log data. When a user who does not have permission to view masked data views a log event that includes masked data, the sensitive data is replaced by asterisks.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeletionProtectionEnabled`  <a name="cfn-logs-loggroup-deletionprotectionenabled"></a>
Indicates whether deletion protection is enabled for this log group. When enabled, deletion protection blocks all deletion operations until it is explicitly disabled.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FieldIndexPolicies`  <a name="cfn-logs-loggroup-fieldindexpolicies"></a>
Creates or updates a *field index policy* for the specified log group. Only log groups in the Standard log class support field index policies. For more information about log classes, see [Log classes](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html).  
You can use field index policies to create *field indexes* on fields found in log events in the log group. Creating field indexes lowers the costs for CloudWatch Logs Insights queries that reference those field indexes, because these queries attempt to skip the processing of log events that are known to not match the indexed field. Good fields to index are fields that you often need to query for and fields that have high cardinality of values Common examples of indexes include request ID, session ID, userID, and instance IDs. For more information, see [Create field indexes to improve query performance and reduce costs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing.html).  
Currently, this array supports only one field index policy object.  
*Required*: No  
*Type*: Array of Object  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyId`  <a name="cfn-logs-loggroup-kmskeyid"></a>
The Amazon Resource Name (ARN) of the AWS KMS key to use when encrypting log data.  
To associate an AWS KMS key with the log group, specify the ARN of that KMS key here. If you do so, ingested data is encrypted using this key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested.  
If you attempt to associate a KMS key with the log group but the KMS key doesn't exist or is deactivated, you will receive an `InvalidParameterException` error.  
Log group data is always encrypted in CloudWatch Logs. If you omit this key, the encryption does not use AWS KMS. For more information, see [ Encrypt log data in CloudWatch Logs using AWS Key Management Service](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html)  
*Required*: No  
*Type*: String  
*Pattern*: `^arn:[a-z0-9-]+:kms:[a-z0-9-]+:\d{12}:(key|alias)/.+\Z`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogGroupClass`  <a name="cfn-logs-loggroup-loggroupclass"></a>
Specifies the log group class for this log group. There are two classes:  
+ The `Standard` log class supports all CloudWatch Logs features.
+ The `Infrequent Access` log class supports a subset of CloudWatch Logs features and incurs lower costs.
For details about the features supported by each class, see [Log classes](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html)  
*Required*: No  
*Type*: String  
*Allowed values*: `STANDARD | INFREQUENT_ACCESS | DELIVERY`  
*Update requires*: Updates are not supported.

`LogGroupName`  <a name="cfn-logs-loggroup-loggroupname"></a>
The name of the log group. If you don't specify a name, AWS CloudFormation generates a unique ID for the log group.  
*Required*: No  
*Type*: String  
*Pattern*: `^[.\-_/#A-Za-z0-9]{1,512}\Z`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourcePolicyDocument`  <a name="cfn-logs-loggroup-resourcepolicydocument"></a>
Creates or updates a resource policy for the specified log group that allows other services to put log events to this account. A LogGroup can have 1 resource policy.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RetentionInDays`  <a name="cfn-logs-loggroup-retentionindays"></a>
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, 1096, 1827, 2192, 2557, 2922, 3288, and 3653.  
To set a log group so that its log events do not expire, do not specify this property.   
*Required*: No  
*Type*: Integer  
*Allowed values*: `1 | 3 | 5 | 7 | 14 | 30 | 60 | 90 | 120 | 150 | 180 | 365 | 400 | 545 | 731 | 1096 | 1827 | 2192 | 2557 | 2922 | 3288 | 3653`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-logs-loggroup-tags"></a>
An array of key-value pairs to apply to the log group.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-logs-loggroup-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-loggroup-return-values"></a>

### Ref
<a name="aws-resource-logs-loggroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-logs-loggroup-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-logs-loggroup-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The ARN of the log group, such as `arn:aws:logs:us-west-1:123456789012:log-group:/mystack-testgroup-12ABC1AB12A1:*`

## Examples
<a name="aws-resource-logs-loggroup--examples"></a>



**Topics**
+ [Create a log group](#aws-resource-logs-loggroup--examples--Create_a_log_group)
+ [Create a log group with a data protection policy](#aws-resource-logs-loggroup--examples--Create_a_log_group_with_a_data_protection_policy)
+ [Create a log group with a field index policy](#aws-resource-logs-loggroup--examples--Create_a_log_group_with_a_field_index_policy)

### Create a log group
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group"></a>

The following example creates a log group that retains events for seven days.

#### JSON
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group--json"></a>

```
"myLogGroup": {
    "Type": "AWS::Logs::LogGroup",
    "Properties": {
        "RetentionInDays": 7
    }
}
```

#### YAML
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group--yaml"></a>

```
myLogGroup: 
  Type: AWS::Logs::LogGroup
  Properties: 
    RetentionInDays: 7
```

### Create a log group with a data protection policy
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group_with_a_data_protection_policy"></a>

The following example creates a log group that uses a data protection policy to mask email addresses, and send audit findings to CloudWatch Logs, Firehose, and Amazon S3.

#### JSON
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group_with_a_data_protection_policy--json"></a>

```
"TestLogGroupDescription": {
  "Type": "AWS::Logs::LogGroup",
  "Properties": {
      "LogGroupName": "my-log-group",
      "DataProtectionPolicy": {
          "Name": "data-protection-policy",
          "Description": "test description",
          "Version": "2021-06-01",
          "Statement": [{
                  "Sid": "audit-policy test",
                  "DataIdentifier": [
                      "arn:aws:dataprotection::aws:data-identifier/EmailAddress",
                      "arn:aws:dataprotection::aws:data-identifier/DriversLicense-US"
                  ],
                  "Operation": {
                      "Audit": {
                          "FindingsDestination": {
                              "CloudWatchLogs": {
                                  "LogGroup": "EXISTING_LOG_GROUP_IN_YOUR_ACCOUNT"
                              },
                              "Firehose": {
                                  "DeliveryStream": "EXISTING_STREAM_IN_YOUR_ACCOUNT"
                              },
                              "S3": {
                                  "Bucket": "EXISTING_BUCKET"
                              }
                          }
                      }
                  }
              },
              {
                  "Sid": "redact-policy",
                  "DataIdentifier": [
                      "arn:aws:dataprotection::aws:data-identifier/EmailAddress",
                      "arn:aws:dataprotection::aws:data-identifier/DriversLicense-US"
                  ],
                  "Operation": {
                      "Deidentify": {
                          "MaskConfig": {}
                      }
                  }
              }
          ]
      }
  }
}
```

#### YAML
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group_with_a_data_protection_policy--yaml"></a>

```
TestLogGroupDescription:
  Type: AWS::Logs::LogGroup
  Properties:
    LogGroupName: my-log-group
    DataProtectionPolicy:
      Name: data-protection-policy
      Description: test description
      Version: '2021-06-01'
      Statement:
      - Sid: audit-policy test
        DataIdentifier:
        - arn:aws:dataprotection::aws:data-identifier/EmailAddress
        - arn:aws:dataprotection::aws:data-identifier/DriversLicense-US
        Operation:
          Audit:
            FindingsDestination:
              CloudWatchLogs:
                LogGroup: EXISTING_LOG_GROUP_IN_YOUR_ACCOUNT
              Firehose:
                DeliveryStream: EXISTING_STREAM_IN_YOUR_ACCOUNT
              S3:
                Bucket: EXISTING_BUCKET
      - Sid: redact-policy
        DataIdentifier:
        - arn:aws:dataprotection::aws:data-identifier/EmailAddress
        - arn:aws:dataprotection::aws:data-identifier/DriversLicense-US
        Operation:
          Deidentify:
            MaskConfig: {}
```

### Create a log group with a field index policy
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group_with_a_field_index_policy"></a>

The following example creates a log group that uses a field index policy to index the `RequestId` and `TransactionId` fields in log events.

#### JSON
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group_with_a_field_index_policy--json"></a>

```
"TestFieldIndexingLogGroup": {
    "Type": "AWS::Logs::LogGroup", 
    "Properties": {
        "LogGroupName": "my-log-group",
        "FieldIndexPolicies": [{
            "Fields": [
                "RequestId",
                "TransactionId"
            ]
        }]
    }
}
```

#### YAML
<a name="aws-resource-logs-loggroup--examples--Create_a_log_group_with_a_field_index_policy--yaml"></a>

```
TestFieldIndexingLogGroup:
  Type: AWS::Logs::LogGroup
  Properties:
    LogGroupName: my-log-group
    FieldIndexPolicies:
        - Fields:
            - RequestId
            - TransactionId
```

# AWS::Logs::LogGroup Tag
<a name="aws-properties-logs-loggroup-tag"></a>

<a name="aws-properties-logs-loggroup-tag-description"></a>The `Tag` property type specifies Property description not available. for an [AWS::Logs::LogGroup](aws-resource-logs-loggroup.md).

## Syntax
<a name="aws-properties-logs-loggroup-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-loggroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-logs-loggroup-tag-key)" : String,
  "[Value](#cfn-logs-loggroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-logs-loggroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-logs-loggroup-tag-key): String
  [Value](#cfn-logs-loggroup-tag-value): String
```

## Properties
<a name="aws-properties-logs-loggroup-tag-properties"></a>

`Key`  <a name="cfn-logs-loggroup-tag-key"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-logs-loggroup-tag-value"></a>
The value of this key-value pair.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::LogStream
<a name="aws-resource-logs-logstream"></a>

The `AWS::Logs::LogStream` resource specifies an Amazon CloudWatch Logs log stream in a specific log group. A log stream represents the sequence of events coming from an application instance or resource that you are monitoring.

There is no limit on the number of log streams that you can create for a log group.

You must use the following guidelines when naming a log stream:
+ Log stream names must be unique within the log group.
+ Log stream names can be between 1 and 512 characters long.
+ The ':' (colon) and '\$1' (asterisk) characters are not allowed.

## Syntax
<a name="aws-resource-logs-logstream-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-logstream-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::LogStream",
  "Properties" : {
      "[LogGroupName](#cfn-logs-logstream-loggroupname)" : String,
      "[LogStreamName](#cfn-logs-logstream-logstreamname)" : String
    }
}
```

### YAML
<a name="aws-resource-logs-logstream-syntax.yaml"></a>

```
Type: AWS::Logs::LogStream
Properties:
  [LogGroupName](#cfn-logs-logstream-loggroupname): String
  [LogStreamName](#cfn-logs-logstream-logstreamname): String
```

## Properties
<a name="aws-resource-logs-logstream-properties"></a>

`LogGroupName`  <a name="cfn-logs-logstream-loggroupname"></a>
The name of the log group where the log stream is created.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\.\-_/#A-Za-z0-9]+`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LogStreamName`  <a name="cfn-logs-logstream-logstreamname"></a>
The name of the log stream. The name must be unique within the log group.  
*Required*: No  
*Type*: String  
*Pattern*: `[^:*]*`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-logs-logstream-return-values"></a>

### Ref
<a name="aws-resource-logs-logstream-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name, such as ` MyAppLogStream`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-logs-logstream--examples"></a>



### Create a Log Stream
<a name="aws-resource-logs-logstream--examples--Create_a_Log_Stream"></a>

The following example creates a log stream named `MyAppLogStream` in the `exampleLogGroup` log group.

#### JSON
<a name="aws-resource-logs-logstream--examples--Create_a_Log_Stream--json"></a>

```
"LogStream": {
  "Type": "AWS::Logs::LogStream",
  "Properties": {
    "LogGroupName" : "exampleLogGroup",
    "LogStreamName": "MyAppLogStream"
  }
}
```

#### YAML
<a name="aws-resource-logs-logstream--examples--Create_a_Log_Stream--yaml"></a>

```
LogStream: 
  Type: AWS::Logs::LogStream
  Properties: 
    LogGroupName: "exampleLogGroup"
    LogStreamName: "MyAppLogStream"
```

# AWS::Logs::MetricFilter
<a name="aws-resource-logs-metricfilter"></a>

The `AWS::Logs::MetricFilter` resource specifies a metric filter that describes how CloudWatch Logs extracts information from logs and transforms it into Amazon CloudWatch metrics. If you have multiple metric filters that are associated with a log group, all the filters are applied to the log streams in that group.

The maximum number of metric filters that can be associated with a log group is 100.

## Syntax
<a name="aws-resource-logs-metricfilter-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-metricfilter-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::MetricFilter",
  "Properties" : {
      "[ApplyOnTransformedLogs](#cfn-logs-metricfilter-applyontransformedlogs)" : Boolean,
      "[EmitSystemFieldDimensions](#cfn-logs-metricfilter-emitsystemfielddimensions)" : [ String, ... ],
      "[FieldSelectionCriteria](#cfn-logs-metricfilter-fieldselectioncriteria)" : String,
      "[FilterName](#cfn-logs-metricfilter-filtername)" : String,
      "[FilterPattern](#cfn-logs-metricfilter-filterpattern)" : String,
      "[LogGroupName](#cfn-logs-metricfilter-loggroupname)" : String,
      "[MetricTransformations](#cfn-logs-metricfilter-metrictransformations)" : [ MetricTransformation, ... ]
    }
}
```

### YAML
<a name="aws-resource-logs-metricfilter-syntax.yaml"></a>

```
Type: AWS::Logs::MetricFilter
Properties:
  [ApplyOnTransformedLogs](#cfn-logs-metricfilter-applyontransformedlogs): Boolean
  [EmitSystemFieldDimensions](#cfn-logs-metricfilter-emitsystemfielddimensions): 
    - String
  [FieldSelectionCriteria](#cfn-logs-metricfilter-fieldselectioncriteria): String
  [FilterName](#cfn-logs-metricfilter-filtername): String
  [FilterPattern](#cfn-logs-metricfilter-filterpattern): String
  [LogGroupName](#cfn-logs-metricfilter-loggroupname): String
  [MetricTransformations](#cfn-logs-metricfilter-metrictransformations): 
    - MetricTransformation
```

## Properties
<a name="aws-resource-logs-metricfilter-properties"></a>

`ApplyOnTransformedLogs`  <a name="cfn-logs-metricfilter-applyontransformedlogs"></a>
This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see [PutTransformer](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutTransformer.html).  
If this value is `true`, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmitSystemFieldDimensions`  <a name="cfn-logs-metricfilter-emitsystemfielddimensions"></a>
The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the `emitSystemFieldDimensions` value if it was specified when the metric filter was created.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FieldSelectionCriteria`  <a name="cfn-logs-metricfilter-fieldselectioncriteria"></a>
The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the `fieldSelectionCriteria` value if it was specified when the metric filter was created.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `2000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FilterName`  <a name="cfn-logs-metricfilter-filtername"></a>
The name of the metric filter.  
*Required*: No  
*Type*: String  
*Pattern*: `^[^:*]{1,512}`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FilterPattern`  <a name="cfn-logs-metricfilter-filterpattern"></a>
A filter pattern for extracting metric data out of ingested log events. For more information, see [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html).  
*Required*: Yes  
*Type*: String  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogGroupName`  <a name="cfn-logs-metricfilter-loggroupname"></a>
The name of an existing log group that you want to associate with this metric filter.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[.\-_/#A-Za-z0-9]{1,512}`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MetricTransformations`  <a name="cfn-logs-metricfilter-metrictransformations"></a>
The metric transformations.  
*Required*: Yes  
*Type*: Array of [MetricTransformation](aws-properties-logs-metricfilter-metrictransformation.md)  
*Minimum*: `1`  
*Maximum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-resource-logs-metricfilter--examples"></a>



### Create a Metric Filter
<a name="aws-resource-logs-metricfilter--examples--Create_a_Metric_Filter"></a>

The following example sends a value of `1` to the `404Count` metric whenever the status code field includes a `404` value.

#### JSON
<a name="aws-resource-logs-metricfilter--examples--Create_a_Metric_Filter--json"></a>

```
"404MetricFilter": {
    "Type": "AWS::Logs::MetricFilter",
    "Properties": {
        "LogGroupName": { "Ref": "myLogGroup" },
        "FilterPattern": "[ip, identity, user_id, timestamp, request, status_code = 404, size]",
        "MetricTransformations": [
            {
                "MetricValue": "1",
                "MetricNamespace": "WebServer/404s",
                "MetricName": "404Count"
            }
        ]
    }
}
```

#### YAML
<a name="aws-resource-logs-metricfilter--examples--Create_a_Metric_Filter--yaml"></a>

```
404MetricFilter: 
  Type: AWS::Logs::MetricFilter
  Properties: 
    LogGroupName: 
      Ref: "myLogGroup"
    FilterPattern: "[ip, identity, user_id, timestamp, request, status_code = 404, size]"
    MetricTransformations: 
      - 
        MetricValue: "1"
        MetricNamespace: "WebServer/404s"
        MetricName: "404Count"
```

# AWS::Logs::MetricFilter Dimension
<a name="aws-properties-logs-metricfilter-dimension"></a>

Specifies the CloudWatch metric dimensions to publish with this metric.

 Because dimensions are part of the unique identifier for a metric, whenever a unique dimension name/value pair is extracted from your logs, you are creating a new variation of that metric.

For more information about publishing dimensions with metrics created by metric filters, see [ Publishing dimensions with metrics from values in JSON or space-delimited log events](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html#logs-metric-filters-dimensions).

**Important**  
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as `IPAddress` or `requestID` as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.   
To help prevent accidental high charges, Amazon disables a metric filter if it generates 1000 different name/value pairs for the dimensions that you have specified within a certain amount of time.  
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see [ Creating a Billing Alarm to Monitor Your Estimated AWS Charges](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). 

## Syntax
<a name="aws-properties-logs-metricfilter-dimension-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-metricfilter-dimension-syntax.json"></a>

```
{
  "[Key](#cfn-logs-metricfilter-dimension-key)" : String,
  "[Value](#cfn-logs-metricfilter-dimension-value)" : String
}
```

### YAML
<a name="aws-properties-logs-metricfilter-dimension-syntax.yaml"></a>

```
  [Key](#cfn-logs-metricfilter-dimension-key): String
  [Value](#cfn-logs-metricfilter-dimension-value): String
```

## Properties
<a name="aws-properties-logs-metricfilter-dimension-properties"></a>

`Key`  <a name="cfn-logs-metricfilter-dimension-key"></a>
The name for the CloudWatch metric dimension that the metric filter creates.  
Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:).  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-logs-metricfilter-dimension-value"></a>
The log event field that will contain the value for this dimension. This dimension will only be published for a metric if the value is found in the log event. For example, `$.eventType` for JSON log events, or `$server` for space-delimited log events.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::MetricFilter MetricTransformation
<a name="aws-properties-logs-metricfilter-metrictransformation"></a>

`MetricTransformation` is a property of the `AWS::Logs::MetricFilter` resource that describes how to transform log streams into a CloudWatch metric.

## Syntax
<a name="aws-properties-logs-metricfilter-metrictransformation-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-metricfilter-metrictransformation-syntax.json"></a>

```
{
  "[DefaultValue](#cfn-logs-metricfilter-metrictransformation-defaultvalue)" : Number,
  "[Dimensions](#cfn-logs-metricfilter-metrictransformation-dimensions)" : [ Dimension, ... ],
  "[MetricName](#cfn-logs-metricfilter-metrictransformation-metricname)" : String,
  "[MetricNamespace](#cfn-logs-metricfilter-metrictransformation-metricnamespace)" : String,
  "[MetricValue](#cfn-logs-metricfilter-metrictransformation-metricvalue)" : String,
  "[Unit](#cfn-logs-metricfilter-metrictransformation-unit)" : String
}
```

### YAML
<a name="aws-properties-logs-metricfilter-metrictransformation-syntax.yaml"></a>

```
  [DefaultValue](#cfn-logs-metricfilter-metrictransformation-defaultvalue): Number
  [Dimensions](#cfn-logs-metricfilter-metrictransformation-dimensions): 
    - Dimension
  [MetricName](#cfn-logs-metricfilter-metrictransformation-metricname): String
  [MetricNamespace](#cfn-logs-metricfilter-metrictransformation-metricnamespace): String
  [MetricValue](#cfn-logs-metricfilter-metrictransformation-metricvalue): String
  [Unit](#cfn-logs-metricfilter-metrictransformation-unit): String
```

## Properties
<a name="aws-properties-logs-metricfilter-metrictransformation-properties"></a>

`DefaultValue`  <a name="cfn-logs-metricfilter-metrictransformation-defaultvalue"></a>
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Dimensions`  <a name="cfn-logs-metricfilter-metrictransformation-dimensions"></a>
The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.  
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as `IPAddress` or `requestID` as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.   
CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.  
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see [ Creating a Billing Alarm to Monitor Your Estimated AWS Charges](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). 
*Required*: No  
*Type*: Array of [Dimension](aws-properties-logs-metricfilter-dimension.md)  
*Minimum*: `1`  
*Maximum*: `3`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricName`  <a name="cfn-logs-metricfilter-metrictransformation-metricname"></a>
The name of the CloudWatch metric.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^((?![:*$])[\x00-\x7F]){1,255}`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricNamespace`  <a name="cfn-logs-metricfilter-metrictransformation-metricnamespace"></a>
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see [Namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace).  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[0-9a-zA-Z\.\-_\/#]{1,256}`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricValue`  <a name="cfn-logs-metricfilter-metrictransformation-metricvalue"></a>
The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like `Error`, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using \$1. followed by the name of the field that you specified in the filter pattern, such as `$.size`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `.{1,100}`  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Unit`  <a name="cfn-logs-metricfilter-metrictransformation-unit"></a>
The unit to assign to the metric. If you omit this, the unit is set as `None`.  
*Required*: No  
*Type*: String  
*Allowed values*: `Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::QueryDefinition
<a name="aws-resource-logs-querydefinition"></a>

Creates a query definition for CloudWatch Logs Insights. For more information, see [ Analyzing Log Data with CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html).

## Syntax
<a name="aws-resource-logs-querydefinition-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-querydefinition-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::QueryDefinition",
  "Properties" : {
      "[LogGroupNames](#cfn-logs-querydefinition-loggroupnames)" : [ String, ... ],
      "[Name](#cfn-logs-querydefinition-name)" : String,
      "[Parameters](#cfn-logs-querydefinition-parameters)" : [ QueryParameter, ... ],
      "[QueryLanguage](#cfn-logs-querydefinition-querylanguage)" : String,
      "[QueryString](#cfn-logs-querydefinition-querystring)" : String
    }
}
```

### YAML
<a name="aws-resource-logs-querydefinition-syntax.yaml"></a>

```
Type: AWS::Logs::QueryDefinition
Properties:
  [LogGroupNames](#cfn-logs-querydefinition-loggroupnames): 
    - String
  [Name](#cfn-logs-querydefinition-name): String
  [Parameters](#cfn-logs-querydefinition-parameters): 
    - QueryParameter
  [QueryLanguage](#cfn-logs-querydefinition-querylanguage): String
  [QueryString](#cfn-logs-querydefinition-querystring): 
    String
```

## Properties
<a name="aws-resource-logs-querydefinition-properties"></a>

`LogGroupNames`  <a name="cfn-logs-querydefinition-loggroupnames"></a>
Use this parameter if you want the query to query only certain log groups.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-logs-querydefinition-name"></a>
A name for the query definition.  
You can use the name to create a folder structure for your queries. To create a folder, use a forward slash (/) to prefix your desired query name with your desired folder name. For example, `folder-name/query-name`.
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Parameters`  <a name="cfn-logs-querydefinition-parameters"></a>
If this query definition contains a list of query parameters that define placeholder variables for the query string, that list appears here.  
*Required*: No  
*Type*: Array of [QueryParameter](aws-properties-logs-querydefinition-queryparameter.md)  
*Maximum*: `20`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`QueryLanguage`  <a name="cfn-logs-querydefinition-querylanguage"></a>
The query language used for this query. For more information about the query languages that CloudWatch Logs supports, see [Supported query languages](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_Languages.html).  
*Required*: No  
*Type*: String  
*Allowed values*: `CWLI | SQL | PPL`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`QueryString`  <a name="cfn-logs-querydefinition-querystring"></a>
The query string to use for this query definition. For more information, see [CloudWatch Logs Insights Query Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-querydefinition-return-values"></a>

### Ref
<a name="aws-resource-logs-querydefinition-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the query definition ID.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-logs-querydefinition-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-logs-querydefinition-return-values-fn--getatt-fn--getatt"></a>

`QueryDefinitionId`  <a name="QueryDefinitionId-fn::getatt"></a>
The ID of the query definition. 

## Examples
<a name="aws-resource-logs-querydefinition--examples"></a>

### Query definition example
<a name="aws-resource-logs-querydefinition--examples--Query_definition_example"></a>

The following example creates a query definition.

#### JSON
<a name="aws-resource-logs-querydefinition--examples--Query_definition_example--json"></a>

```
"myQueryDefinition": {
  "Type": "AWS::Logs::QueryDefinition",
  "Properties": {
    "Name": "myQueryName",
    "QueryString": "fields @timestamp, @message | sort @timestamp desc | limit 20"
    }
}
```

#### YAML
<a name="aws-resource-logs-querydefinition--examples--Query_definition_example--yaml"></a>

```
myQueryDefinition:
  Type: AWS::Logs::QueryDefinition
  Properties:
    Name: "myQueryName"
    QueryString: “fields @timestamp, @message | sort @timestamp desc | limit 20"
```

# AWS::Logs::QueryDefinition QueryParameter
<a name="aws-properties-logs-querydefinition-queryparameter"></a>

This structure defines a query parameter for a saved CloudWatch Logs Insights query definition. Query parameters are supported only for Logs Insights QL queries. They are placeholder variables that you can reference in a query string using the `{{parameterName}}` syntax. Each parameter can include a default value and a description.

## Syntax
<a name="aws-properties-logs-querydefinition-queryparameter-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-querydefinition-queryparameter-syntax.json"></a>

```
{
  "[DefaultValue](#cfn-logs-querydefinition-queryparameter-defaultvalue)" : String,
  "[Description](#cfn-logs-querydefinition-queryparameter-description)" : String,
  "[Name](#cfn-logs-querydefinition-queryparameter-name)" : String
}
```

### YAML
<a name="aws-properties-logs-querydefinition-queryparameter-syntax.yaml"></a>

```
  [DefaultValue](#cfn-logs-querydefinition-queryparameter-defaultvalue): String
  [Description](#cfn-logs-querydefinition-queryparameter-description): String
  [Name](#cfn-logs-querydefinition-queryparameter-name): String
```

## Properties
<a name="aws-properties-logs-querydefinition-queryparameter-properties"></a>

`DefaultValue`  <a name="cfn-logs-querydefinition-queryparameter-defaultvalue"></a>
The default value to use for this query parameter if no value is supplied at execution time.  
*Required*: No  
*Type*: String  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-logs-querydefinition-queryparameter-description"></a>
A description of the query parameter that explains its purpose or expected values.  
*Required*: No  
*Type*: String  
*Maximum*: `512`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-logs-querydefinition-queryparameter-name"></a>
The name of the query parameter. A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z_][a-zA-Z0-9_]*$`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::ResourcePolicy
<a name="aws-resource-logs-resourcepolicy"></a>

Creates or updates a resource policy that allows other AWS services to put log events to this account. An account can have up to 10 resource policies per AWS Region.

## Syntax
<a name="aws-resource-logs-resourcepolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-resourcepolicy-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::ResourcePolicy",
  "Properties" : {
      "[PolicyDocument](#cfn-logs-resourcepolicy-policydocument)" : Json,
      "[PolicyName](#cfn-logs-resourcepolicy-policyname)" : String
    }
}
```

### YAML
<a name="aws-resource-logs-resourcepolicy-syntax.yaml"></a>

```
Type: AWS::Logs::ResourcePolicy
Properties:
  [PolicyDocument](#cfn-logs-resourcepolicy-policydocument): Json
  [PolicyName](#cfn-logs-resourcepolicy-policyname): String
```

## Properties
<a name="aws-resource-logs-resourcepolicy-properties"></a>

`PolicyDocument`  <a name="cfn-logs-resourcepolicy-policydocument"></a>
The details of the policy. It must be formatted in JSON, and you must use backslashes to escape characters that need to be escaped in JSON strings, such as double quote marks.  
*Required*: Yes  
*Type*: Json  
*Pattern*: `[\u0009\u000A\u000D\u0020-\u00FF]+`  
*Minimum*: `1`  
*Maximum*: `5120`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PolicyName`  <a name="cfn-logs-resourcepolicy-policyname"></a>
The name of the resource policy.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^([^:*\/]+\/?)*[^:*\/]+$`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-logs-resourcepolicy-return-values"></a>

### Ref
<a name="aws-resource-logs-resourcepolicy-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the `PolicyName` of the resource policy.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-logs-resourcepolicy--examples"></a>

### Resource policy example
<a name="aws-resource-logs-resourcepolicy--examples--Resource_policy_example"></a>

The following example creates a resource policy that allows Route 53 to write log events to a log group that has this policy attached.

#### JSON
<a name="aws-resource-logs-resourcepolicy--examples--Resource_policy_example--json"></a>

```
{
  "Type": "AWS::Logs::ResourcePolicy",
  "Properties": {
    "PolicyName": "MyResourcePolicy",
    "PolicyDocument": "{ \"Version\": \"2012-10-17\", \"Statement\": [ { \"Sid\": \"Route53LogsToCloudWatchLogs\", \"Effect\": \"Allow\", \"Principal\": { \"Service\": [ \"route53.amazonaws.com\" ] }, \"Action\":\"logs:PutLogEvents\", \"Resource\": \"logArn\" } ] }"
  }
}
```

#### YAML
<a name="aws-resource-logs-resourcepolicy--examples--Resource_policy_example--yaml"></a>

```
  Type: AWS::Logs::ResourcePolicy
  Properties:
    PolicyName: "MyResourcePolicy"
    PolicyDocument: "{ \"Version\": \"2012-10-17\", \"Statement\": [ { \"Sid\": \"Route53LogsToCloudWatchLogs\", \"Effect\": \"Allow\", \"Principal\": { \"Service\": [ \"route53.amazonaws.com\" ] }, \"Action\":\"logs:PutLogEvents\", \"Resource\": \"logArn\" } ] }"
```

# AWS::Logs::ScheduledQuery
<a name="aws-resource-logs-scheduledquery"></a>

Creates a scheduled query that runs CloudWatch Logs Insights queries at regular intervals. Scheduled queries enable proactive monitoring by automatically executing queries to detect patterns and anomalies in your log data. Query results can be delivered to Amazon S3 for analysis or further processing.

## Syntax
<a name="aws-resource-logs-scheduledquery-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-scheduledquery-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::ScheduledQuery",
  "Properties" : {
      "[Description](#cfn-logs-scheduledquery-description)" : String,
      "[DestinationConfiguration](#cfn-logs-scheduledquery-destinationconfiguration)" : DestinationConfiguration,
      "[ExecutionRoleArn](#cfn-logs-scheduledquery-executionrolearn)" : String,
      "[LogGroupIdentifiers](#cfn-logs-scheduledquery-loggroupidentifiers)" : [ String, ... ],
      "[Name](#cfn-logs-scheduledquery-name)" : String,
      "[QueryLanguage](#cfn-logs-scheduledquery-querylanguage)" : String,
      "[QueryString](#cfn-logs-scheduledquery-querystring)" : String,
      "[ScheduleEndTime](#cfn-logs-scheduledquery-scheduleendtime)" : Number,
      "[ScheduleExpression](#cfn-logs-scheduledquery-scheduleexpression)" : String,
      "[ScheduleStartTime](#cfn-logs-scheduledquery-schedulestarttime)" : Number,
      "[StartTimeOffset](#cfn-logs-scheduledquery-starttimeoffset)" : Integer,
      "[State](#cfn-logs-scheduledquery-state)" : String,
      "[Tags](#cfn-logs-scheduledquery-tags)" : [ TagsItems, ... ],
      "[Timezone](#cfn-logs-scheduledquery-timezone)" : String
    }
}
```

### YAML
<a name="aws-resource-logs-scheduledquery-syntax.yaml"></a>

```
Type: AWS::Logs::ScheduledQuery
Properties:
  [Description](#cfn-logs-scheduledquery-description): String
  [DestinationConfiguration](#cfn-logs-scheduledquery-destinationconfiguration): 
    DestinationConfiguration
  [ExecutionRoleArn](#cfn-logs-scheduledquery-executionrolearn): String
  [LogGroupIdentifiers](#cfn-logs-scheduledquery-loggroupidentifiers): 
    - String
  [Name](#cfn-logs-scheduledquery-name): String
  [QueryLanguage](#cfn-logs-scheduledquery-querylanguage): String
  [QueryString](#cfn-logs-scheduledquery-querystring): 
    String
  [ScheduleEndTime](#cfn-logs-scheduledquery-scheduleendtime): Number
  [ScheduleExpression](#cfn-logs-scheduledquery-scheduleexpression): String
  [ScheduleStartTime](#cfn-logs-scheduledquery-schedulestarttime): Number
  [StartTimeOffset](#cfn-logs-scheduledquery-starttimeoffset): Integer
  [State](#cfn-logs-scheduledquery-state): String
  [Tags](#cfn-logs-scheduledquery-tags): 
    - TagsItems
  [Timezone](#cfn-logs-scheduledquery-timezone): String
```

## Properties
<a name="aws-resource-logs-scheduledquery-properties"></a>

`Description`  <a name="cfn-logs-scheduledquery-description"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DestinationConfiguration`  <a name="cfn-logs-scheduledquery-destinationconfiguration"></a>
Configuration for where query results are delivered.  
*Required*: No  
*Type*: [DestinationConfiguration](aws-properties-logs-scheduledquery-destinationconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExecutionRoleArn`  <a name="cfn-logs-scheduledquery-executionrolearn"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogGroupIdentifiers`  <a name="cfn-logs-scheduledquery-loggroupidentifiers"></a>
Property description not available.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-logs-scheduledquery-name"></a>
The name of the scheduled query.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9_\-/.#]+$`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`QueryLanguage`  <a name="cfn-logs-scheduledquery-querylanguage"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`QueryString`  <a name="cfn-logs-scheduledquery-querystring"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScheduleEndTime`  <a name="cfn-logs-scheduledquery-scheduleendtime"></a>
Property description not available.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScheduleExpression`  <a name="cfn-logs-scheduledquery-scheduleexpression"></a>
The cron expression that defines when the scheduled query runs.  
*Required*: Yes  
*Type*: String  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScheduleStartTime`  <a name="cfn-logs-scheduledquery-schedulestarttime"></a>
Property description not available.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StartTimeOffset`  <a name="cfn-logs-scheduledquery-starttimeoffset"></a>
Property description not available.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`State`  <a name="cfn-logs-scheduledquery-state"></a>
The current state of the scheduled query.  
*Required*: No  
*Type*: String  
*Allowed values*: `ENABLED | DISABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-logs-scheduledquery-tags"></a>
Property description not available.  
*Required*: No  
*Type*: Array of [TagsItems](aws-properties-logs-scheduledquery-tagsitems.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Timezone`  <a name="cfn-logs-scheduledquery-timezone"></a>
The timezone used for evaluating the schedule expression.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-scheduledquery-return-values"></a>

### Ref
<a name="aws-resource-logs-scheduledquery-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-logs-scheduledquery-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-logs-scheduledquery-return-values-fn--getatt-fn--getatt"></a>

`CreationTime`  <a name="CreationTime-fn::getatt"></a>
The timestamp when the scheduled query was created.

`LastExecutionStatus`  <a name="LastExecutionStatus-fn::getatt"></a>
The status of the most recent execution.

`LastTriggeredTime`  <a name="LastTriggeredTime-fn::getatt"></a>
The timestamp when the scheduled query was last executed.

`LastUpdatedTime`  <a name="LastUpdatedTime-fn::getatt"></a>
The timestamp when the scheduled query was last updated.

`ScheduledQueryArn`  <a name="ScheduledQueryArn-fn::getatt"></a>
The ARN of the scheduled query.

# AWS::Logs::ScheduledQuery DestinationConfiguration
<a name="aws-properties-logs-scheduledquery-destinationconfiguration"></a>

Configuration for where to deliver scheduled query results. Specifies the destination type and associated settings for result delivery.

## Syntax
<a name="aws-properties-logs-scheduledquery-destinationconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-scheduledquery-destinationconfiguration-syntax.json"></a>

```
{
  "[S3Configuration](#cfn-logs-scheduledquery-destinationconfiguration-s3configuration)" : S3Configuration
}
```

### YAML
<a name="aws-properties-logs-scheduledquery-destinationconfiguration-syntax.yaml"></a>

```
  [S3Configuration](#cfn-logs-scheduledquery-destinationconfiguration-s3configuration): 
    S3Configuration
```

## Properties
<a name="aws-properties-logs-scheduledquery-destinationconfiguration-properties"></a>

`S3Configuration`  <a name="cfn-logs-scheduledquery-destinationconfiguration-s3configuration"></a>
Configuration for delivering query results to Amazon S3.  
*Required*: No  
*Type*: [S3Configuration](aws-properties-logs-scheduledquery-s3configuration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::ScheduledQuery S3Configuration
<a name="aws-properties-logs-scheduledquery-s3configuration"></a>

Configuration for Amazon S3 destination where scheduled query results are delivered.

## Syntax
<a name="aws-properties-logs-scheduledquery-s3configuration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-scheduledquery-s3configuration-syntax.json"></a>

```
{
  "[DestinationIdentifier](#cfn-logs-scheduledquery-s3configuration-destinationidentifier)" : String,
  "[RoleArn](#cfn-logs-scheduledquery-s3configuration-rolearn)" : String
}
```

### YAML
<a name="aws-properties-logs-scheduledquery-s3configuration-syntax.yaml"></a>

```
  [DestinationIdentifier](#cfn-logs-scheduledquery-s3configuration-destinationidentifier): String
  [RoleArn](#cfn-logs-scheduledquery-s3configuration-rolearn): String
```

## Properties
<a name="aws-properties-logs-scheduledquery-s3configuration-properties"></a>

`DestinationIdentifier`  <a name="cfn-logs-scheduledquery-s3configuration-destinationidentifier"></a>
The Amazon S3 URI where query results are delivered. Must be a valid S3 URI format.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-logs-scheduledquery-s3configuration-rolearn"></a>
The ARN of the IAM role that grants permissions to write query results to the specified Amazon S3 destination.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::ScheduledQuery TagsItems
<a name="aws-properties-logs-scheduledquery-tagsitems"></a>

<a name="aws-properties-logs-scheduledquery-tagsitems-description"></a>The `TagsItems` property type specifies Property description not available. for an [AWS::Logs::ScheduledQuery](aws-resource-logs-scheduledquery.md).

## Syntax
<a name="aws-properties-logs-scheduledquery-tagsitems-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-scheduledquery-tagsitems-syntax.json"></a>

```
{
  "[Key](#cfn-logs-scheduledquery-tagsitems-key)" : String,
  "[Value](#cfn-logs-scheduledquery-tagsitems-value)" : String
}
```

### YAML
<a name="aws-properties-logs-scheduledquery-tagsitems-syntax.yaml"></a>

```
  [Key](#cfn-logs-scheduledquery-tagsitems-key): String
  [Value](#cfn-logs-scheduledquery-tagsitems-value): String
```

## Properties
<a name="aws-properties-logs-scheduledquery-tagsitems-properties"></a>

`Key`  <a name="cfn-logs-scheduledquery-tagsitems-key"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-logs-scheduledquery-tagsitems-value"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::SubscriptionFilter
<a name="aws-resource-logs-subscriptionfilter"></a>

The `AWS::Logs::SubscriptionFilter` resource specifies a subscription filter and associates it with the specified log group. Subscription filters allow you to subscribe to a real-time stream of log events and have them delivered to a specific destination. Currently, the supported destinations are:
+ An Amazon Kinesis data stream belonging to the same account as the subscription filter, for same-account delivery.
+ A logical destination that belongs to a different account, for cross-account delivery.
+ An Amazon Kinesis Firehose delivery stream that belongs to the same account as the subscription filter, for same-account delivery.
+ An AWS Lambda function that belongs to the same account as the subscription filter, for same-account delivery.

There can be as many as two subscription filters associated with a log group.

## Syntax
<a name="aws-resource-logs-subscriptionfilter-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-subscriptionfilter-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::SubscriptionFilter",
  "Properties" : {
      "[ApplyOnTransformedLogs](#cfn-logs-subscriptionfilter-applyontransformedlogs)" : Boolean,
      "[DestinationArn](#cfn-logs-subscriptionfilter-destinationarn)" : String,
      "[Distribution](#cfn-logs-subscriptionfilter-distribution)" : String,
      "[EmitSystemFields](#cfn-logs-subscriptionfilter-emitsystemfields)" : [ String, ... ],
      "[FieldSelectionCriteria](#cfn-logs-subscriptionfilter-fieldselectioncriteria)" : String,
      "[FilterName](#cfn-logs-subscriptionfilter-filtername)" : String,
      "[FilterPattern](#cfn-logs-subscriptionfilter-filterpattern)" : String,
      "[LogGroupName](#cfn-logs-subscriptionfilter-loggroupname)" : String,
      "[RoleArn](#cfn-logs-subscriptionfilter-rolearn)" : String
    }
}
```

### YAML
<a name="aws-resource-logs-subscriptionfilter-syntax.yaml"></a>

```
Type: AWS::Logs::SubscriptionFilter
Properties:
  [ApplyOnTransformedLogs](#cfn-logs-subscriptionfilter-applyontransformedlogs): Boolean
  [DestinationArn](#cfn-logs-subscriptionfilter-destinationarn): String
  [Distribution](#cfn-logs-subscriptionfilter-distribution): String
  [EmitSystemFields](#cfn-logs-subscriptionfilter-emitsystemfields): 
    - String
  [FieldSelectionCriteria](#cfn-logs-subscriptionfilter-fieldselectioncriteria): String
  [FilterName](#cfn-logs-subscriptionfilter-filtername): String
  [FilterPattern](#cfn-logs-subscriptionfilter-filterpattern): String
  [LogGroupName](#cfn-logs-subscriptionfilter-loggroupname): String
  [RoleArn](#cfn-logs-subscriptionfilter-rolearn): String
```

## Properties
<a name="aws-resource-logs-subscriptionfilter-properties"></a>

`ApplyOnTransformedLogs`  <a name="cfn-logs-subscriptionfilter-applyontransformedlogs"></a>
This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see [PutTransformer](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutTransformer.html).  
If this value is `true`, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DestinationArn`  <a name="cfn-logs-subscriptionfilter-destinationarn"></a>
The Amazon Resource Name (ARN) of the destination.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Distribution`  <a name="cfn-logs-subscriptionfilter-distribution"></a>
The method used to distribute log data to the destination, which can be either random or grouped by log stream.  
*Required*: No  
*Type*: String  
*Allowed values*: `Random | ByLogStream`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmitSystemFields`  <a name="cfn-logs-subscriptionfilter-emitsystemfields"></a>
The list of system fields that are included in the log events sent to the subscription destination. Returns the `emitSystemFields` value if it was specified when the subscription filter was created.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FieldSelectionCriteria`  <a name="cfn-logs-subscriptionfilter-fieldselectioncriteria"></a>
The filter expression that specifies which log events are processed by this subscription filter based on system fields. Returns the `fieldSelectionCriteria` value if it was specified when the subscription filter was created.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `2000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FilterName`  <a name="cfn-logs-subscriptionfilter-filtername"></a>
The name of the subscription filter.  
*Required*: No  
*Type*: String  
*Pattern*: `[^:*]*`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FilterPattern`  <a name="cfn-logs-subscriptionfilter-filterpattern"></a>
The filtering expressions that restrict what gets delivered to the destination AWS resource. For more information about the filter pattern syntax, see [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html).   
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogGroupName`  <a name="cfn-logs-subscriptionfilter-loggroupname"></a>
The log group to associate with the subscription filter. All log events that are uploaded to this log group are filtered and delivered to the specified AWS resource if the filter pattern matches the log events.   
*Required*: Yes  
*Type*: String  
*Pattern*: `[\.\-_/#A-Za-z0-9]+`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RoleArn`  <a name="cfn-logs-subscriptionfilter-rolearn"></a>
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-subscriptionfilter-return-values"></a>

### Ref
<a name="aws-resource-logs-subscriptionfilter-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-logs-subscriptionfilter--examples"></a>



### Create a Subscription Filter
<a name="aws-resource-logs-subscriptionfilter--examples--Create_a_Subscription_Filter"></a>

The following example sends log events that are associated with the `Root` user to a Kinesis data stream.

#### JSON
<a name="aws-resource-logs-subscriptionfilter--examples--Create_a_Subscription_Filter--json"></a>

```
"SubscriptionFilter" : {
  "Type" : "AWS::Logs::SubscriptionFilter",
  "Properties" : {
    "RoleArn" : { "Fn::GetAtt" : [ "CloudWatchIAMRole", "Arn" ] },
    "LogGroupName" : { "Ref" : "LogGroup" },
    "Distribution" : "Random",
    "FilterName" : "filterNameString",
    "FilterPattern" : "{$.userIdentity.type = Root}",
    "DestinationArn" : { "Fn::GetAtt" : [ "KinesisStream", "Arn" ] }
  }
}
```

#### YAML
<a name="aws-resource-logs-subscriptionfilter--examples--Create_a_Subscription_Filter--yaml"></a>

```
SubscriptionFilter: 
  Type: AWS::Logs::SubscriptionFilter
  Properties: 
    RoleArn: 
      Fn::GetAtt: 
        - "CloudWatchIAMRole"
        - "Arn"
    LogGroupName: 
      Ref: "LogGroup"
    Distribution: "Random"
    FilterName: "filterNameString"
    FilterPattern: "{$.userIdentity.type = Root}"
    DestinationArn: 
      Fn::GetAtt: 
        - "KinesisStream"
        - "Arn"
```

# AWS::Logs::Transformer
<a name="aws-resource-logs-transformer"></a>

Creates or updates a *log transformer* for a single log group. You use log transformers to transform log events into a different format, making them easier for you to process and analyze. You can also transform logs from different sources into standardized formats that contains relevant, source-specific information.

After you have created a transformer, CloudWatch Logs performs the transformations at the time of log ingestion. You can then refer to the transformed versions of the logs during operations such as querying with CloudWatch Logs Insights or creating metric filters or subscription filers.

You can also use a transformer to copy metadata from metadata keys into the log events themselves. This metadata can include log group name, log stream name, account ID and Region.

A transformer for a log group is a series of processors, where each processor applies one type of transformation to the log events ingested into this log group. The processors work one after another, in the order that you list them, like a pipeline. For more information about the available processors to use in a transformer, see [ Processors that you can use](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-Processors).

Having log events in standardized format enables visibility across your applications for your log analysis, reporting, and alarming needs. CloudWatch Logs provides transformation for common log types with out-of-the-box transformation templates for major AWS log sources such as VPC flow logs, Lambda, and Amazon RDS. You can use pre-built transformation templates or create custom transformation policies.

You can create transformers only for the log groups in the Standard log class.

You can also set up a transformer at the account level. For more information, see [PutAccountPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html). If there is both a log-group level transformer created with `PutTransformer` and an account-level transformer that could apply to the same log group, the log group uses only the log-group level transformer. It ignores the account-level transformer.

## Syntax
<a name="aws-resource-logs-transformer-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-logs-transformer-syntax.json"></a>

```
{
  "Type" : "AWS::Logs::Transformer",
  "Properties" : {
      "[LogGroupIdentifier](#cfn-logs-transformer-loggroupidentifier)" : String,
      "[TransformerConfig](#cfn-logs-transformer-transformerconfig)" : [ Processor, ... ]
    }
}
```

### YAML
<a name="aws-resource-logs-transformer-syntax.yaml"></a>

```
Type: AWS::Logs::Transformer
Properties:
  [LogGroupIdentifier](#cfn-logs-transformer-loggroupidentifier): String
  [TransformerConfig](#cfn-logs-transformer-transformerconfig): 
    - Processor
```

## Properties
<a name="aws-resource-logs-transformer-properties"></a>

`LogGroupIdentifier`  <a name="cfn-logs-transformer-loggroupidentifier"></a>
Specify either the name or ARN of the log group to create the transformer for.   
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w#+=/:,.@-]*`  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TransformerConfig`  <a name="cfn-logs-transformer-transformerconfig"></a>
This structure is an array that contains the configuration of this log transformer. A log transformer is an array of processors, where each processor applies one type of transformation to the log events that are ingested.  
*Required*: Yes  
*Type*: Array of [Processor](aws-properties-logs-transformer-processor.md)  
*Minimum*: `1`  
*Maximum*: `20`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-logs-transformer-return-values"></a>

### Ref
<a name="aws-resource-logs-transformer-return-values-ref"></a>

# AWS::Logs::Transformer AddKeyEntry
<a name="aws-properties-logs-transformer-addkeyentry"></a>

This object defines one key that will be added with the [ addKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-addKey) processor.

## Syntax
<a name="aws-properties-logs-transformer-addkeyentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-addkeyentry-syntax.json"></a>

```
{
  "[Key](#cfn-logs-transformer-addkeyentry-key)" : String,
  "[OverwriteIfExists](#cfn-logs-transformer-addkeyentry-overwriteifexists)" : Boolean,
  "[Value](#cfn-logs-transformer-addkeyentry-value)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-addkeyentry-syntax.yaml"></a>

```
  [Key](#cfn-logs-transformer-addkeyentry-key): String
  [OverwriteIfExists](#cfn-logs-transformer-addkeyentry-overwriteifexists): Boolean
  [Value](#cfn-logs-transformer-addkeyentry-value): String
```

## Properties
<a name="aws-properties-logs-transformer-addkeyentry-properties"></a>

`Key`  <a name="cfn-logs-transformer-addkeyentry-key"></a>
The key of the new entry to be added to the log event  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OverwriteIfExists`  <a name="cfn-logs-transformer-addkeyentry-overwriteifexists"></a>
Specifies whether to overwrite the value if the key already exists in the log event. If you omit this, the default is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-logs-transformer-addkeyentry-value"></a>
The value of the new entry to be added to the log event  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer AddKeys
<a name="aws-properties-logs-transformer-addkeys"></a>

This processor adds new key-value pairs to the log event. 

For more information about this processor including examples, see [ addKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-addKeys) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-addkeys-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-addkeys-syntax.json"></a>

```
{
  "[Entries](#cfn-logs-transformer-addkeys-entries)" : [ AddKeyEntry, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-addkeys-syntax.yaml"></a>

```
  [Entries](#cfn-logs-transformer-addkeys-entries): 
    - AddKeyEntry
```

## Properties
<a name="aws-properties-logs-transformer-addkeys-properties"></a>

`Entries`  <a name="cfn-logs-transformer-addkeys-entries"></a>
An array of objects, where each object contains the information about one key to add to the log event.   
*Required*: Yes  
*Type*: Array of [AddKeyEntry](aws-properties-logs-transformer-addkeyentry.md)  
*Minimum*: `1`  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer CopyValue
<a name="aws-properties-logs-transformer-copyvalue"></a>

This processor copies values within a log event. You can also use this processor to add metadata to log events by copying the values of the following metadata keys into the log events: `@logGroupName`, `@logGroupStream`, `@accountId`, `@regionName`. 

For more information about this processor including examples, see [ copyValue](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-copyValue) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-copyvalue-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-copyvalue-syntax.json"></a>

```
{
  "[Entries](#cfn-logs-transformer-copyvalue-entries)" : [ CopyValueEntry, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-copyvalue-syntax.yaml"></a>

```
  [Entries](#cfn-logs-transformer-copyvalue-entries): 
    - CopyValueEntry
```

## Properties
<a name="aws-properties-logs-transformer-copyvalue-properties"></a>

`Entries`  <a name="cfn-logs-transformer-copyvalue-entries"></a>
An array of `CopyValueEntry` objects, where each object contains the information about one field value to copy.   
*Required*: Yes  
*Type*: Array of [CopyValueEntry](aws-properties-logs-transformer-copyvalueentry.md)  
*Minimum*: `1`  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer CopyValueEntry
<a name="aws-properties-logs-transformer-copyvalueentry"></a>

This object defines one value to be copied with the [ copyValue](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-copyValue) processor.

## Syntax
<a name="aws-properties-logs-transformer-copyvalueentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-copyvalueentry-syntax.json"></a>

```
{
  "[OverwriteIfExists](#cfn-logs-transformer-copyvalueentry-overwriteifexists)" : Boolean,
  "[Source](#cfn-logs-transformer-copyvalueentry-source)" : String,
  "[Target](#cfn-logs-transformer-copyvalueentry-target)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-copyvalueentry-syntax.yaml"></a>

```
  [OverwriteIfExists](#cfn-logs-transformer-copyvalueentry-overwriteifexists): Boolean
  [Source](#cfn-logs-transformer-copyvalueentry-source): String
  [Target](#cfn-logs-transformer-copyvalueentry-target): String
```

## Properties
<a name="aws-properties-logs-transformer-copyvalueentry-properties"></a>

`OverwriteIfExists`  <a name="cfn-logs-transformer-copyvalueentry-overwriteifexists"></a>
Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-copyvalueentry-source"></a>
The key to copy.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Target`  <a name="cfn-logs-transformer-copyvalueentry-target"></a>
The key of the field to copy the value to.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer Csv
<a name="aws-properties-logs-transformer-csv"></a>

The `CSV` processor parses comma-separated values (CSV) from the log events into columns.

For more information about this processor including examples, see [ csv](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-csv) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-csv-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-csv-syntax.json"></a>

```
{
  "[Columns](#cfn-logs-transformer-csv-columns)" : [ String, ... ],
  "[Delimiter](#cfn-logs-transformer-csv-delimiter)" : String,
  "[QuoteCharacter](#cfn-logs-transformer-csv-quotecharacter)" : String,
  "[Source](#cfn-logs-transformer-csv-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-csv-syntax.yaml"></a>

```
  [Columns](#cfn-logs-transformer-csv-columns): 
    - String
  [Delimiter](#cfn-logs-transformer-csv-delimiter): String
  [QuoteCharacter](#cfn-logs-transformer-csv-quotecharacter): String
  [Source](#cfn-logs-transformer-csv-source): String
```

## Properties
<a name="aws-properties-logs-transformer-csv-properties"></a>

`Columns`  <a name="cfn-logs-transformer-csv-columns"></a>
An array of names to use for the columns in the transformed log event.  
If you omit this, default column names (`[column_1, column_2 ...]`) are used.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Delimiter`  <a name="cfn-logs-transformer-csv-delimiter"></a>
The character used to separate each column in the original comma-separated value log event. If you omit this, the processor looks for the comma `,` character as the delimiter.  
*Required*: No  
*Type*: String  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`QuoteCharacter`  <a name="cfn-logs-transformer-csv-quotecharacter"></a>
The character used used as a text qualifier for a single column of data. If you omit this, the double quotation mark `"` character is used.  
*Required*: No  
*Type*: String  
*Maximum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-csv-source"></a>
The path to the field in the log event that has the comma separated values to be parsed. If you omit this value, the whole log message is processed.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer DateTimeConverter
<a name="aws-properties-logs-transformer-datetimeconverter"></a>

This processor converts a datetime string into a format that you specify. 

For more information about this processor including examples, see [ datetimeConverter](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-datetimeConverter) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-datetimeconverter-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-datetimeconverter-syntax.json"></a>

```
{
  "[Locale](#cfn-logs-transformer-datetimeconverter-locale)" : String,
  "[MatchPatterns](#cfn-logs-transformer-datetimeconverter-matchpatterns)" : [ String, ... ],
  "[Source](#cfn-logs-transformer-datetimeconverter-source)" : String,
  "[SourceTimezone](#cfn-logs-transformer-datetimeconverter-sourcetimezone)" : String,
  "[Target](#cfn-logs-transformer-datetimeconverter-target)" : String,
  "[TargetFormat](#cfn-logs-transformer-datetimeconverter-targetformat)" : String,
  "[TargetTimezone](#cfn-logs-transformer-datetimeconverter-targettimezone)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-datetimeconverter-syntax.yaml"></a>

```
  [Locale](#cfn-logs-transformer-datetimeconverter-locale): String
  [MatchPatterns](#cfn-logs-transformer-datetimeconverter-matchpatterns): 
    - String
  [Source](#cfn-logs-transformer-datetimeconverter-source): String
  [SourceTimezone](#cfn-logs-transformer-datetimeconverter-sourcetimezone): String
  [Target](#cfn-logs-transformer-datetimeconverter-target): String
  [TargetFormat](#cfn-logs-transformer-datetimeconverter-targetformat): String
  [TargetTimezone](#cfn-logs-transformer-datetimeconverter-targettimezone): String
```

## Properties
<a name="aws-properties-logs-transformer-datetimeconverter-properties"></a>

`Locale`  <a name="cfn-logs-transformer-datetimeconverter-locale"></a>
The locale of the source field. If you omit this, the default of `locale.ROOT` is used.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MatchPatterns`  <a name="cfn-logs-transformer-datetimeconverter-matchpatterns"></a>
A list of patterns to match against the `source` field.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-datetimeconverter-source"></a>
The key to apply the date conversion to.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SourceTimezone`  <a name="cfn-logs-transformer-datetimeconverter-sourcetimezone"></a>
The time zone of the source field. If you omit this, the default used is the UTC zone.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Target`  <a name="cfn-logs-transformer-datetimeconverter-target"></a>
The JSON field to store the result in.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetFormat`  <a name="cfn-logs-transformer-datetimeconverter-targetformat"></a>
The datetime format to use for the converted data in the target field.  
If you omit this, the default of ` yyyy-MM-dd'T'HH:mm:ss.SSS'Z` is used.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `64`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetTimezone`  <a name="cfn-logs-transformer-datetimeconverter-targettimezone"></a>
The time zone of the target field. If you omit this, the default used is the UTC zone.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer DeleteKeys
<a name="aws-properties-logs-transformer-deletekeys"></a>

This processor deletes entries from a log event. These entries are key-value pairs. 

For more information about this processor including examples, see [ deleteKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-deleteKeys) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-deletekeys-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-deletekeys-syntax.json"></a>

```
{
  "[WithKeys](#cfn-logs-transformer-deletekeys-withkeys)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-deletekeys-syntax.yaml"></a>

```
  [WithKeys](#cfn-logs-transformer-deletekeys-withkeys): 
    - String
```

## Properties
<a name="aws-properties-logs-transformer-deletekeys-properties"></a>

`WithKeys`  <a name="cfn-logs-transformer-deletekeys-withkeys"></a>
The list of keys to delete.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer Grok
<a name="aws-properties-logs-transformer-grok"></a>

This processor uses pattern matching to parse and structure unstructured data. This processor can also extract fields from log messages.

For more information about this processor including examples, see [ grok](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-Grok) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-grok-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-grok-syntax.json"></a>

```
{
  "[Match](#cfn-logs-transformer-grok-match)" : String,
  "[Source](#cfn-logs-transformer-grok-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-grok-syntax.yaml"></a>

```
  [Match](#cfn-logs-transformer-grok-match): String
  [Source](#cfn-logs-transformer-grok-source): String
```

## Properties
<a name="aws-properties-logs-transformer-grok-properties"></a>

`Match`  <a name="cfn-logs-transformer-grok-match"></a>
The grok pattern to match against the log event. For a list of supported grok patterns, see [Supported grok patterns](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#Grok-Patterns).  
*Required*: Yes  
*Type*: String  
*Maximum*: `512`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-grok-source"></a>
The path to the field in the log event that you want to parse. If you omit this value, the whole log message is parsed.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ListToMap
<a name="aws-properties-logs-transformer-listtomap"></a>

This processor takes a list of objects that contain key fields, and converts them into a map of target keys.

For more information about this processor including examples, see [ listToMap](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-listToMap) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-listtomap-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-listtomap-syntax.json"></a>

```
{
  "[Flatten](#cfn-logs-transformer-listtomap-flatten)" : Boolean,
  "[FlattenedElement](#cfn-logs-transformer-listtomap-flattenedelement)" : String,
  "[Key](#cfn-logs-transformer-listtomap-key)" : String,
  "[Source](#cfn-logs-transformer-listtomap-source)" : String,
  "[Target](#cfn-logs-transformer-listtomap-target)" : String,
  "[ValueKey](#cfn-logs-transformer-listtomap-valuekey)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-listtomap-syntax.yaml"></a>

```
  [Flatten](#cfn-logs-transformer-listtomap-flatten): Boolean
  [FlattenedElement](#cfn-logs-transformer-listtomap-flattenedelement): String
  [Key](#cfn-logs-transformer-listtomap-key): String
  [Source](#cfn-logs-transformer-listtomap-source): String
  [Target](#cfn-logs-transformer-listtomap-target): String
  [ValueKey](#cfn-logs-transformer-listtomap-valuekey): String
```

## Properties
<a name="aws-properties-logs-transformer-listtomap-properties"></a>

`Flatten`  <a name="cfn-logs-transformer-listtomap-flatten"></a>
A Boolean value to indicate whether the list will be flattened into single items. Specify `true` to flatten the list. The default is `false`  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FlattenedElement`  <a name="cfn-logs-transformer-listtomap-flattenedelement"></a>
If you set `flatten` to `true`, use `flattenedElement` to specify which element, `first` or `last`, to keep.   
You must specify this parameter if `flatten` is `true`  
*Required*: No  
*Type*: String  
*Allowed values*: `first | last`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Key`  <a name="cfn-logs-transformer-listtomap-key"></a>
The key of the field to be extracted as keys in the generated map  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-listtomap-source"></a>
The key in the log event that has a list of objects that will be converted to a map.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Target`  <a name="cfn-logs-transformer-listtomap-target"></a>
The key of the field that will hold the generated map   
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ValueKey`  <a name="cfn-logs-transformer-listtomap-valuekey"></a>
If this is specified, the values that you specify in this parameter will be extracted from the `source` objects and put into the values of the generated map. Otherwise, original objects in the source list will be put into the values of the generated map.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer LowerCaseString
<a name="aws-properties-logs-transformer-lowercasestring"></a>

This processor converts a string to lowercase.

For more information about this processor including examples, see [ lowerCaseString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-lowerCaseString) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-lowercasestring-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-lowercasestring-syntax.json"></a>

```
{
  "[WithKeys](#cfn-logs-transformer-lowercasestring-withkeys)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-lowercasestring-syntax.yaml"></a>

```
  [WithKeys](#cfn-logs-transformer-lowercasestring-withkeys): 
    - String
```

## Properties
<a name="aws-properties-logs-transformer-lowercasestring-properties"></a>

`WithKeys`  <a name="cfn-logs-transformer-lowercasestring-withkeys"></a>
The array caontaining the keys of the fields to convert to lowercase.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer MoveKeyEntry
<a name="aws-properties-logs-transformer-movekeyentry"></a>

This object defines one key that will be moved with the [ moveKey](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-moveKey) processor.

## Syntax
<a name="aws-properties-logs-transformer-movekeyentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-movekeyentry-syntax.json"></a>

```
{
  "[OverwriteIfExists](#cfn-logs-transformer-movekeyentry-overwriteifexists)" : Boolean,
  "[Source](#cfn-logs-transformer-movekeyentry-source)" : String,
  "[Target](#cfn-logs-transformer-movekeyentry-target)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-movekeyentry-syntax.yaml"></a>

```
  [OverwriteIfExists](#cfn-logs-transformer-movekeyentry-overwriteifexists): Boolean
  [Source](#cfn-logs-transformer-movekeyentry-source): String
  [Target](#cfn-logs-transformer-movekeyentry-target): String
```

## Properties
<a name="aws-properties-logs-transformer-movekeyentry-properties"></a>

`OverwriteIfExists`  <a name="cfn-logs-transformer-movekeyentry-overwriteifexists"></a>
Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-movekeyentry-source"></a>
The key to move.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Target`  <a name="cfn-logs-transformer-movekeyentry-target"></a>
The key to move to.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer MoveKeys
<a name="aws-properties-logs-transformer-movekeys"></a>

This processor moves a key from one field to another. The original key is deleted.

For more information about this processor including examples, see [ moveKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-moveKeys) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-movekeys-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-movekeys-syntax.json"></a>

```
{
  "[Entries](#cfn-logs-transformer-movekeys-entries)" : [ MoveKeyEntry, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-movekeys-syntax.yaml"></a>

```
  [Entries](#cfn-logs-transformer-movekeys-entries): 
    - MoveKeyEntry
```

## Properties
<a name="aws-properties-logs-transformer-movekeys-properties"></a>

`Entries`  <a name="cfn-logs-transformer-movekeys-entries"></a>
An array of objects, where each object contains the information about one key to move.   
*Required*: Yes  
*Type*: Array of [MoveKeyEntry](aws-properties-logs-transformer-movekeyentry.md)  
*Minimum*: `1`  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ParseCloudfront
<a name="aws-properties-logs-transformer-parsecloudfront"></a>

This processor parses CloudFront vended logs, extract fields, and convert them into JSON format. Encoded field values are decoded. Values that are integers and doubles are treated as such. For more information about this processor including examples, see [ parseCloudfront](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parseCloudfront)

For more information about CloudFront log format, see [ Configure and use standard logs (access logs)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html).

If you use this processor, it must be the first processor in your transformer.

## Syntax
<a name="aws-properties-logs-transformer-parsecloudfront-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-parsecloudfront-syntax.json"></a>

```
{
  "[Source](#cfn-logs-transformer-parsecloudfront-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-parsecloudfront-syntax.yaml"></a>

```
  [Source](#cfn-logs-transformer-parsecloudfront-source): String
```

## Properties
<a name="aws-properties-logs-transformer-parsecloudfront-properties"></a>

`Source`  <a name="cfn-logs-transformer-parsecloudfront-source"></a>
Omit this parameter and the whole log message will be processed by this processor. No other value than `@message` is allowed for `source`.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ParseJSON
<a name="aws-properties-logs-transformer-parsejson"></a>

This processor parses log events that are in JSON format. It can extract JSON key-value pairs and place them under a destination that you specify.

Additionally, because you must have at least one parse-type processor in a transformer, you can use `ParseJSON` as that processor for JSON-format logs, so that you can also apply other processors, such as mutate processors, to these logs.

For more information about this processor including examples, see [ parseJSON](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parseJSON) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-parsejson-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-parsejson-syntax.json"></a>

```
{
  "[Destination](#cfn-logs-transformer-parsejson-destination)" : String,
  "[Source](#cfn-logs-transformer-parsejson-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-parsejson-syntax.yaml"></a>

```
  [Destination](#cfn-logs-transformer-parsejson-destination): String
  [Source](#cfn-logs-transformer-parsejson-source): String
```

## Properties
<a name="aws-properties-logs-transformer-parsejson-properties"></a>

`Destination`  <a name="cfn-logs-transformer-parsejson-destination"></a>
The location to put the parsed key value pair into. If you omit this parameter, it is placed under the root node.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-parsejson-source"></a>
Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example, `store.book`  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ParseKeyValue
<a name="aws-properties-logs-transformer-parsekeyvalue"></a>

This processor parses a specified field in the original log event into key-value pairs. 

For more information about this processor including examples, see [ parseKeyValue](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseKeyValue) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-parsekeyvalue-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-parsekeyvalue-syntax.json"></a>

```
{
  "[Destination](#cfn-logs-transformer-parsekeyvalue-destination)" : String,
  "[FieldDelimiter](#cfn-logs-transformer-parsekeyvalue-fielddelimiter)" : String,
  "[KeyPrefix](#cfn-logs-transformer-parsekeyvalue-keyprefix)" : String,
  "[KeyValueDelimiter](#cfn-logs-transformer-parsekeyvalue-keyvaluedelimiter)" : String,
  "[NonMatchValue](#cfn-logs-transformer-parsekeyvalue-nonmatchvalue)" : String,
  "[OverwriteIfExists](#cfn-logs-transformer-parsekeyvalue-overwriteifexists)" : Boolean,
  "[Source](#cfn-logs-transformer-parsekeyvalue-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-parsekeyvalue-syntax.yaml"></a>

```
  [Destination](#cfn-logs-transformer-parsekeyvalue-destination): String
  [FieldDelimiter](#cfn-logs-transformer-parsekeyvalue-fielddelimiter): String
  [KeyPrefix](#cfn-logs-transformer-parsekeyvalue-keyprefix): String
  [KeyValueDelimiter](#cfn-logs-transformer-parsekeyvalue-keyvaluedelimiter): String
  [NonMatchValue](#cfn-logs-transformer-parsekeyvalue-nonmatchvalue): String
  [OverwriteIfExists](#cfn-logs-transformer-parsekeyvalue-overwriteifexists): Boolean
  [Source](#cfn-logs-transformer-parsekeyvalue-source): String
```

## Properties
<a name="aws-properties-logs-transformer-parsekeyvalue-properties"></a>

`Destination`  <a name="cfn-logs-transformer-parsekeyvalue-destination"></a>
The destination field to put the extracted key-value pairs into  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FieldDelimiter`  <a name="cfn-logs-transformer-parsekeyvalue-fielddelimiter"></a>
The field delimiter string that is used between key-value pairs in the original log events. If you omit this, the ampersand `&` character is used.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KeyPrefix`  <a name="cfn-logs-transformer-parsekeyvalue-keyprefix"></a>
If you want to add a prefix to all transformed keys, specify it here.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KeyValueDelimiter`  <a name="cfn-logs-transformer-parsekeyvalue-keyvaluedelimiter"></a>
The delimiter string to use between the key and value in each pair in the transformed log event.  
 If you omit this, the equal `=` character is used.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NonMatchValue`  <a name="cfn-logs-transformer-parsekeyvalue-nonmatchvalue"></a>
A value to insert into the value field in the result, when a key-value pair is not successfully split.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OverwriteIfExists`  <a name="cfn-logs-transformer-parsekeyvalue-overwriteifexists"></a>
Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-parsekeyvalue-source"></a>
Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example, `store.book`  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ParsePostgres
<a name="aws-properties-logs-transformer-parsepostgres"></a>

Use this processor to parse RDS for PostgreSQL vended logs, extract fields, and and convert them into a JSON format. This processor always processes the entire log event message. For more information about this processor including examples, see [ parsePostGres](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parsePostGres).

For more information about RDS for PostgreSQL log format, see [ RDS for PostgreSQL database log filesTCP flag sequence](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.PostgreSQL.html#USER_LogAccess.Concepts.PostgreSQL.Log_Format.log-line-prefix).

**Important**  
If you use this processor, it must be the first processor in your transformer.

## Syntax
<a name="aws-properties-logs-transformer-parsepostgres-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-parsepostgres-syntax.json"></a>

```
{
  "[Source](#cfn-logs-transformer-parsepostgres-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-parsepostgres-syntax.yaml"></a>

```
  [Source](#cfn-logs-transformer-parsepostgres-source): String
```

## Properties
<a name="aws-properties-logs-transformer-parsepostgres-properties"></a>

`Source`  <a name="cfn-logs-transformer-parsepostgres-source"></a>
Omit this parameter and the whole log message will be processed by this processor. No other value than `@message` is allowed for `source`.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ParseRoute53
<a name="aws-properties-logs-transformer-parseroute53"></a>

Use this processor to parse Route 53 vended logs, extract fields, and and convert them into a JSON format. This processor always processes the entire log event message. For more information about this processor including examples, see [ parseRoute53](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parseRoute53).

**Important**  
If you use this processor, it must be the first processor in your transformer.

## Syntax
<a name="aws-properties-logs-transformer-parseroute53-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-parseroute53-syntax.json"></a>

```
{
  "[Source](#cfn-logs-transformer-parseroute53-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-parseroute53-syntax.yaml"></a>

```
  [Source](#cfn-logs-transformer-parseroute53-source): String
```

## Properties
<a name="aws-properties-logs-transformer-parseroute53-properties"></a>

`Source`  <a name="cfn-logs-transformer-parseroute53-source"></a>
Omit this parameter and the whole log message will be processed by this processor. No other value than `@message` is allowed for `source`.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ParseToOCSF
<a name="aws-properties-logs-transformer-parsetoocsf"></a>

This processor converts logs into [Open Cybersecurity Schema Framework (OCSF)](https://ocsf.io) events.

For more information about this processor including examples, see [parseToOCSF](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseToOCSF) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-parsetoocsf-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-parsetoocsf-syntax.json"></a>

```
{
  "[EventSource](#cfn-logs-transformer-parsetoocsf-eventsource)" : String,
  "[MappingVersion](#cfn-logs-transformer-parsetoocsf-mappingversion)" : String,
  "[OcsfVersion](#cfn-logs-transformer-parsetoocsf-ocsfversion)" : String,
  "[Source](#cfn-logs-transformer-parsetoocsf-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-parsetoocsf-syntax.yaml"></a>

```
  [EventSource](#cfn-logs-transformer-parsetoocsf-eventsource): String
  [MappingVersion](#cfn-logs-transformer-parsetoocsf-mappingversion): String
  [OcsfVersion](#cfn-logs-transformer-parsetoocsf-ocsfversion): String
  [Source](#cfn-logs-transformer-parsetoocsf-source): String
```

## Properties
<a name="aws-properties-logs-transformer-parsetoocsf-properties"></a>

`EventSource`  <a name="cfn-logs-transformer-parsetoocsf-eventsource"></a>
Specify the service or process that produces the log events that will be converted with this processor.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `CloudTrail | Route53Resolver | VPCFlow | EKSAudit | AWSWAF`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MappingVersion`  <a name="cfn-logs-transformer-parsetoocsf-mappingversion"></a>
The version of the OCSF mapping to use for parsing log data.  
*Required*: No  
*Type*: String  
*Pattern*: `^v\d+\.\d+(\.\d+)?$`  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OcsfVersion`  <a name="cfn-logs-transformer-parsetoocsf-ocsfversion"></a>
Specify which version of the OCSF schema to use for the transformed log events.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `V1.1 | V1.5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-parsetoocsf-source"></a>
The path to the field in the log event that you want to parse. If you omit this value, the whole log message is parsed.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ParseVPC
<a name="aws-properties-logs-transformer-parsevpc"></a>

Use this processor to parse Amazon VPC vended logs, extract fields, and and convert them into a JSON format. This processor always processes the entire log event message.

This processor doesn't support custom log formats, such as NAT gateway logs. For more information about custom log formats in Amazon VPC, see [ parseVPC](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-records-examples.html#flow-log-example-tcp-flag) For more information about this processor including examples, see [ parseVPC](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseVPC).

**Important**  
If you use this processor, it must be the first processor in your transformer.

## Syntax
<a name="aws-properties-logs-transformer-parsevpc-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-parsevpc-syntax.json"></a>

```
{
  "[Source](#cfn-logs-transformer-parsevpc-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-parsevpc-syntax.yaml"></a>

```
  [Source](#cfn-logs-transformer-parsevpc-source): String
```

## Properties
<a name="aws-properties-logs-transformer-parsevpc-properties"></a>

`Source`  <a name="cfn-logs-transformer-parsevpc-source"></a>
Omit this parameter and the whole log message will be processed by this processor. No other value than `@message` is allowed for `source`.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer ParseWAF
<a name="aws-properties-logs-transformer-parsewaf"></a>

Use this processor to parse AWS WAF vended logs, extract fields, and and convert them into a JSON format. This processor always processes the entire log event message. For more information about this processor including examples, see [ parseWAF](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parsePostGres).

For more information about AWS WAF log format, see [ Log examples for web ACL traffic](https://docs.aws.amazon.com/waf/latest/developerguide/logging-examples.html).

**Important**  
If you use this processor, it must be the first processor in your transformer.

## Syntax
<a name="aws-properties-logs-transformer-parsewaf-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-parsewaf-syntax.json"></a>

```
{
  "[Source](#cfn-logs-transformer-parsewaf-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-parsewaf-syntax.yaml"></a>

```
  [Source](#cfn-logs-transformer-parsewaf-source): String
```

## Properties
<a name="aws-properties-logs-transformer-parsewaf-properties"></a>

`Source`  <a name="cfn-logs-transformer-parsewaf-source"></a>
Omit this parameter and the whole log message will be processed by this processor. No other value than `@message` is allowed for `source`.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer Processor
<a name="aws-properties-logs-transformer-processor"></a>

This structure contains the information about one processor in a log transformer.

## Syntax
<a name="aws-properties-logs-transformer-processor-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-processor-syntax.json"></a>

```
{
  "[AddKeys](#cfn-logs-transformer-processor-addkeys)" : AddKeys,
  "[CopyValue](#cfn-logs-transformer-processor-copyvalue)" : CopyValue,
  "[Csv](#cfn-logs-transformer-processor-csv)" : Csv,
  "[DateTimeConverter](#cfn-logs-transformer-processor-datetimeconverter)" : DateTimeConverter,
  "[DeleteKeys](#cfn-logs-transformer-processor-deletekeys)" : DeleteKeys,
  "[Grok](#cfn-logs-transformer-processor-grok)" : Grok,
  "[ListToMap](#cfn-logs-transformer-processor-listtomap)" : ListToMap,
  "[LowerCaseString](#cfn-logs-transformer-processor-lowercasestring)" : LowerCaseString,
  "[MoveKeys](#cfn-logs-transformer-processor-movekeys)" : MoveKeys,
  "[ParseCloudfront](#cfn-logs-transformer-processor-parsecloudfront)" : ParseCloudfront,
  "[ParseJSON](#cfn-logs-transformer-processor-parsejson)" : ParseJSON,
  "[ParseKeyValue](#cfn-logs-transformer-processor-parsekeyvalue)" : ParseKeyValue,
  "[ParsePostgres](#cfn-logs-transformer-processor-parsepostgres)" : ParsePostgres,
  "[ParseRoute53](#cfn-logs-transformer-processor-parseroute53)" : ParseRoute53,
  "[ParseToOCSF](#cfn-logs-transformer-processor-parsetoocsf)" : ParseToOCSF,
  "[ParseVPC](#cfn-logs-transformer-processor-parsevpc)" : ParseVPC,
  "[ParseWAF](#cfn-logs-transformer-processor-parsewaf)" : ParseWAF,
  "[RenameKeys](#cfn-logs-transformer-processor-renamekeys)" : RenameKeys,
  "[SplitString](#cfn-logs-transformer-processor-splitstring)" : SplitString,
  "[SubstituteString](#cfn-logs-transformer-processor-substitutestring)" : SubstituteString,
  "[TrimString](#cfn-logs-transformer-processor-trimstring)" : TrimString,
  "[TypeConverter](#cfn-logs-transformer-processor-typeconverter)" : TypeConverter,
  "[UpperCaseString](#cfn-logs-transformer-processor-uppercasestring)" : UpperCaseString
}
```

### YAML
<a name="aws-properties-logs-transformer-processor-syntax.yaml"></a>

```
  [AddKeys](#cfn-logs-transformer-processor-addkeys): 
    AddKeys
  [CopyValue](#cfn-logs-transformer-processor-copyvalue): 
    CopyValue
  [Csv](#cfn-logs-transformer-processor-csv): 
    Csv
  [DateTimeConverter](#cfn-logs-transformer-processor-datetimeconverter): 
    DateTimeConverter
  [DeleteKeys](#cfn-logs-transformer-processor-deletekeys): 
    DeleteKeys
  [Grok](#cfn-logs-transformer-processor-grok): 
    Grok
  [ListToMap](#cfn-logs-transformer-processor-listtomap): 
    ListToMap
  [LowerCaseString](#cfn-logs-transformer-processor-lowercasestring): 
    LowerCaseString
  [MoveKeys](#cfn-logs-transformer-processor-movekeys): 
    MoveKeys
  [ParseCloudfront](#cfn-logs-transformer-processor-parsecloudfront): 
    ParseCloudfront
  [ParseJSON](#cfn-logs-transformer-processor-parsejson): 
    ParseJSON
  [ParseKeyValue](#cfn-logs-transformer-processor-parsekeyvalue): 
    ParseKeyValue
  [ParsePostgres](#cfn-logs-transformer-processor-parsepostgres): 
    ParsePostgres
  [ParseRoute53](#cfn-logs-transformer-processor-parseroute53): 
    ParseRoute53
  [ParseToOCSF](#cfn-logs-transformer-processor-parsetoocsf): 
    ParseToOCSF
  [ParseVPC](#cfn-logs-transformer-processor-parsevpc): 
    ParseVPC
  [ParseWAF](#cfn-logs-transformer-processor-parsewaf): 
    ParseWAF
  [RenameKeys](#cfn-logs-transformer-processor-renamekeys): 
    RenameKeys
  [SplitString](#cfn-logs-transformer-processor-splitstring): 
    SplitString
  [SubstituteString](#cfn-logs-transformer-processor-substitutestring): 
    SubstituteString
  [TrimString](#cfn-logs-transformer-processor-trimstring): 
    TrimString
  [TypeConverter](#cfn-logs-transformer-processor-typeconverter): 
    TypeConverter
  [UpperCaseString](#cfn-logs-transformer-processor-uppercasestring): 
    UpperCaseString
```

## Properties
<a name="aws-properties-logs-transformer-processor-properties"></a>

`AddKeys`  <a name="cfn-logs-transformer-processor-addkeys"></a>
Use this parameter to include the [ addKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-addKeys) processor in your transformer.  
*Required*: No  
*Type*: [AddKeys](aws-properties-logs-transformer-addkeys.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CopyValue`  <a name="cfn-logs-transformer-processor-copyvalue"></a>
Use this parameter to include the [ copyValue](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-copyValue) processor in your transformer.  
*Required*: No  
*Type*: [CopyValue](aws-properties-logs-transformer-copyvalue.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Csv`  <a name="cfn-logs-transformer-processor-csv"></a>
Use this parameter to include the [ CSV](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-CSV) processor in your transformer.  
*Required*: No  
*Type*: [Csv](aws-properties-logs-transformer-csv.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DateTimeConverter`  <a name="cfn-logs-transformer-processor-datetimeconverter"></a>
Use this parameter to include the [ datetimeConverter](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-datetimeConverter) processor in your transformer.  
*Required*: No  
*Type*: [DateTimeConverter](aws-properties-logs-transformer-datetimeconverter.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeleteKeys`  <a name="cfn-logs-transformer-processor-deletekeys"></a>
Use this parameter to include the [ deleteKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-deleteKeys) processor in your transformer.  
*Required*: No  
*Type*: [DeleteKeys](aws-properties-logs-transformer-deletekeys.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Grok`  <a name="cfn-logs-transformer-processor-grok"></a>
Use this parameter to include the [ grok](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-grok) processor in your transformer.  
*Required*: No  
*Type*: [Grok](aws-properties-logs-transformer-grok.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ListToMap`  <a name="cfn-logs-transformer-processor-listtomap"></a>
Use this parameter to include the [ listToMap](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-listToMap) processor in your transformer.  
*Required*: No  
*Type*: [ListToMap](aws-properties-logs-transformer-listtomap.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LowerCaseString`  <a name="cfn-logs-transformer-processor-lowercasestring"></a>
Use this parameter to include the [ lowerCaseString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-lowerCaseString) processor in your transformer.  
*Required*: No  
*Type*: [LowerCaseString](aws-properties-logs-transformer-lowercasestring.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MoveKeys`  <a name="cfn-logs-transformer-processor-movekeys"></a>
Use this parameter to include the [ moveKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-moveKeys) processor in your transformer.  
*Required*: No  
*Type*: [MoveKeys](aws-properties-logs-transformer-movekeys.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParseCloudfront`  <a name="cfn-logs-transformer-processor-parsecloudfront"></a>
Use this parameter to include the [ parseCloudfront](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parseCloudfront) processor in your transformer.  
If you use this processor, it must be the first processor in your transformer.  
*Required*: No  
*Type*: [ParseCloudfront](aws-properties-logs-transformer-parsecloudfront.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParseJSON`  <a name="cfn-logs-transformer-processor-parsejson"></a>
Use this parameter to include the [ parseJSON](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parseJSON) processor in your transformer.  
*Required*: No  
*Type*: [ParseJSON](aws-properties-logs-transformer-parsejson.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParseKeyValue`  <a name="cfn-logs-transformer-processor-parsekeyvalue"></a>
Use this parameter to include the [ parseKeyValue](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parseKeyValue) processor in your transformer.  
*Required*: No  
*Type*: [ParseKeyValue](aws-properties-logs-transformer-parsekeyvalue.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParsePostgres`  <a name="cfn-logs-transformer-processor-parsepostgres"></a>
Use this parameter to include the [ parsePostGres](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parsePostGres) processor in your transformer.  
If you use this processor, it must be the first processor in your transformer.  
*Required*: No  
*Type*: [ParsePostgres](aws-properties-logs-transformer-parsepostgres.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParseRoute53`  <a name="cfn-logs-transformer-processor-parseroute53"></a>
Use this parameter to include the [ parseRoute53](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parseRoute53) processor in your transformer.  
If you use this processor, it must be the first processor in your transformer.  
*Required*: No  
*Type*: [ParseRoute53](aws-properties-logs-transformer-parseroute53.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParseToOCSF`  <a name="cfn-logs-transformer-processor-parsetoocsf"></a>
Use this parameter to convert logs into Open Cybersecurity Schema (OCSF) format.  
*Required*: No  
*Type*: [ParseToOCSF](aws-properties-logs-transformer-parsetoocsf.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParseVPC`  <a name="cfn-logs-transformer-processor-parsevpc"></a>
Use this parameter to include the [ parseVPC](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-parseVPC) processor in your transformer.  
If you use this processor, it must be the first processor in your transformer.  
*Required*: No  
*Type*: [ParseVPC](aws-properties-logs-transformer-parsevpc.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParseWAF`  <a name="cfn-logs-transformer-processor-parsewaf"></a>
Use this parameter to include the [ parseWAF](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseWAF) processor in your transformer.  
If you use this processor, it must be the first processor in your transformer.  
*Required*: No  
*Type*: [ParseWAF](aws-properties-logs-transformer-parsewaf.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RenameKeys`  <a name="cfn-logs-transformer-processor-renamekeys"></a>
Use this parameter to include the [ renameKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-renameKeys) processor in your transformer.  
*Required*: No  
*Type*: [RenameKeys](aws-properties-logs-transformer-renamekeys.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SplitString`  <a name="cfn-logs-transformer-processor-splitstring"></a>
Use this parameter to include the [ splitString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-splitString) processor in your transformer.  
*Required*: No  
*Type*: [SplitString](aws-properties-logs-transformer-splitstring.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SubstituteString`  <a name="cfn-logs-transformer-processor-substitutestring"></a>
Use this parameter to include the [ substituteString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-substituteString) processor in your transformer.  
*Required*: No  
*Type*: [SubstituteString](aws-properties-logs-transformer-substitutestring.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TrimString`  <a name="cfn-logs-transformer-processor-trimstring"></a>
Use this parameter to include the [ trimString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-trimString) processor in your transformer.  
*Required*: No  
*Type*: [TrimString](aws-properties-logs-transformer-trimstring.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TypeConverter`  <a name="cfn-logs-transformer-processor-typeconverter"></a>
Use this parameter to include the [ typeConverter](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-typeConverter) processor in your transformer.  
*Required*: No  
*Type*: [TypeConverter](aws-properties-logs-transformer-typeconverter.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UpperCaseString`  <a name="cfn-logs-transformer-processor-uppercasestring"></a>
Use this parameter to include the [ upperCaseString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-upperCaseString) processor in your transformer.  
*Required*: No  
*Type*: [UpperCaseString](aws-properties-logs-transformer-uppercasestring.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer RenameKeyEntry
<a name="aws-properties-logs-transformer-renamekeyentry"></a>

This object defines one key that will be renamed with the [ renameKey](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-renameKey) processor.

## Syntax
<a name="aws-properties-logs-transformer-renamekeyentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-renamekeyentry-syntax.json"></a>

```
{
  "[Key](#cfn-logs-transformer-renamekeyentry-key)" : String,
  "[OverwriteIfExists](#cfn-logs-transformer-renamekeyentry-overwriteifexists)" : Boolean,
  "[RenameTo](#cfn-logs-transformer-renamekeyentry-renameto)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-renamekeyentry-syntax.yaml"></a>

```
  [Key](#cfn-logs-transformer-renamekeyentry-key): String
  [OverwriteIfExists](#cfn-logs-transformer-renamekeyentry-overwriteifexists): Boolean
  [RenameTo](#cfn-logs-transformer-renamekeyentry-renameto): String
```

## Properties
<a name="aws-properties-logs-transformer-renamekeyentry-properties"></a>

`Key`  <a name="cfn-logs-transformer-renamekeyentry-key"></a>
The key to rename  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OverwriteIfExists`  <a name="cfn-logs-transformer-renamekeyentry-overwriteifexists"></a>
Specifies whether to overwrite the existing value if the destination key already exists. The default is `false`  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RenameTo`  <a name="cfn-logs-transformer-renamekeyentry-renameto"></a>
The string to use for the new key name  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer RenameKeys
<a name="aws-properties-logs-transformer-renamekeys"></a>

Use this processor to rename keys in a log event.

For more information about this processor including examples, see [ renameKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-renameKeys) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-renamekeys-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-renamekeys-syntax.json"></a>

```
{
  "[Entries](#cfn-logs-transformer-renamekeys-entries)" : [ RenameKeyEntry, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-renamekeys-syntax.yaml"></a>

```
  [Entries](#cfn-logs-transformer-renamekeys-entries): 
    - RenameKeyEntry
```

## Properties
<a name="aws-properties-logs-transformer-renamekeys-properties"></a>

`Entries`  <a name="cfn-logs-transformer-renamekeys-entries"></a>
An array of `RenameKeyEntry` objects, where each object contains the information about a single key to rename.   
*Required*: Yes  
*Type*: Array of [RenameKeyEntry](aws-properties-logs-transformer-renamekeyentry.md)  
*Minimum*: `1`  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer SplitString
<a name="aws-properties-logs-transformer-splitstring"></a>

Use this processor to split a field into an array of strings using a delimiting character.

For more information about this processor including examples, see [ splitString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-splitString) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-splitstring-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-splitstring-syntax.json"></a>

```
{
  "[Entries](#cfn-logs-transformer-splitstring-entries)" : [ SplitStringEntry, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-splitstring-syntax.yaml"></a>

```
  [Entries](#cfn-logs-transformer-splitstring-entries): 
    - SplitStringEntry
```

## Properties
<a name="aws-properties-logs-transformer-splitstring-properties"></a>

`Entries`  <a name="cfn-logs-transformer-splitstring-entries"></a>
An array of `SplitStringEntry` objects, where each object contains the information about one field to split.   
*Required*: Yes  
*Type*: Array of [SplitStringEntry](aws-properties-logs-transformer-splitstringentry.md)  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer SplitStringEntry
<a name="aws-properties-logs-transformer-splitstringentry"></a>

This object defines one log field that will be split with the [ splitString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-splitString) processor.

## Syntax
<a name="aws-properties-logs-transformer-splitstringentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-splitstringentry-syntax.json"></a>

```
{
  "[Delimiter](#cfn-logs-transformer-splitstringentry-delimiter)" : String,
  "[Source](#cfn-logs-transformer-splitstringentry-source)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-splitstringentry-syntax.yaml"></a>

```
  [Delimiter](#cfn-logs-transformer-splitstringentry-delimiter): String
  [Source](#cfn-logs-transformer-splitstringentry-source): String
```

## Properties
<a name="aws-properties-logs-transformer-splitstringentry-properties"></a>

`Delimiter`  <a name="cfn-logs-transformer-splitstringentry-delimiter"></a>
The separator characters to split the string entry on.  
*Required*: Yes  
*Type*: String  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-splitstringentry-source"></a>
The key of the field to split.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer SubstituteString
<a name="aws-properties-logs-transformer-substitutestring"></a>

This processor matches a key’s value against a regular expression and replaces all matches with a replacement string.

For more information about this processor including examples, see [ substituteString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-substituteString) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-substitutestring-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-substitutestring-syntax.json"></a>

```
{
  "[Entries](#cfn-logs-transformer-substitutestring-entries)" : [ SubstituteStringEntry, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-substitutestring-syntax.yaml"></a>

```
  [Entries](#cfn-logs-transformer-substitutestring-entries): 
    - SubstituteStringEntry
```

## Properties
<a name="aws-properties-logs-transformer-substitutestring-properties"></a>

`Entries`  <a name="cfn-logs-transformer-substitutestring-entries"></a>
An array of objects, where each object contains the information about one key to match and replace.   
*Required*: Yes  
*Type*: Array of [SubstituteStringEntry](aws-properties-logs-transformer-substitutestringentry.md)  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer SubstituteStringEntry
<a name="aws-properties-logs-transformer-substitutestringentry"></a>

This object defines one log field key that will be replaced using the [ substituteString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-substituteString) processor.

## Syntax
<a name="aws-properties-logs-transformer-substitutestringentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-substitutestringentry-syntax.json"></a>

```
{
  "[From](#cfn-logs-transformer-substitutestringentry-from)" : String,
  "[Source](#cfn-logs-transformer-substitutestringentry-source)" : String,
  "[To](#cfn-logs-transformer-substitutestringentry-to)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-substitutestringentry-syntax.yaml"></a>

```
  [From](#cfn-logs-transformer-substitutestringentry-from): String
  [Source](#cfn-logs-transformer-substitutestringentry-source): String
  [To](#cfn-logs-transformer-substitutestringentry-to): String
```

## Properties
<a name="aws-properties-logs-transformer-substitutestringentry-properties"></a>

`From`  <a name="cfn-logs-transformer-substitutestringentry-from"></a>
The regular expression string to be replaced. Special regex characters such as [ and ] must be escaped using \$1\$1 when using double quotes and with \$1 when using single quotes. For more information, see [ Class Pattern](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html) on the Oracle web site.  
*Required*: Yes  
*Type*: String  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Source`  <a name="cfn-logs-transformer-substitutestringentry-source"></a>
The key to modify  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`To`  <a name="cfn-logs-transformer-substitutestringentry-to"></a>
The string to be substituted for each match of `from`  
*Required*: Yes  
*Type*: String  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer TrimString
<a name="aws-properties-logs-transformer-trimstring"></a>

Use this processor to remove leading and trailing whitespace.

For more information about this processor including examples, see [ trimString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-trimString) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-trimstring-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-trimstring-syntax.json"></a>

```
{
  "[WithKeys](#cfn-logs-transformer-trimstring-withkeys)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-trimstring-syntax.yaml"></a>

```
  [WithKeys](#cfn-logs-transformer-trimstring-withkeys): 
    - String
```

## Properties
<a name="aws-properties-logs-transformer-trimstring-properties"></a>

`WithKeys`  <a name="cfn-logs-transformer-trimstring-withkeys"></a>
The array containing the keys of the fields to trim.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer TypeConverter
<a name="aws-properties-logs-transformer-typeconverter"></a>

Use this processor to convert a value type associated with the specified key to the specified type. It's a casting processor that changes the types of the specified fields. Values can be converted into one of the following datatypes: `integer`, `double`, `string` and `boolean`. 

For more information about this processor including examples, see [ trimString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-trimString) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-typeconverter-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-typeconverter-syntax.json"></a>

```
{
  "[Entries](#cfn-logs-transformer-typeconverter-entries)" : [ TypeConverterEntry, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-typeconverter-syntax.yaml"></a>

```
  [Entries](#cfn-logs-transformer-typeconverter-entries): 
    - TypeConverterEntry
```

## Properties
<a name="aws-properties-logs-transformer-typeconverter-properties"></a>

`Entries`  <a name="cfn-logs-transformer-typeconverter-entries"></a>
An array of `TypeConverterEntry` objects, where each object contains the information about one field to change the type of.   
*Required*: Yes  
*Type*: Array of [TypeConverterEntry](aws-properties-logs-transformer-typeconverterentry.md)  
*Minimum*: `1`  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer TypeConverterEntry
<a name="aws-properties-logs-transformer-typeconverterentry"></a>

This object defines one value type that will be converted using the [ typeConverter](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-typeConverter) processor.

## Syntax
<a name="aws-properties-logs-transformer-typeconverterentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-typeconverterentry-syntax.json"></a>

```
{
  "[Key](#cfn-logs-transformer-typeconverterentry-key)" : String,
  "[Type](#cfn-logs-transformer-typeconverterentry-type)" : String
}
```

### YAML
<a name="aws-properties-logs-transformer-typeconverterentry-syntax.yaml"></a>

```
  [Key](#cfn-logs-transformer-typeconverterentry-key): String
  [Type](#cfn-logs-transformer-typeconverterentry-type): String
```

## Properties
<a name="aws-properties-logs-transformer-typeconverterentry-properties"></a>

`Key`  <a name="cfn-logs-transformer-typeconverterentry-key"></a>
The key with the value that is to be converted to a different type.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*[a-zA-Z0-9]+.*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-logs-transformer-typeconverterentry-type"></a>
The type to convert the field value to. Valid values are `integer`, `double`, `string` and `boolean`.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `boolean | integer | double | string`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Logs::Transformer UpperCaseString
<a name="aws-properties-logs-transformer-uppercasestring"></a>

This processor converts a string field to uppercase.

For more information about this processor including examples, see [ upperCaseString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-upperCaseString) in the *CloudWatch Logs User Guide*.

## Syntax
<a name="aws-properties-logs-transformer-uppercasestring-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-logs-transformer-uppercasestring-syntax.json"></a>

```
{
  "[WithKeys](#cfn-logs-transformer-uppercasestring-withkeys)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-logs-transformer-uppercasestring-syntax.yaml"></a>

```
  [WithKeys](#cfn-logs-transformer-uppercasestring-withkeys): 
    - String
```

## Properties
<a name="aws-properties-logs-transformer-uppercasestring-properties"></a>

`WithKeys`  <a name="cfn-logs-transformer-uppercasestring-withkeys"></a>
The array of containing the keys of the field to convert to uppercase.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)