1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. logs
  5. SubscriptionFilter

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.logs.SubscriptionFilter

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    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

    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.
    LogGroupName string
    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.AwsNative.Logs.SubscriptionFilterDistribution
    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.
    LogGroupName string
    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 SubscriptionFilterDistribution
    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.
    logGroupName String
    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 SubscriptionFilterDistribution
    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.
    logGroupName string
    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 SubscriptionFilterDistribution
    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_name str
    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 SubscriptionFilterDistribution
    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.
    logGroupName String
    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" | "ByLogStream"
    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
    ByLogStream
    ByLogStream
    SubscriptionFilterDistributionRandom
    Random
    SubscriptionFilterDistributionByLogStream
    ByLogStream
    Random
    Random
    ByLogStream
    ByLogStream
    Random
    Random
    ByLogStream
    ByLogStream
    RANDOM
    Random
    BY_LOG_STREAM
    ByLogStream
    "Random"
    Random
    "ByLogStream"
    ByLogStream

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi