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

export interface LoadBalancerBackendServerPolicyArgs extends core.ResourceArgs {
  instancePort: number | core.NumberOut;

  loadBalancerName: string | core.StringOut;

  policyNames?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

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

  @core.attr(Number)
  public instancePort!: number | core.NumberOut;

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

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

  constructor(name: string, args?: LoadBalancerBackendServerPolicyArgs) {
    super(name, "aws_load_balancer_backend_server_policy", args);
  }

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