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

export interface ResourceShareArgs extends core.ResourceArgs {
  /**
   * (Optional) Indicates whether principals outside your organization can be associated with a resource
   * share.
   */
  allowExternalPrincipals?: boolean | core.BooleanOut;

  /**
   * (Required) The name of the resource share.
   */
  name: string | core.StringOut;

  /**
   * (Optional) Specifies the Amazon Resource Names (ARNs) of the RAM permission to associate with the re
   * source share. If you do not specify an ARN for the permission, RAM automatically attaches the defaul
   * t version of the permission for each resource type. You can associate only one permission with each
   * resource type included in the resource share.
   */
  permissionArns?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) A map of tags to assign to the resource share. If configured with a provider [`default_ta
   * gs` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_t
   * ags-configuration-block) present, tags with matching keys will overwrite those defined at the provid
   * er-level.
   */
  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * A map of tags assigned to the resource, including those inherited from the provider [`default_tags`
   * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-
   * configuration-block).
   */
  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;
}

export class ResourceShare extends core.Resource<ResourceShareArgs> {
  /**
   * (Optional) Indicates whether principals outside your organization can be associated with a resource
   * share.
   */
  @core.attr(Boolean)
  public allowExternalPrincipals?: boolean | core.BooleanOut;

  /**
   * The Amazon Resource Name (ARN) of the resource share.
   */
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  /**
   * The Amazon Resource Name (ARN) of the resource share.
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Required) The name of the resource share.
   */
  @core.attr(String)
  public name!: string | core.StringOut;

  /**
   * (Optional) Specifies the Amazon Resource Names (ARNs) of the RAM permission to associate with the re
   * source share. If you do not specify an ARN for the permission, RAM automatically attaches the defaul
   * t version of the permission for each resource type. You can associate only one permission with each
   * resource type included in the resource share.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public permissionArns?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) A map of tags to assign to the resource share. If configured with a provider [`default_ta
   * gs` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_t
   * ags-configuration-block) present, tags with matching keys will overwrite those defined at the provid
   * er-level.
   */
  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * A map of tags assigned to the resource, including those inherited from the provider [`default_tags`
   * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-
   * configuration-block).
   */
  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: ResourceShareArgs) {
    super(name, "aws_ram_resource_share", args);
  }

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