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

export interface OrganizationCustomRuleArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

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

  inputParameters?: string | core.StringOut;

  lambdaFunctionArn: string | core.StringOut;

  maximumExecutionFrequency?: string | core.StringOut;

  name: string | core.StringOut;

  resourceIdScope?: string | core.StringOut;

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

  tagKeyScope?: string | core.StringOut;

  tagValueScope?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: OrganizationCustomRuleArgs) {
    super(name, "aws_config_organization_custom_rule", args);
  }

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