def put_subscription_filter(logGroupName=None, filterName=None,
    filterPattern=None, destinationArn=None, roleArn=None, distribution=None):
    """
    Creates or updates 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 ingested through  PutLogEvents and have them delivered to a specific destination. Currently, the supported destinations are:
    There can only be one subscription filter associated with a log group. If you are updating an existing filter, you must specify the correct name in filterName . Otherwise, the call will fail because you cannot associate a second filter with a log group.
    See also: AWS API Documentation
    
    
    :example: response = client.put_subscription_filter(
        logGroupName='string',
        filterName='string',
        filterPattern='string',
        destinationArn='string',
        roleArn='string',
        distribution='Random'|'ByLogStream'
    )
    
    
    :type logGroupName: string
    :param logGroupName: [REQUIRED]
            The name of the log group.
            

    :type filterName: string
    :param filterName: [REQUIRED]
            A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName . Otherwise, the call will fail because you cannot associate a second filter with a log group. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters .
            

    :type filterPattern: string
    :param filterPattern: [REQUIRED]
            A filter pattern for subscribing to a filtered stream of log events.
            

    :type destinationArn: string
    :param destinationArn: [REQUIRED]
            The ARN of the destination to deliver matching log events to. Currently, the supported destinations are:
            An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery.
            A logical destination (specified using an ARN) belonging to a different account, for cross-account delivery.
            An Amazon Kinesis Firehose stream belonging to the same account as the subscription filter, for same-account delivery.
            An AWS Lambda function belonging to the same account as the subscription filter, for same-account delivery.
            

    :type roleArn: string
    :param 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.

    :type distribution: string
    :param distribution: The method used to distribute log data to the destination, when the destination is an Amazon Kinesis stream. By default, log data is grouped by log stream. For a more even distribution, you can group log data randomly.

    :returns: 
    logGroupName (string) -- [REQUIRED]
    The name of the log group.
    
    filterName (string) -- [REQUIRED]
    A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName . Otherwise, the call will fail because you cannot associate a second filter with a log group. To find the name of the filter currently associated with a log group, use  DescribeSubscriptionFilters .
    
    filterPattern (string) -- [REQUIRED]
    A filter pattern for subscribing to a filtered stream of log events.
    
    destinationArn (string) -- [REQUIRED]
    The ARN of the destination to deliver matching log events to. Currently, the supported destinations are:
    
    An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery.
    A logical destination (specified using an ARN) belonging to a different account, for cross-account delivery.
    An Amazon Kinesis Firehose stream belonging to the same account as the subscription filter, for same-account delivery.
    An AWS Lambda function belonging to the same account as the subscription filter, for same-account delivery.
    
    
    roleArn (string) -- 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.
    distribution (string) -- The method used to distribute log data to the destination, when the destination is an Amazon Kinesis stream. By default, log data is grouped by log stream. For a more even distribution, you can group log data randomly.
    
    """
    pass
