Class CfnSubscriptionFilter
The AWS::Logs::SubscriptionFilter resource specifies a subscription filter and associates it with the specified log group.
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnSubscriptionFilter : CfnResource, IInspectable, ISubscriptionFilterRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnSubscriptionFilter Inherits CfnResource Implements IInspectable, ISubscriptionFilterRef, IConstruct, IDependable, IEnvironmentAware
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Logs;
var cfnSubscriptionFilter = new CfnSubscriptionFilter(this, "MyCfnSubscriptionFilter", new CfnSubscriptionFilterProps {
DestinationArn = "destinationArn",
FilterPattern = "filterPattern",
LogGroupName = "logGroupName",
// the properties below are optional
ApplyOnTransformedLogs = false,
Distribution = "distribution",
EmitSystemFields = new [] { "emitSystemFields" },
FieldSelectionCriteria = "fieldSelectionCriteria",
FilterName = "filterName",
RoleArn = "roleArn"
});
Synopsis
Constructors
| CfnSubscriptionFilter(Construct, string, ICfnSubscriptionFilterProps) | The |
Properties
| ApplyOnTransformedLogs | This parameter is valid only for log groups that have an active log transformer. |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CfnProperties | The |
| DestinationArn | The Amazon Resource Name (ARN) of the destination. |
| Distribution | The method used to distribute log data to the destination, which can be either random or grouped by log stream. |
| EmitSystemFields | The list of system fields that are included in the log events sent to the subscription destination. |
| FieldSelectionCriteria | The filter expression that specifies which log events are processed by this subscription filter based on system fields. |
| FilterName | The name of the subscription filter. |
| FilterPattern | The filtering expressions that restrict what gets delivered to the destination AWS resource. |
| LogGroupName | The log group to associate with the subscription filter. |
| RoleArn | The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. |
| SubscriptionFilterRef | A reference to a SubscriptionFilter resource. |
Methods
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| RenderProperties(IDictionary<string, object>) | The |
Constructors
CfnSubscriptionFilter(Construct, string, ICfnSubscriptionFilterProps)
The AWS::Logs::SubscriptionFilter resource specifies a subscription filter and associates it with the specified log group.
public CfnSubscriptionFilter(Construct scope, string id, ICfnSubscriptionFilterProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnSubscriptionFilterProps
Resource properties.
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
Properties
ApplyOnTransformedLogs
This parameter is valid only for log groups that have an active log transformer.
public virtual object? ApplyOnTransformedLogs { get; set; }
Property Value
Remarks
Type union: either bool or IResolvable
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
CfnProperties
The AWS::Logs::SubscriptionFilter resource specifies a subscription filter and associates it with the specified log group.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
DestinationArn
The Amazon Resource Name (ARN) of the destination.
public virtual string DestinationArn { get; set; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
Distribution
The method used to distribute log data to the destination, which can be either random or grouped by log stream.
public virtual string? Distribution { get; set; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
EmitSystemFields
The list of system fields that are included in the log events sent to the subscription destination.
public virtual string[]? EmitSystemFields { get; set; }
Property Value
string[]
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
FieldSelectionCriteria
The filter expression that specifies which log events are processed by this subscription filter based on system fields.
public virtual string? FieldSelectionCriteria { get; set; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
FilterName
The name of the subscription filter.
public virtual string? FilterName { get; set; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
FilterPattern
The filtering expressions that restrict what gets delivered to the destination AWS resource.
public virtual string FilterPattern { get; set; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
LogGroupName
The log group to associate with the subscription filter.
public virtual string LogGroupName { get; set; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
RoleArn
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream.
public virtual string? RoleArn { get; set; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
SubscriptionFilterRef
A reference to a SubscriptionFilter resource.
public virtual ISubscriptionFilterReference SubscriptionFilterRef { get; }
Property Value
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
The AWS::Logs::SubscriptionFilter resource specifies a subscription filter and associates it with the specified log group.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
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:
There can be as many as two subscription filters associated with a log group.
CloudformationResource: AWS::Logs::SubscriptionFilter
ExampleMetadata: fixture=_generated