Class SubscriptionFilterProps.Builder
java.lang.Object
software.amazon.awscdk.services.logs.SubscriptionFilterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SubscriptionFilterProps>
- Enclosing interface:
SubscriptionFilterProps
@Stability(Stable)
public static final class SubscriptionFilterProps.Builder
extends Object
implements software.amazon.jsii.Builder<SubscriptionFilterProps>
A builder for
SubscriptionFilterProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.destination
(ILogSubscriptionDestination destination) Sets the value ofSubscriptionFilterOptions.getDestination()
filterName
(String filterName) Sets the value ofSubscriptionFilterOptions.getFilterName()
filterPattern
(IFilterPattern filterPattern) Sets the value ofSubscriptionFilterOptions.getFilterPattern()
Sets the value ofSubscriptionFilterProps.getLogGroup()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
logGroup
Sets the value ofSubscriptionFilterProps.getLogGroup()
- Parameters:
logGroup
- The log group to create the subscription on. This parameter is required.- Returns:
this
-
destination
@Stability(Stable) public SubscriptionFilterProps.Builder destination(ILogSubscriptionDestination destination) Sets the value ofSubscriptionFilterOptions.getDestination()
- Parameters:
destination
- The destination to send the filtered events to. This parameter is required. For example, a Kinesis stream or a Lambda function.- Returns:
this
-
filterPattern
@Stability(Stable) public SubscriptionFilterProps.Builder filterPattern(IFilterPattern filterPattern) Sets the value ofSubscriptionFilterOptions.getFilterPattern()
- Parameters:
filterPattern
- Log events matching this pattern will be sent to the destination. This parameter is required.- Returns:
this
-
filterName
Sets the value ofSubscriptionFilterOptions.getFilterName()
- Parameters:
filterName
- The name of the subscription filter.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SubscriptionFilterProps>
- Returns:
- a new instance of
SubscriptionFilterProps
- Throws:
NullPointerException
- if any required attribute was not provided
-