UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

395 lines (394 loc) 17.9 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * Manages an ELB active-standby pool resource within HuaweiCloud. * * ## Example Usage * ### Create an active-standby Pool * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const vpcId = config.requireObject("vpcId"); * const test = new huaweicloud.dedicatedelb.ActiveStandbyPool("test", { * description: "test description", * protocol: "TCP", * vpcId: vpcId, * type: "instance", * anyPortEnable: false, * members: [ * { * address: "192.168.0.1", * role: "master", * protocolPort: 45, * }, * { * address: "192.168.0.2", * role: "slave", * protocolPort: 36, * }, * ], * healthmonitor: { * delay: 5, * expectedCodes: "200", * maxRetries: 3, * maxRetriesDown: 3, * timeout: 3, * type: "TCP", * }, * }); * ``` * * ## Import * * ELB active-standby pool can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:DedicatedElb/activeStandbyPool:ActiveStandbyPool test <id> * ``` */ export declare class ActiveStandbyPool extends pulumi.CustomResource { /** * Get an existing ActiveStandbyPool 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?: ActiveStandbyPoolState, opts?: pulumi.CustomResourceOptions): ActiveStandbyPool; /** * Returns true if the given object is an instance of ActiveStandbyPool. 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 ActiveStandbyPool; /** * Specifies whether to enable forward to same port for active-standby * pool. If this option is enabled, the listener routes the requests to the backend server over the same port as the * frontend port. Value options: * + **false**: Disable forward to same port. * + **true**: Enable forward to same port. */ readonly anyPortEnable: pulumi.Output<boolean>; /** * Specifies whether to enable delayed logout. This parameter can * be set to **true** when the `protocol` is set to **TCP**, **UDP** or **QUIC**, and the value of `protocol` of the * associated listener must be **TCP** or **UDP**. It will be triggered for the following scenes: * + The pool member is removed from the pool. * + The health monitor status is abnormal. * + The pool member weight is changed to 0. */ readonly connectionDrainEnabled: pulumi.Output<boolean>; /** * Specifies the timeout of the delayed logout in seconds. Value * ranges from `10` to `4,000`. */ readonly connectionDrainTimeout: pulumi.Output<number>; /** * The create time of the active-standby pool. */ readonly createdAt: pulumi.Output<string>; /** * Specifies the description of the active-standby pool. Changing this * parameter will create a new resource. */ readonly description: pulumi.Output<string>; /** * Specifies the health check configured for the active-standby pool. * The healthmonitor structure is documented below. Changing this parameter will create a new resource. */ readonly healthmonitor: pulumi.Output<outputs.DedicatedElb.ActiveStandbyPoolHealthmonitor>; /** * Specifies the IP address version supported by active-standby pool. * The value can be **dualstack**, **v6**, or **v4**. Changing this parameter will create a new resource. */ readonly ipVersion: pulumi.Output<string>; /** * Specifies the load balancing algorithm used by the load balancer to route * requests to backend servers in the associated backend server group. Value options: * + **ROUND_ROBIN**: weighted round robin. * + **LEAST_CONNECTIONS**: weighted least connections. * + **SOURCE_IP**: source IP hash. * + **QUIC_CID**: connection ID. */ readonly lbAlgorithm: pulumi.Output<string | undefined>; /** * Specifies the ID of the listener with which the active-standby pool is * associated. Changing this parameter will create a new resource. */ readonly listenerId: pulumi.Output<string>; /** * Specifies the ID of the load balancer with which the active-standby * pool is associated. Changing this parameter will create a new resource. */ readonly loadbalancerId: pulumi.Output<string>; /** * Specifies the members in the active-standby pool. * The members structure is documented below. Changing this parameter will create a new resource. */ readonly members: pulumi.Output<outputs.DedicatedElb.ActiveStandbyPoolMember[]>; /** * Specifies the health check name. The length range of value is from `1` to `255`. * Changing this parameter will create a new resource. */ readonly name: pulumi.Output<string>; /** * Specifies the protocol used by the active-standby pool to receive requests. * Value options: **TCP**, **UDP**, **QUIC** or **TLS**. * + If the listener's protocol is **UDP**, the value must be **UDP** or **QUIC**. * + If the listener's protocol is **TCP**, the value must be **TCP**. * + If the listener's protocol is **TLS**, the value must be **TLS** or **TCP**. */ readonly protocol: pulumi.Output<string>; /** * The multi-path distribution configuration based on destination connection IDs. * The quicCidHashStrategy structure is documented below. */ readonly quicCidHashStrategies: pulumi.Output<outputs.DedicatedElb.ActiveStandbyPoolQuicCidHashStrategy[]>; /** * Specifies the region in which to create the ELB active-standby pool resource. * If omitted, the provider-level region will be used. */ readonly region: pulumi.Output<string>; /** * Specifies the health check protocol. Value options: **TCP**, **UDP_CONNECT**, * **HTTP**, and **HTTPS**. * + If the protocol of the backend server is **QUIC**, the value can only be **UDP_CONNECT**. * + If the protocol of the backend server is **UDP**, the value can only be **UDP_CONNECT**. * + If the protocol of the backend server is **TCP**, the value can only be **TCP**, **HTTP**, or **HTTPS**. * + If the protocol of the backend server is **HTTP**, the value can only be **TCP**, **HTTP**, or **HTTPS**. * + If the protocol of the backend server is **HTTPS**, the value can only be **TCP**, **HTTP**, or **HTTPS**. */ readonly type: pulumi.Output<string>; /** * The update time of the active-standby pool. */ readonly updatedAt: pulumi.Output<string>; /** * Specifies the ID of the VPC where the active-standby pool works. Changing this * parameter will create a new resource. */ readonly vpcId: pulumi.Output<string>; /** * Create a ActiveStandbyPool 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: ActiveStandbyPoolArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ActiveStandbyPool resources. */ export interface ActiveStandbyPoolState { /** * Specifies whether to enable forward to same port for active-standby * pool. If this option is enabled, the listener routes the requests to the backend server over the same port as the * frontend port. Value options: * + **false**: Disable forward to same port. * + **true**: Enable forward to same port. */ anyPortEnable?: pulumi.Input<boolean>; /** * Specifies whether to enable delayed logout. This parameter can * be set to **true** when the `protocol` is set to **TCP**, **UDP** or **QUIC**, and the value of `protocol` of the * associated listener must be **TCP** or **UDP**. It will be triggered for the following scenes: * + The pool member is removed from the pool. * + The health monitor status is abnormal. * + The pool member weight is changed to 0. */ connectionDrainEnabled?: pulumi.Input<boolean>; /** * Specifies the timeout of the delayed logout in seconds. Value * ranges from `10` to `4,000`. */ connectionDrainTimeout?: pulumi.Input<number>; /** * The create time of the active-standby pool. */ createdAt?: pulumi.Input<string>; /** * Specifies the description of the active-standby pool. Changing this * parameter will create a new resource. */ description?: pulumi.Input<string>; /** * Specifies the health check configured for the active-standby pool. * The healthmonitor structure is documented below. Changing this parameter will create a new resource. */ healthmonitor?: pulumi.Input<inputs.DedicatedElb.ActiveStandbyPoolHealthmonitor>; /** * Specifies the IP address version supported by active-standby pool. * The value can be **dualstack**, **v6**, or **v4**. Changing this parameter will create a new resource. */ ipVersion?: pulumi.Input<string>; /** * Specifies the load balancing algorithm used by the load balancer to route * requests to backend servers in the associated backend server group. Value options: * + **ROUND_ROBIN**: weighted round robin. * + **LEAST_CONNECTIONS**: weighted least connections. * + **SOURCE_IP**: source IP hash. * + **QUIC_CID**: connection ID. */ lbAlgorithm?: pulumi.Input<string>; /** * Specifies the ID of the listener with which the active-standby pool is * associated. Changing this parameter will create a new resource. */ listenerId?: pulumi.Input<string>; /** * Specifies the ID of the load balancer with which the active-standby * pool is associated. Changing this parameter will create a new resource. */ loadbalancerId?: pulumi.Input<string>; /** * Specifies the members in the active-standby pool. * The members structure is documented below. Changing this parameter will create a new resource. */ members?: pulumi.Input<pulumi.Input<inputs.DedicatedElb.ActiveStandbyPoolMember>[]>; /** * Specifies the health check name. The length range of value is from `1` to `255`. * Changing this parameter will create a new resource. */ name?: pulumi.Input<string>; /** * Specifies the protocol used by the active-standby pool to receive requests. * Value options: **TCP**, **UDP**, **QUIC** or **TLS**. * + If the listener's protocol is **UDP**, the value must be **UDP** or **QUIC**. * + If the listener's protocol is **TCP**, the value must be **TCP**. * + If the listener's protocol is **TLS**, the value must be **TLS** or **TCP**. */ protocol?: pulumi.Input<string>; /** * The multi-path distribution configuration based on destination connection IDs. * The quicCidHashStrategy structure is documented below. */ quicCidHashStrategies?: pulumi.Input<pulumi.Input<inputs.DedicatedElb.ActiveStandbyPoolQuicCidHashStrategy>[]>; /** * Specifies the region in which to create the ELB active-standby pool resource. * If omitted, the provider-level region will be used. */ region?: pulumi.Input<string>; /** * Specifies the health check protocol. Value options: **TCP**, **UDP_CONNECT**, * **HTTP**, and **HTTPS**. * + If the protocol of the backend server is **QUIC**, the value can only be **UDP_CONNECT**. * + If the protocol of the backend server is **UDP**, the value can only be **UDP_CONNECT**. * + If the protocol of the backend server is **TCP**, the value can only be **TCP**, **HTTP**, or **HTTPS**. * + If the protocol of the backend server is **HTTP**, the value can only be **TCP**, **HTTP**, or **HTTPS**. * + If the protocol of the backend server is **HTTPS**, the value can only be **TCP**, **HTTP**, or **HTTPS**. */ type?: pulumi.Input<string>; /** * The update time of the active-standby pool. */ updatedAt?: pulumi.Input<string>; /** * Specifies the ID of the VPC where the active-standby pool works. Changing this * parameter will create a new resource. */ vpcId?: pulumi.Input<string>; } /** * The set of arguments for constructing a ActiveStandbyPool resource. */ export interface ActiveStandbyPoolArgs { /** * Specifies whether to enable forward to same port for active-standby * pool. If this option is enabled, the listener routes the requests to the backend server over the same port as the * frontend port. Value options: * + **false**: Disable forward to same port. * + **true**: Enable forward to same port. */ anyPortEnable?: pulumi.Input<boolean>; /** * Specifies whether to enable delayed logout. This parameter can * be set to **true** when the `protocol` is set to **TCP**, **UDP** or **QUIC**, and the value of `protocol` of the * associated listener must be **TCP** or **UDP**. It will be triggered for the following scenes: * + The pool member is removed from the pool. * + The health monitor status is abnormal. * + The pool member weight is changed to 0. */ connectionDrainEnabled?: pulumi.Input<boolean>; /** * Specifies the timeout of the delayed logout in seconds. Value * ranges from `10` to `4,000`. */ connectionDrainTimeout?: pulumi.Input<number>; /** * Specifies the description of the active-standby pool. Changing this * parameter will create a new resource. */ description?: pulumi.Input<string>; /** * Specifies the health check configured for the active-standby pool. * The healthmonitor structure is documented below. Changing this parameter will create a new resource. */ healthmonitor: pulumi.Input<inputs.DedicatedElb.ActiveStandbyPoolHealthmonitor>; /** * Specifies the IP address version supported by active-standby pool. * The value can be **dualstack**, **v6**, or **v4**. Changing this parameter will create a new resource. */ ipVersion?: pulumi.Input<string>; /** * Specifies the load balancing algorithm used by the load balancer to route * requests to backend servers in the associated backend server group. Value options: * + **ROUND_ROBIN**: weighted round robin. * + **LEAST_CONNECTIONS**: weighted least connections. * + **SOURCE_IP**: source IP hash. * + **QUIC_CID**: connection ID. */ lbAlgorithm?: pulumi.Input<string>; /** * Specifies the ID of the listener with which the active-standby pool is * associated. Changing this parameter will create a new resource. */ listenerId?: pulumi.Input<string>; /** * Specifies the ID of the load balancer with which the active-standby * pool is associated. Changing this parameter will create a new resource. */ loadbalancerId?: pulumi.Input<string>; /** * Specifies the members in the active-standby pool. * The members structure is documented below. Changing this parameter will create a new resource. */ members: pulumi.Input<pulumi.Input<inputs.DedicatedElb.ActiveStandbyPoolMember>[]>; /** * Specifies the health check name. The length range of value is from `1` to `255`. * Changing this parameter will create a new resource. */ name?: pulumi.Input<string>; /** * Specifies the protocol used by the active-standby pool to receive requests. * Value options: **TCP**, **UDP**, **QUIC** or **TLS**. * + If the listener's protocol is **UDP**, the value must be **UDP** or **QUIC**. * + If the listener's protocol is **TCP**, the value must be **TCP**. * + If the listener's protocol is **TLS**, the value must be **TLS** or **TCP**. */ protocol: pulumi.Input<string>; /** * Specifies the region in which to create the ELB active-standby pool resource. * If omitted, the provider-level region will be used. */ region?: pulumi.Input<string>; /** * Specifies the health check protocol. Value options: **TCP**, **UDP_CONNECT**, * **HTTP**, and **HTTPS**. * + If the protocol of the backend server is **QUIC**, the value can only be **UDP_CONNECT**. * + If the protocol of the backend server is **UDP**, the value can only be **UDP_CONNECT**. * + If the protocol of the backend server is **TCP**, the value can only be **TCP**, **HTTP**, or **HTTPS**. * + If the protocol of the backend server is **HTTP**, the value can only be **TCP**, **HTTP**, or **HTTPS**. * + If the protocol of the backend server is **HTTPS**, the value can only be **TCP**, **HTTP**, or **HTTPS**. */ type?: pulumi.Input<string>; /** * Specifies the ID of the VPC where the active-standby pool works. Changing this * parameter will create a new resource. */ vpcId?: pulumi.Input<string>; }