AWS Native is in preview. AWS Classic is fully supported.
aws-native.logs.SubscriptionFilter
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
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:
- An Amazon Kinesis data stream belonging to the same account as the subscription filter, for same-account delivery.
- A logical destination that belongs to a different account, for cross-account delivery.
- An Amazon Kinesis Firehose delivery stream that belongs to the same account as the subscription filter, for same-account delivery.
- An LAMlong function that belongs to the same account as the subscription filter, for same-account delivery.
There can be as many as two subscription filters associated with a log group.
Create SubscriptionFilter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SubscriptionFilter(name: string, args: SubscriptionFilterArgs, opts?: CustomResourceOptions);
@overload
def SubscriptionFilter(resource_name: str,
args: SubscriptionFilterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SubscriptionFilter(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_arn: Optional[str] = None,
filter_pattern: Optional[str] = None,
log_group_name: Optional[str] = None,
distribution: Optional[SubscriptionFilterDistribution] = None,
filter_name: Optional[str] = None,
role_arn: Optional[str] = None)
func NewSubscriptionFilter(ctx *Context, name string, args SubscriptionFilterArgs, opts ...ResourceOption) (*SubscriptionFilter, error)
public SubscriptionFilter(string name, SubscriptionFilterArgs args, CustomResourceOptions? opts = null)
public SubscriptionFilter(String name, SubscriptionFilterArgs args)
public SubscriptionFilter(String name, SubscriptionFilterArgs args, CustomResourceOptions options)
type: aws-native:logs:SubscriptionFilter
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SubscriptionFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SubscriptionFilterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SubscriptionFilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubscriptionFilterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SubscriptionFilter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SubscriptionFilter resource accepts the following input properties:
- Destination
Arn string - The Amazon Resource Name (ARN) of the destination.
- Filter
Pattern string - 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.
- Log
Group stringName - 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.
- Distribution
Pulumi.
Aws Native. Logs. Subscription Filter Distribution - The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- Filter
Name string - The name of the subscription filter.
- Role
Arn string - The ARN of an IAM role that grants CWL 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.
- Destination
Arn string - The Amazon Resource Name (ARN) of the destination.
- Filter
Pattern string - 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.
- Log
Group stringName - 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.
- Distribution
Subscription
Filter Distribution - The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- Filter
Name string - The name of the subscription filter.
- Role
Arn string - The ARN of an IAM role that grants CWL 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.
- destination
Arn String - The Amazon Resource Name (ARN) of the destination.
- filter
Pattern String - 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.
- log
Group StringName - 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.
- distribution
Subscription
Filter Distribution - The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- filter
Name String - The name of the subscription filter.
- role
Arn String - The ARN of an IAM role that grants CWL 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.
- destination
Arn string - The Amazon Resource Name (ARN) of the destination.
- filter
Pattern string - 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.
- log
Group stringName - 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.
- distribution
Subscription
Filter Distribution - The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- filter
Name string - The name of the subscription filter.
- role
Arn string - The ARN of an IAM role that grants CWL 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.
- destination_
arn str - The Amazon Resource Name (ARN) of the destination.
- filter_
pattern str - 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.
- log_
group_ strname - 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.
- distribution
Subscription
Filter Distribution - The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- filter_
name str - The name of the subscription filter.
- role_
arn str - The ARN of an IAM role that grants CWL 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.
- destination
Arn String - The Amazon Resource Name (ARN) of the destination.
- filter
Pattern String - 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.
- log
Group StringName - 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.
- distribution
"Random" | "By
Log Stream" - The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- filter
Name String - The name of the subscription filter.
- role
Arn String - The ARN of an IAM role that grants CWL 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the SubscriptionFilter resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
SubscriptionFilterDistribution, SubscriptionFilterDistributionArgs
- Random
- Random
- By
Log Stream - ByLogStream
- Subscription
Filter Distribution Random - Random
- Subscription
Filter Distribution By Log Stream - ByLogStream
- Random
- Random
- By
Log Stream - ByLogStream
- Random
- Random
- By
Log Stream - ByLogStream
- RANDOM
- Random
- BY_LOG_STREAM
- ByLogStream
- "Random"
- Random
- "By
Log Stream" - ByLogStream
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.