Class CfnSubscriptionFilter
A CloudFormation AWS::Logs::SubscriptionFilter
.
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.AWS.Logs.dll
Syntax (csharp)
public class CfnSubscriptionFilter : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnSubscriptionFilter
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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:
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
Distribution = "distribution",
FilterName = "filterName",
RoleArn = "roleArn"
});
Synopsis
Constructors
CfnSubscriptionFilter(Construct, String, ICfnSubscriptionFilterProps) | Create a new |
CfnSubscriptionFilter(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnSubscriptionFilter(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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. |
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. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnSubscriptionFilter(Construct, String, ICfnSubscriptionFilterProps)
Create a new AWS::Logs::SubscriptionFilter
.
public CfnSubscriptionFilter(Construct scope, string id, ICfnSubscriptionFilterProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnSubscriptionFilterProps
- resource properties.
CfnSubscriptionFilter(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnSubscriptionFilter(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnSubscriptionFilter(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnSubscriptionFilter(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DestinationArn
The Amazon Resource Name (ARN) of the destination.
public virtual string DestinationArn { get; set; }
Property Value
System.String
Remarks
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
System.String
Remarks
FilterName
The name of the subscription filter.
public virtual string FilterName { get; set; }
Property Value
System.String
Remarks
FilterPattern
The filtering expressions that restrict what gets delivered to the destination AWS resource.
public virtual string FilterPattern { get; set; }
Property Value
System.String
Remarks
For more information about the filter pattern syntax, see Filter and Pattern Syntax .
LogGroupName
The log group to associate with the subscription filter.
public virtual string LogGroupName { get; set; }
Property Value
System.String
Remarks
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.
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
System.String
Remarks
You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
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.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>