@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.016Z") public class CfnSubscriptionFilter extends CfnResource implements IInspectable
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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.logs.*; CfnSubscriptionFilter cfnSubscriptionFilter = CfnSubscriptionFilter.Builder.create(this, "MyCfnSubscriptionFilter") .destinationArn("destinationArn") .filterPattern("filterPattern") .logGroupName("logGroupName") // the properties below are optional .distribution("distribution") .filterName("filterName") .roleArn("roleArn") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnSubscriptionFilter.Builder
A fluent builder for
CfnSubscriptionFilter . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnSubscriptionFilter(Construct scope,
java.lang.String id,
CfnSubscriptionFilterProps props)
Create a new `AWS::Logs::SubscriptionFilter`.
|
protected |
CfnSubscriptionFilter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnSubscriptionFilter(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDestinationArn()
The Amazon Resource Name (ARN) of the destination.
|
java.lang.String |
getDistribution()
`AWS::Logs::SubscriptionFilter.Distribution`.
|
java.lang.String |
getFilterName()
The name of the subscription filter.
|
java.lang.String |
getFilterPattern()
The filtering expressions that restrict what gets delivered to the destination AWS resource.
|
java.lang.String |
getLogGroupName()
The log group to associate with the subscription filter.
|
java.lang.String |
getRoleArn()
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDestinationArn(java.lang.String value)
The Amazon Resource Name (ARN) of the destination.
|
void |
setDistribution(java.lang.String value)
`AWS::Logs::SubscriptionFilter.Distribution`.
|
void |
setFilterName(java.lang.String value)
The name of the subscription filter.
|
void |
setFilterPattern(java.lang.String value)
The filtering expressions that restrict what gets delivered to the destination AWS resource.
|
void |
setLogGroupName(java.lang.String value)
The log group to associate with the subscription filter.
|
void |
setRoleArn(java.lang.String value)
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnSubscriptionFilter(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSubscriptionFilter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnSubscriptionFilter(Construct scope, java.lang.String id, CfnSubscriptionFilterProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getDestinationArn()
public void setDestinationArn(java.lang.String value)
public java.lang.String getFilterPattern()
For more information about the filter pattern syntax, see Filter and Pattern Syntax .
public void setFilterPattern(java.lang.String value)
For more information about the filter pattern syntax, see Filter and Pattern Syntax .
public java.lang.String getLogGroupName()
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.
public void setLogGroupName(java.lang.String value)
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.
public java.lang.String getDistribution()
public void setDistribution(java.lang.String value)
public java.lang.String getFilterName()
public void setFilterName(java.lang.String value)
public java.lang.String getRoleArn()
You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
public void setRoleArn(java.lang.String value)
You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.