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

export interface UserPolicyArgs extends core.ResourceArgs {
  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  policy: string | core.StringOut;

  user: string | core.StringOut;
}

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

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

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

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

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

  constructor(name: string, args?: UserPolicyArgs) {
    super(name, "aws_iam_user_policy", args);
  }

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