We recommend new projects start with resources from the AWS provider.
aws-native.logs.SubscriptionFilter
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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,
                       apply_on_transformed_logs: Optional[bool] = 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SubscriptionFilter resource accepts the following input properties:
- DestinationArn string
- The Amazon Resource Name (ARN) of the destination.
- FilterPattern 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.
- LogGroup 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.
- ApplyOn boolTransformed Logs 
- This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.
If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested 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.
- FilterName string
- The name of the subscription filter.
- RoleArn 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.
- DestinationArn string
- The Amazon Resource Name (ARN) of the destination.
- FilterPattern 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.
- LogGroup 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.
- ApplyOn boolTransformed Logs 
- This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.
If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.
- Distribution
SubscriptionFilter Distribution 
- The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- FilterName string
- The name of the subscription filter.
- RoleArn 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.
- destinationArn String
- The Amazon Resource Name (ARN) of the destination.
- filterPattern 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.
- logGroup 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.
- applyOn BooleanTransformed Logs 
- This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.
If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.
- distribution
SubscriptionFilter Distribution 
- The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- filterName String
- The name of the subscription filter.
- roleArn 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.
- destinationArn string
- The Amazon Resource Name (ARN) of the destination.
- filterPattern 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.
- logGroup 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.
- applyOn booleanTransformed Logs 
- This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.
If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.
- distribution
SubscriptionFilter Distribution 
- The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- filterName string
- The name of the subscription filter.
- roleArn 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.
- apply_on_ booltransformed_ logs 
- This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.
If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.
- distribution
SubscriptionFilter 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.
- destinationArn String
- The Amazon Resource Name (ARN) of the destination.
- filterPattern 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.
- logGroup 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.
- applyOn BooleanTransformed Logs 
- This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.
If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.
- distribution
"Random" | "ByLog Stream" 
- The method used to distribute log data to the destination, which can be either random or grouped by log stream.
- filterName String
- The name of the subscription filter.
- roleArn 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
- ByLog Stream 
- ByLogStream
- SubscriptionFilter Distribution Random 
- Random
- SubscriptionFilter Distribution By Log Stream 
- ByLogStream
- Random
- Random
- ByLog Stream 
- ByLogStream
- Random
- Random
- ByLog Stream 
- ByLogStream
- RANDOM
- Random
- BY_LOG_STREAM
- ByLogStream
- "Random"
- Random
- "ByLog Stream" 
- ByLogStream
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.