import * as core from "@terrascript/core";

export interface LogSubscriptionFilterArgs extends core.ResourceArgs {
  destinationArn: string | core.StringOut;

  distribution?: string | core.StringOut;

  filterPattern: string | core.StringOut;

  logGroupName: string | core.StringOut;

  name: string | core.StringOut;

  roleArn?: string | core.StringOut;
}

export class LogSubscriptionFilter extends core.Resource<LogSubscriptionFilterArgs> {
  @core.attr(String)
  public destinationArn!: string | core.StringOut;

  @core.attr(String)
  public distribution?: string | core.StringOut;

  @core.attr(String)
  public filterPattern!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(String)
  public logGroupName!: string | core.StringOut;

  @core.attr(String)
  public name!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public roleArn?: string | core.StringOut;

  constructor(name: string, args?: LogSubscriptionFilterArgs) {
    super(name, "aws_cloudwatch_log_subscription_filter", args);
  }

  public override getNamespace(): string {
    return "aws_cloudwatch";
  }
}
