import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * An allowlist is a security measure for database connections. Only IP addresses in the allowlist can access the database. After a PostgreSQL instance is created, it is not bound to any allowlist, and all IP addresses are denied access by default. To connect to the instance via private or public network, you must first configure an allowlist for the instance to ensure connectivity. * * ## Import * * ```sh * $ pulumi import volcenginecc:rdspostgresql/allowList:AllowList example "allow_list_id" * ``` */ export declare class AllowList extends pulumi.CustomResource { /** * Get an existing AllowList 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, state?: AllowListState, opts?: pulumi.CustomResourceOptions): AllowList; /** * Returns true if the given object is an instance of AllowList. 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 AllowList; /** * Allowlist category. Values: Ordinary: ordinary allowlist; Default: default allowlist. Note: This parameter has no default value when used as a request parameter. If not provided, all categories of allowlists are queried. */ readonly allowListCategory: pulumi.Output; /** * Description of the allowlist. Up to 200 characters. Default value is an empty string. */ readonly allowListDesc: pulumi.Output; /** * Allowlist ID. */ readonly allowListId: pulumi.Output; /** * Number of IP addresses or IP segments in the allowlist. */ readonly allowListIpNum: pulumi.Output; /** * Allowlist naming rules: The allowlist name must be unique within the current region. It must start with a Chinese character, letter, or underscore (*). It can only contain Chinese characters, letters, numbers, underscores (*), and hyphens (-). Length must be 1–128 characters. */ readonly allowListName: pulumi.Output; /** * Network protocol type used by the allowlist. Value: IPv4 (default). */ readonly allowListType: pulumi.Output; /** * IP addresses included in the allowlist. Supports the following two formats: IP address format, for example: 10.23.12.24. CIDR IP address range format, for example: 10.23.12.0/24 (Classless Inter-Domain Routing, 24 indicates the prefix length, range is 1–32). Note: Each allowlist can add up to 300 IP addresses or IP ranges. If there are many IPs, it is recommended to merge them into IP ranges, such as 10.23.12.0/24. Do not add IP addresses ending with x.x.x.x/0 except for 0.0.0.0/0 to the allowlist. This field cannot be used together with the UserAllowList field. */ readonly allowLists: pulumi.Output; /** * Number of instances bound to this allowlist. */ readonly associatedInstanceNum: pulumi.Output; readonly associatedInstances: pulumi.Output; /** * Instance ID. When UpgradeAllowListVersion is set to true, you must provide this field to specify the instance for upgrading the allowlist version. */ readonly instanceId: pulumi.Output; /** * Query allowlist by IP address. Supports multiple IP addresses separated by commas (,). Note: If the allowlist contains any subset of the provided IP addresses, that allowlist will be returned. */ readonly ipAddress: pulumi.Output; /** * Allowlist modification mode. Values: Cover (default): overwrite, use the value of the AllowList field to overwrite the original allowlist. Append: add, add the IP addresses in the AllowList field to the original allowlist. Delete: remove, remove the IP addresses in the AllowList field from the original allowlist. At least one IP address must remain. Note: If the allowlist to be modified is bound to a security group, or if you need to bind a security group when modifying the allowlist, ModifyMode can only be set to Cover. */ readonly modifyMode: pulumi.Output; readonly securityGroupBindInfos: pulumi.Output; /** * Whether to update the security group bound to the allowlist. Values: true: update; false: do not update. Default value. */ readonly updateSecurityGroup: pulumi.Output; /** * Whether to upgrade the allowlist version. Values: true: upgrade; false: do not upgrade (default). You must also provide the InstanceId field. */ readonly upgradeAllowListVersion: pulumi.Output; /** * IP addresses outside the security group that need to be added to the allowlist. You can enter IP addresses or CIDR IP ranges. Note: This field cannot be used together with the AllowList field. */ readonly userAllowList: pulumi.Output; /** * Create a AllowList 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?: AllowListArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AllowList resources. */ export interface AllowListState { /** * Allowlist category. Values: Ordinary: ordinary allowlist; Default: default allowlist. Note: This parameter has no default value when used as a request parameter. If not provided, all categories of allowlists are queried. */ allowListCategory?: pulumi.Input; /** * Description of the allowlist. Up to 200 characters. Default value is an empty string. */ allowListDesc?: pulumi.Input; /** * Allowlist ID. */ allowListId?: pulumi.Input; /** * Number of IP addresses or IP segments in the allowlist. */ allowListIpNum?: pulumi.Input; /** * Allowlist naming rules: The allowlist name must be unique within the current region. It must start with a Chinese character, letter, or underscore (*). It can only contain Chinese characters, letters, numbers, underscores (*), and hyphens (-). Length must be 1–128 characters. */ allowListName?: pulumi.Input; /** * Network protocol type used by the allowlist. Value: IPv4 (default). */ allowListType?: pulumi.Input; /** * IP addresses included in the allowlist. Supports the following two formats: IP address format, for example: 10.23.12.24. CIDR IP address range format, for example: 10.23.12.0/24 (Classless Inter-Domain Routing, 24 indicates the prefix length, range is 1–32). Note: Each allowlist can add up to 300 IP addresses or IP ranges. If there are many IPs, it is recommended to merge them into IP ranges, such as 10.23.12.0/24. Do not add IP addresses ending with x.x.x.x/0 except for 0.0.0.0/0 to the allowlist. This field cannot be used together with the UserAllowList field. */ allowLists?: pulumi.Input[]>; /** * Number of instances bound to this allowlist. */ associatedInstanceNum?: pulumi.Input; associatedInstances?: pulumi.Input[]>; /** * Instance ID. When UpgradeAllowListVersion is set to true, you must provide this field to specify the instance for upgrading the allowlist version. */ instanceId?: pulumi.Input; /** * Query allowlist by IP address. Supports multiple IP addresses separated by commas (,). Note: If the allowlist contains any subset of the provided IP addresses, that allowlist will be returned. */ ipAddress?: pulumi.Input; /** * Allowlist modification mode. Values: Cover (default): overwrite, use the value of the AllowList field to overwrite the original allowlist. Append: add, add the IP addresses in the AllowList field to the original allowlist. Delete: remove, remove the IP addresses in the AllowList field from the original allowlist. At least one IP address must remain. Note: If the allowlist to be modified is bound to a security group, or if you need to bind a security group when modifying the allowlist, ModifyMode can only be set to Cover. */ modifyMode?: pulumi.Input; securityGroupBindInfos?: pulumi.Input[]>; /** * Whether to update the security group bound to the allowlist. Values: true: update; false: do not update. Default value. */ updateSecurityGroup?: pulumi.Input; /** * Whether to upgrade the allowlist version. Values: true: upgrade; false: do not upgrade (default). You must also provide the InstanceId field. */ upgradeAllowListVersion?: pulumi.Input; /** * IP addresses outside the security group that need to be added to the allowlist. You can enter IP addresses or CIDR IP ranges. Note: This field cannot be used together with the AllowList field. */ userAllowList?: pulumi.Input; } /** * The set of arguments for constructing a AllowList resource. */ export interface AllowListArgs { /** * Allowlist category. Values: Ordinary: ordinary allowlist; Default: default allowlist. Note: This parameter has no default value when used as a request parameter. If not provided, all categories of allowlists are queried. */ allowListCategory?: pulumi.Input; /** * Description of the allowlist. Up to 200 characters. Default value is an empty string. */ allowListDesc?: pulumi.Input; /** * Allowlist naming rules: The allowlist name must be unique within the current region. It must start with a Chinese character, letter, or underscore (*). It can only contain Chinese characters, letters, numbers, underscores (*), and hyphens (-). Length must be 1–128 characters. */ allowListName?: pulumi.Input; /** * Network protocol type used by the allowlist. Value: IPv4 (default). */ allowListType?: pulumi.Input; /** * IP addresses included in the allowlist. Supports the following two formats: IP address format, for example: 10.23.12.24. CIDR IP address range format, for example: 10.23.12.0/24 (Classless Inter-Domain Routing, 24 indicates the prefix length, range is 1–32). Note: Each allowlist can add up to 300 IP addresses or IP ranges. If there are many IPs, it is recommended to merge them into IP ranges, such as 10.23.12.0/24. Do not add IP addresses ending with x.x.x.x/0 except for 0.0.0.0/0 to the allowlist. This field cannot be used together with the UserAllowList field. */ allowLists?: pulumi.Input[]>; associatedInstances?: pulumi.Input[]>; /** * Instance ID. When UpgradeAllowListVersion is set to true, you must provide this field to specify the instance for upgrading the allowlist version. */ instanceId?: pulumi.Input; /** * Query allowlist by IP address. Supports multiple IP addresses separated by commas (,). Note: If the allowlist contains any subset of the provided IP addresses, that allowlist will be returned. */ ipAddress?: pulumi.Input; /** * Allowlist modification mode. Values: Cover (default): overwrite, use the value of the AllowList field to overwrite the original allowlist. Append: add, add the IP addresses in the AllowList field to the original allowlist. Delete: remove, remove the IP addresses in the AllowList field from the original allowlist. At least one IP address must remain. Note: If the allowlist to be modified is bound to a security group, or if you need to bind a security group when modifying the allowlist, ModifyMode can only be set to Cover. */ modifyMode?: pulumi.Input; securityGroupBindInfos?: pulumi.Input[]>; /** * Whether to update the security group bound to the allowlist. Values: true: update; false: do not update. Default value. */ updateSecurityGroup?: pulumi.Input; /** * Whether to upgrade the allowlist version. Values: true: upgrade; false: do not upgrade (default). You must also provide the InstanceId field. */ upgradeAllowListVersion?: pulumi.Input; /** * IP addresses outside the security group that need to be added to the allowlist. You can enter IP addresses or CIDR IP ranges. Note: This field cannot be used together with the AllowList field. */ userAllowList?: pulumi.Input; }