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

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

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

  inputParameters?: string | core.StringOut;

  maximumExecutionFrequency?: string | core.StringOut;

  name: string | core.StringOut;

  resourceIdScope?: string | core.StringOut;

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

  ruleIdentifier: string | core.StringOut;

  tagKeyScope?: string | core.StringOut;

  tagValueScope?: string | core.StringOut;
}

export class OrganizationManagedRule extends core.Resource<OrganizationManagedRuleArgs> {
  @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 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 ruleIdentifier!: string | core.StringOut;

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

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

  constructor(name: string, args?: OrganizationManagedRuleArgs) {
    super(name, "aws_config_organization_managed_rule", args);
  }

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