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

export interface CloudwatchEventBusPolicyArgs extends core.ResourceArgs {
  eventBusName?: string | core.StringOut;

  policy: string | core.StringOut;
}

export class CloudwatchEventBusPolicy extends core.Resource<CloudwatchEventBusPolicyArgs> {
  @core.attr(String)
  public eventBusName?: string | core.StringOut;

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

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

  constructor(name: string, args?: CloudwatchEventBusPolicyArgs) {
    super(name, "aws_cloudwatch_event_bus_policy", args);
  }

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