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

export interface WorkspaceApiKeyArgs extends core.ResourceArgs {
  keyName: string | core.StringOut;

  keyRole: string | core.StringOut;

  secondsToLive: number | core.NumberOut;

  workspaceId: string | core.StringOut;
}

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

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

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

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

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

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

  constructor(name: string, args?: WorkspaceApiKeyArgs) {
    super(name, "aws_grafana_workspace_api_key", args);
  }

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