Class CfnSubscriptionFilter.Builder
java.lang.Object
software.amazon.awscdk.services.logs.CfnSubscriptionFilter.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSubscriptionFilter>
- Enclosing class:
CfnSubscriptionFilter
@Stability(Stable)
public static final class CfnSubscriptionFilter.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSubscriptionFilter>
A fluent builder for
CfnSubscriptionFilter
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
destinationArn
(String destinationArn) The Amazon Resource Name (ARN) of the destination.distribution
(String distribution) The method used to distribute log data to the destination, which can be either random or grouped by log stream.filterName
(String filterName) The name of the subscription filter.filterPattern
(String filterPattern) The filtering expressions that restrict what gets delivered to the destination AWS resource.logGroupName
(String logGroupName) The log group to associate with the subscription filter.The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream.
-
Method Details
-
create
@Stability(Stable) public static CfnSubscriptionFilter.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnSubscriptionFilter.Builder
.
-
destinationArn
The Amazon Resource Name (ARN) of the destination.- Parameters:
destinationArn
- The Amazon Resource Name (ARN) of the destination. This parameter is required.- Returns:
this
- See Also:
-
filterPattern
The filtering expressions that restrict what gets delivered to the destination AWS resource.For more information about the filter pattern syntax, see Filter and Pattern Syntax .
- Parameters:
filterPattern
- The filtering expressions that restrict what gets delivered to the destination AWS resource. This parameter is required.- Returns:
this
- See Also:
-
logGroupName
The log group to associate with the subscription filter.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.
- Parameters:
logGroupName
- The log group to associate with the subscription filter. This parameter is required.- Returns:
this
- See Also:
-
distribution
The method used to distribute log data to the destination, which can be either random or grouped by log stream.- Parameters:
distribution
- The method used to distribute log data to the destination, which can be either random or grouped by log stream. This parameter is required.- Returns:
this
- See Also:
-
filterName
The name of the subscription filter.- Parameters:
filterName
- The name of the subscription filter. This parameter is required.- Returns:
this
- See Also:
-
roleArn
The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream.You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.
- Parameters:
roleArn
- The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnSubscriptionFilter>
- Returns:
- a newly built instance of
CfnSubscriptionFilter
.
-