import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * Provides a resource to manage rds postgresql instance
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooZones = volcengine.rds_postgresql.getZones({});
 * // create vpc
 * const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
 *     vpcName: "acc-test-vpc",
 *     cidrBlock: "172.16.0.0/16",
 *     dnsServers: [
 *         "8.8.8.8",
 *         "114.114.114.114",
 *     ],
 *     projectName: "default",
 * });
 * // create subnet
 * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
 *     subnetName: "acc-test-subnet",
 *     cidrBlock: "172.16.0.0/24",
 *     zoneId: data.volcengine_zones.foo.zones[0].id,
 *     vpcId: fooVpc.id,
 * });
 * // create postgresql instance
 * const fooInstance = new volcengine.rds_postgresql.Instance("fooInstance", {
 *     dbEngineVersion: "PostgreSQL_12",
 *     nodeSpec: "rds.postgres.1c2g",
 *     primaryZoneId: data.volcengine_zones.foo.zones[0].id,
 *     secondaryZoneId: data.volcengine_zones.foo.zones[0].id,
 *     storageSpace: 40,
 *     subnetId: fooSubnet.id,
 *     instanceName: "acc-test-postgresql-instance",
 *     chargeInfo: {
 *         chargeType: "PostPaid",
 *     },
 *     projectName: "default",
 *     tags: [{
 *         key: "tfk1",
 *         value: "tfv1",
 *     }],
 *     parameters: [
 *         {
 *             name: "auto_explain.log_analyze",
 *             value: "off",
 *         },
 *         {
 *             name: "auto_explain.log_format",
 *             value: "text",
 *         },
 *     ],
 * });
 * // create postgresql instance readonly node
 * const fooInstanceReadonlyNode = new volcengine.rds_postgresql.InstanceReadonlyNode("fooInstanceReadonlyNode", {
 *     instanceId: fooInstance.id,
 *     nodeSpec: "rds.postgres.1c2g",
 *     zoneId: data.volcengine_zones.foo.zones[0].id,
 * });
 * // create postgresql allow list
 * const fooAllowlist = new volcengine.rds_postgresql.Allowlist("fooAllowlist", {
 *     allowListName: "acc-test-allowlist",
 *     allowListDesc: "acc-test",
 *     allowListType: "IPv4",
 *     allowLists: [
 *         "192.168.0.0/24",
 *         "192.168.1.0/24",
 *     ],
 * });
 * // associate postgresql allow list to postgresql instance
 * const fooAllowlistAssociate = new volcengine.rds_postgresql.AllowlistAssociate("fooAllowlistAssociate", {
 *     instanceId: fooInstance.id,
 *     allowListId: fooAllowlist.id,
 * });
 * // create postgresql database
 * const fooDatabase = new volcengine.rds_postgresql.Database("fooDatabase", {
 *     dbName: "acc-test-database",
 *     instanceId: fooInstance.id,
 *     cType: "C",
 *     collate: "zh_CN.utf8",
 * });
 * // create postgresql account
 * const fooAccount = new volcengine.rds_postgresql.Account("fooAccount", {
 *     accountName: "acc-test-account",
 *     accountPassword: "9wc@********12",
 *     accountType: "Normal",
 *     instanceId: fooInstance.id,
 *     accountPrivileges: "Inherit,Login,CreateRole,CreateDB",
 * });
 * // create postgresql schema
 * const fooSchema = new volcengine.rds_postgresql.Schema("fooSchema", {
 *     dbName: fooDatabase.dbName,
 *     instanceId: fooInstance.id,
 *     owner: fooAccount.accountName,
 *     schemaName: "acc-test-schema",
 * });
 * // Restore the backup to a new instance
 * const example = new volcengine.rds_postgresql.Instance("example", {
 *     srcInstanceId: "postgres-faa4921fdde4",
 *     backupId: "20251215-215628F",
 *     dbEngineVersion: "PostgreSQL_12",
 *     nodeSpec: "rds.postgres.1c2g",
 *     subnetId: fooSubnet.id,
 *     instanceName: "acc-test-postgresql-instance-restore",
 *     chargeInfo: {
 *         chargeType: "PostPaid",
 *         number: 1,
 *     },
 *     primaryZoneId: data.volcengine_zones.foo.zones[0].id,
 *     secondaryZoneId: data.volcengine_zones.foo.zones[0].id,
 * });
 * ```
 *
 * ## Import
 *
 * RdsPostgresqlInstance can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:rds_postgresql/instance:Instance default postgres-21a3333b****
 * ```
 */
export declare class Instance extends pulumi.CustomResource {
    /**
     * Get an existing Instance resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance;
    /**
     * Returns true if the given object is an instance of Instance.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj: any): obj is Instance;
    /**
     * Allow list IDs to bind at creation.
     */
    readonly allowListIds: pulumi.Output<string[] | undefined>;
    /**
     * The allow list version of the RDS PostgreSQL instance.
     */
    readonly allowListVersion: pulumi.Output<string>;
    /**
     * Backup ID (choose either this or restore_time; if both are set, backupId shall prevail).
     */
    readonly backupId: pulumi.Output<string | undefined>;
    /**
     * The instance has used backup space. Unit: GB.
     */
    readonly backupUse: pulumi.Output<number>;
    /**
     * Payment methods.
     */
    readonly chargeDetails: pulumi.Output<outputs.rds_postgresql.InstanceChargeDetail[]>;
    /**
     * Payment methods.
     */
    readonly chargeInfo: pulumi.Output<outputs.rds_postgresql.InstanceChargeInfo>;
    /**
     * Node creation local time.
     */
    readonly createTime: pulumi.Output<string>;
    /**
     * Data synchronization mode.
     */
    readonly dataSyncMode: pulumi.Output<string>;
    /**
     * Instance type. Value: PostgreSQL_11, PostgreSQL_12, PostgreSQL_13, PostgreSQL_14, PostgreSQL_15, PostgreSQL_16, PostgreSQL_17.
     */
    readonly dbEngineVersion: pulumi.Output<string>;
    /**
     * The endpoint info of the RDS instance.
     */
    readonly endpoints: pulumi.Output<outputs.rds_postgresql.InstanceEndpoint[]>;
    /**
     * Whether to initiate a configuration change assessment. Only estimate spec change impact without executing. Default value: false.
     */
    readonly estimateOnly: pulumi.Output<boolean | undefined>;
    /**
     * The estimated impact on the instance after the current configuration changes.
     */
    readonly estimationResults: pulumi.Output<outputs.rds_postgresql.InstanceEstimationResult[]>;
    /**
     * Instance ID.
     */
    readonly instanceId: pulumi.Output<string>;
    /**
     * Instance name. Cannot start with a number or a dash. Can only contain Chinese characters, letters, numbers, underscores and dashes. The length is limited between 1 ~ 128.
     */
    readonly instanceName: pulumi.Output<string | undefined>;
    /**
     * The status of the RDS PostgreSQL instance.
     */
    readonly instanceStatus: pulumi.Output<string>;
    /**
     * The instance type of the RDS PostgreSQL instance.
     */
    readonly instanceType: pulumi.Output<string>;
    /**
     * Memory size in GB.
     */
    readonly memory: pulumi.Output<number>;
    /**
     * Spec change type. Usually(default) or Temporary.
     */
    readonly modifyType: pulumi.Output<string | undefined>;
    /**
     * The number of nodes.
     */
    readonly nodeNumber: pulumi.Output<number>;
    /**
     * The specification of primary node and secondary node.
     */
    readonly nodeSpec: pulumi.Output<string>;
    /**
     * Instance node information.
     */
    readonly nodes: pulumi.Output<outputs.rds_postgresql.InstanceNode[]>;
    /**
     * Parameter of the RDS PostgreSQL instance. This field can only be added or modified. Deleting this field is invalid.
     */
    readonly parameters: pulumi.Output<outputs.rds_postgresql.InstanceParameter[] | undefined>;
    /**
     * The available zone of primary node.
     */
    readonly primaryZoneId: pulumi.Output<string>;
    /**
     * The project name of the RDS instance.
     */
    readonly projectName: pulumi.Output<string>;
    /**
     * The region of the RDS PostgreSQL instance.
     */
    readonly regionId: pulumi.Output<string>;
    /**
     * The point in time to restore to, in UTC format yyyy-MM-ddTHH:mm:ssZ (choose either this or backup_id).
     */
    readonly restoreTime: pulumi.Output<string | undefined>;
    /**
     * Rollback time for Temporary change, UTC format yyyy-MM-ddTHH:mm:ss.sssZ.
     */
    readonly rollbackTime: pulumi.Output<string | undefined>;
    /**
     * The available zone of secondary node.
     */
    readonly secondaryZoneId: pulumi.Output<string>;
    /**
     * Source instance ID. After setting it, a new instance will be created by restoring from the backup/time point.
     */
    readonly srcInstanceId: pulumi.Output<string | undefined>;
    /**
     * The instance's primary node has used storage space. Unit: Byte.
     */
    readonly storageDataUse: pulumi.Output<number>;
    /**
     * The instance's primary node has used log storage space. Unit: Byte.
     */
    readonly storageLogUse: pulumi.Output<number>;
    /**
     * Instance storage space. Value range: [20, 3000], unit: GB, step 10GB. Default value: 100.
     */
    readonly storageSpace: pulumi.Output<number | undefined>;
    /**
     * The instance's primary node has used temporary storage space. Unit: Byte.
     */
    readonly storageTempUse: pulumi.Output<number>;
    /**
     * Instance storage type.
     */
    readonly storageType: pulumi.Output<string>;
    /**
     * The instance has used storage space. Unit: Byte.
     */
    readonly storageUse: pulumi.Output<number>;
    /**
     * The instance's primary node has used WAL storage space. Unit: Byte.
     */
    readonly storageWalUse: pulumi.Output<number>;
    /**
     * Subnet ID of the RDS PostgreSQL instance.
     */
    readonly subnetId: pulumi.Output<string>;
    /**
     * Tags.
     */
    readonly tags: pulumi.Output<outputs.rds_postgresql.InstanceTag[] | undefined>;
    /**
     * The update time of the RDS PostgreSQL instance.
     */
    readonly updateTime: pulumi.Output<string>;
    /**
     * CPU size.
     */
    readonly vCpu: pulumi.Output<number>;
    /**
     * The vpc ID of the RDS PostgreSQL instance.
     */
    readonly vpcId: pulumi.Output<string>;
    /**
     * The available zone of the RDS PostgreSQL instance.
     */
    readonly zoneId: pulumi.Output<string>;
    /**
     * ID of the availability zone where each instance is located.
     */
    readonly zoneIds: pulumi.Output<string[]>;
    /**
     * Nodes to migrate AZ. Only Secondary or ReadOnly nodes are allowed. If you want to migrate the availability zone of the secondary node, you need to add the zoneMigrations field. Modifying the secondaryZoneId directly will not work. Cross-AZ instance migration is not supported.
     */
    readonly zoneMigrations: pulumi.Output<outputs.rds_postgresql.InstanceZoneMigration[] | undefined>;
    /**
     * Create a Instance resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering Instance resources.
 */
export interface InstanceState {
    /**
     * Allow list IDs to bind at creation.
     */
    allowListIds?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The allow list version of the RDS PostgreSQL instance.
     */
    allowListVersion?: pulumi.Input<string>;
    /**
     * Backup ID (choose either this or restore_time; if both are set, backupId shall prevail).
     */
    backupId?: pulumi.Input<string>;
    /**
     * The instance has used backup space. Unit: GB.
     */
    backupUse?: pulumi.Input<number>;
    /**
     * Payment methods.
     */
    chargeDetails?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceChargeDetail>[]>;
    /**
     * Payment methods.
     */
    chargeInfo?: pulumi.Input<inputs.rds_postgresql.InstanceChargeInfo>;
    /**
     * Node creation local time.
     */
    createTime?: pulumi.Input<string>;
    /**
     * Data synchronization mode.
     */
    dataSyncMode?: pulumi.Input<string>;
    /**
     * Instance type. Value: PostgreSQL_11, PostgreSQL_12, PostgreSQL_13, PostgreSQL_14, PostgreSQL_15, PostgreSQL_16, PostgreSQL_17.
     */
    dbEngineVersion?: pulumi.Input<string>;
    /**
     * The endpoint info of the RDS instance.
     */
    endpoints?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceEndpoint>[]>;
    /**
     * Whether to initiate a configuration change assessment. Only estimate spec change impact without executing. Default value: false.
     */
    estimateOnly?: pulumi.Input<boolean>;
    /**
     * The estimated impact on the instance after the current configuration changes.
     */
    estimationResults?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceEstimationResult>[]>;
    /**
     * Instance ID.
     */
    instanceId?: pulumi.Input<string>;
    /**
     * Instance name. Cannot start with a number or a dash. Can only contain Chinese characters, letters, numbers, underscores and dashes. The length is limited between 1 ~ 128.
     */
    instanceName?: pulumi.Input<string>;
    /**
     * The status of the RDS PostgreSQL instance.
     */
    instanceStatus?: pulumi.Input<string>;
    /**
     * The instance type of the RDS PostgreSQL instance.
     */
    instanceType?: pulumi.Input<string>;
    /**
     * Memory size in GB.
     */
    memory?: pulumi.Input<number>;
    /**
     * Spec change type. Usually(default) or Temporary.
     */
    modifyType?: pulumi.Input<string>;
    /**
     * The number of nodes.
     */
    nodeNumber?: pulumi.Input<number>;
    /**
     * The specification of primary node and secondary node.
     */
    nodeSpec?: pulumi.Input<string>;
    /**
     * Instance node information.
     */
    nodes?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceNode>[]>;
    /**
     * Parameter of the RDS PostgreSQL instance. This field can only be added or modified. Deleting this field is invalid.
     */
    parameters?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceParameter>[]>;
    /**
     * The available zone of primary node.
     */
    primaryZoneId?: pulumi.Input<string>;
    /**
     * The project name of the RDS instance.
     */
    projectName?: pulumi.Input<string>;
    /**
     * The region of the RDS PostgreSQL instance.
     */
    regionId?: pulumi.Input<string>;
    /**
     * The point in time to restore to, in UTC format yyyy-MM-ddTHH:mm:ssZ (choose either this or backup_id).
     */
    restoreTime?: pulumi.Input<string>;
    /**
     * Rollback time for Temporary change, UTC format yyyy-MM-ddTHH:mm:ss.sssZ.
     */
    rollbackTime?: pulumi.Input<string>;
    /**
     * The available zone of secondary node.
     */
    secondaryZoneId?: pulumi.Input<string>;
    /**
     * Source instance ID. After setting it, a new instance will be created by restoring from the backup/time point.
     */
    srcInstanceId?: pulumi.Input<string>;
    /**
     * The instance's primary node has used storage space. Unit: Byte.
     */
    storageDataUse?: pulumi.Input<number>;
    /**
     * The instance's primary node has used log storage space. Unit: Byte.
     */
    storageLogUse?: pulumi.Input<number>;
    /**
     * Instance storage space. Value range: [20, 3000], unit: GB, step 10GB. Default value: 100.
     */
    storageSpace?: pulumi.Input<number>;
    /**
     * The instance's primary node has used temporary storage space. Unit: Byte.
     */
    storageTempUse?: pulumi.Input<number>;
    /**
     * Instance storage type.
     */
    storageType?: pulumi.Input<string>;
    /**
     * The instance has used storage space. Unit: Byte.
     */
    storageUse?: pulumi.Input<number>;
    /**
     * The instance's primary node has used WAL storage space. Unit: Byte.
     */
    storageWalUse?: pulumi.Input<number>;
    /**
     * Subnet ID of the RDS PostgreSQL instance.
     */
    subnetId?: pulumi.Input<string>;
    /**
     * Tags.
     */
    tags?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceTag>[]>;
    /**
     * The update time of the RDS PostgreSQL instance.
     */
    updateTime?: pulumi.Input<string>;
    /**
     * CPU size.
     */
    vCpu?: pulumi.Input<number>;
    /**
     * The vpc ID of the RDS PostgreSQL instance.
     */
    vpcId?: pulumi.Input<string>;
    /**
     * The available zone of the RDS PostgreSQL instance.
     */
    zoneId?: pulumi.Input<string>;
    /**
     * ID of the availability zone where each instance is located.
     */
    zoneIds?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * Nodes to migrate AZ. Only Secondary or ReadOnly nodes are allowed. If you want to migrate the availability zone of the secondary node, you need to add the zoneMigrations field. Modifying the secondaryZoneId directly will not work. Cross-AZ instance migration is not supported.
     */
    zoneMigrations?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceZoneMigration>[]>;
}
/**
 * The set of arguments for constructing a Instance resource.
 */
export interface InstanceArgs {
    /**
     * Allow list IDs to bind at creation.
     */
    allowListIds?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * Backup ID (choose either this or restore_time; if both are set, backupId shall prevail).
     */
    backupId?: pulumi.Input<string>;
    /**
     * Payment methods.
     */
    chargeInfo: pulumi.Input<inputs.rds_postgresql.InstanceChargeInfo>;
    /**
     * Instance type. Value: PostgreSQL_11, PostgreSQL_12, PostgreSQL_13, PostgreSQL_14, PostgreSQL_15, PostgreSQL_16, PostgreSQL_17.
     */
    dbEngineVersion: pulumi.Input<string>;
    /**
     * Whether to initiate a configuration change assessment. Only estimate spec change impact without executing. Default value: false.
     */
    estimateOnly?: pulumi.Input<boolean>;
    /**
     * Instance name. Cannot start with a number or a dash. Can only contain Chinese characters, letters, numbers, underscores and dashes. The length is limited between 1 ~ 128.
     */
    instanceName?: pulumi.Input<string>;
    /**
     * Spec change type. Usually(default) or Temporary.
     */
    modifyType?: pulumi.Input<string>;
    /**
     * The specification of primary node and secondary node.
     */
    nodeSpec: pulumi.Input<string>;
    /**
     * Parameter of the RDS PostgreSQL instance. This field can only be added or modified. Deleting this field is invalid.
     */
    parameters?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceParameter>[]>;
    /**
     * The available zone of primary node.
     */
    primaryZoneId: pulumi.Input<string>;
    /**
     * The project name of the RDS instance.
     */
    projectName?: pulumi.Input<string>;
    /**
     * The point in time to restore to, in UTC format yyyy-MM-ddTHH:mm:ssZ (choose either this or backup_id).
     */
    restoreTime?: pulumi.Input<string>;
    /**
     * Rollback time for Temporary change, UTC format yyyy-MM-ddTHH:mm:ss.sssZ.
     */
    rollbackTime?: pulumi.Input<string>;
    /**
     * The available zone of secondary node.
     */
    secondaryZoneId: pulumi.Input<string>;
    /**
     * Source instance ID. After setting it, a new instance will be created by restoring from the backup/time point.
     */
    srcInstanceId?: pulumi.Input<string>;
    /**
     * Instance storage space. Value range: [20, 3000], unit: GB, step 10GB. Default value: 100.
     */
    storageSpace?: pulumi.Input<number>;
    /**
     * Subnet ID of the RDS PostgreSQL instance.
     */
    subnetId: pulumi.Input<string>;
    /**
     * Tags.
     */
    tags?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceTag>[]>;
    /**
     * Nodes to migrate AZ. Only Secondary or ReadOnly nodes are allowed. If you want to migrate the availability zone of the secondary node, you need to add the zoneMigrations field. Modifying the secondaryZoneId directly will not work. Cross-AZ instance migration is not supported.
     */
    zoneMigrations?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.InstanceZoneMigration>[]>;
}
