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

export interface QueryDefinitionArgs extends core.ResourceArgs {
  logGroupNames?: core.Array<string> | core.ArrayOut<core.StringOut>;

  name: string | core.StringOut;

  queryString: string | core.StringOut;
}

export class QueryDefinition extends core.Resource<QueryDefinitionArgs> {
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(String, { kind: "array" })
  public logGroupNames?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

  constructor(name: string, args?: QueryDefinitionArgs) {
    super(name, "aws_cloudwatch_query_definition", args);
  }

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