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

export interface LambdaFunctionAssociationArgs extends core.ResourceArgs {
  /**
   * (Required) Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifie
   * r.
   */
  functionArn: string | core.StringOut;

  /**
   * (Required) The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of
   * the instance.
   */
  instanceId: string | core.StringOut;
}

export class LambdaFunctionAssociation extends core.Resource<LambdaFunctionAssociationArgs> {
  /**
   * (Required) Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifie
   * r.
   */
  @core.attr(String)
  public functionArn!: string | core.StringOut;

  /**
   * The Amazon Connect instance ID and Lambda Function ARN separated by a comma (`,`).
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Required) The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of
   * the instance.
   */
  @core.attr(String)
  public instanceId!: string | core.StringOut;

  constructor(name: string, args?: LambdaFunctionAssociationArgs) {
    super(name, "aws_connect_lambda_function_association", args);
  }

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