@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.702Z") @Stability(value=Stable) 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 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
.roleArn("roleArn")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnSubscriptionFilter.Builder
A fluent builder for
CfnSubscriptionFilter. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnSubscriptionFilter(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrFilterName() |
protected Map<String,Object> |
getCfnProperties() |
String |
getDestinationArn()
The Amazon Resource Name (ARN) of the destination.
|
String |
getFilterPattern()
The filtering expressions that restrict what gets delivered to the destination AWS resource.
|
String |
getLogGroupName()
The log group to associate with the subscription filter.
|
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 Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDestinationArn(String value)
The Amazon Resource Name (ARN) of the destination.
|
void |
setFilterPattern(String value)
The filtering expressions that restrict what gets delivered to the destination AWS resource.
|
void |
setLogGroupName(String value)
The log group to associate with the subscription filter.
|
void |
setRoleArn(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, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnSubscriptionFilter(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSubscriptionFilter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnSubscriptionFilter(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrFilterName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getDestinationArn()
@Stability(value=Stable)
public void setDestinationArn(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getFilterPattern()
For more information about the filter pattern syntax, see Filter and Pattern Syntax .
@Stability(value=Stable)
public void setFilterPattern(@NotNull
String value)
For more information about the filter pattern syntax, see Filter and Pattern Syntax .
@Stability(value=Stable) @NotNull public 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.
@Stability(value=Stable)
public void setLogGroupName(@NotNull
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.
@Stability(value=Stable) @Nullable public String getRoleArn()
You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
@Stability(value=Stable)
public void setRoleArn(@Nullable
String value)
You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
Copyright © 2022. All rights reserved.