@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
216 lines (215 loc) • 8.39 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this resource to scale the CCE node pool within HuaweiCloud.
*
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const clusterId = config.requireObject("clusterId");
* const nodepoolId = config.requireObject("nodepoolId");
* const test = new huaweicloud.cce.NodePoolScale("test", {
* clusterId: clusterId,
* nodepoolId: nodepoolId,
* scaleGroups: ["default"],
* desiredNodeCount: 2,
* });
* ```
*
* > Deleting node pool scale is not supported, it will only be removed from the state.
*/
export declare class NodePoolScale extends pulumi.CustomResource {
/**
* Get an existing NodePoolScale 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?: NodePoolScaleState, opts?: pulumi.CustomResourceOptions): NodePoolScale;
/**
* Returns true if the given object is an instance of NodePoolScale. 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 NodePoolScale;
/**
* Specifies whether auto renew is enabled. Valid values are **true** and **false**.
*/
readonly autoRenew: pulumi.Output<string | undefined>;
/**
* Specifies the charging mode of the nodes.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly chargingMode: pulumi.Output<string>;
/**
* Specifies the cluster ID.
*/
readonly clusterId: pulumi.Output<string>;
/**
* Specifies the number of desired nodes.
*/
readonly desiredNodeCount: pulumi.Output<number>;
readonly enableForceNew: pulumi.Output<string | undefined>;
/**
* Specifies the node pool ID.
*/
readonly nodepoolId: pulumi.Output<string>;
/**
* Specifies the charging period of the nodes.
* If `periodUnit` is set to **month**, the value ranges from 1 to 9.
* If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly period: pulumi.Output<number | undefined>;
/**
* Specifies the charging period unit of the nodes.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly periodUnit: pulumi.Output<string | undefined>;
/**
* Specifies the region in which to create the node pool scale resource.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the scalable checking.
* The value can be **instant** and **async**, defaults to **instant**.
*/
readonly scalableChecking: pulumi.Output<string | undefined>;
/**
* Specifies the IDs of scale groups to scale.
* **default** indicates the default group.
*/
readonly scaleGroups: pulumi.Output<string[]>;
/**
* Create a NodePoolScale 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: NodePoolScaleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering NodePoolScale resources.
*/
export interface NodePoolScaleState {
/**
* Specifies whether auto renew is enabled. Valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the charging mode of the nodes.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the cluster ID.
*/
clusterId?: pulumi.Input<string>;
/**
* Specifies the number of desired nodes.
*/
desiredNodeCount?: pulumi.Input<number>;
enableForceNew?: pulumi.Input<string>;
/**
* Specifies the node pool ID.
*/
nodepoolId?: pulumi.Input<string>;
/**
* Specifies the charging period of the nodes.
* If `periodUnit` is set to **month**, the value ranges from 1 to 9.
* If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the nodes.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the region in which to create the node pool scale resource.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the scalable checking.
* The value can be **instant** and **async**, defaults to **instant**.
*/
scalableChecking?: pulumi.Input<string>;
/**
* Specifies the IDs of scale groups to scale.
* **default** indicates the default group.
*/
scaleGroups?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a NodePoolScale resource.
*/
export interface NodePoolScaleArgs {
/**
* Specifies whether auto renew is enabled. Valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the charging mode of the nodes.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the cluster ID.
*/
clusterId: pulumi.Input<string>;
/**
* Specifies the number of desired nodes.
*/
desiredNodeCount: pulumi.Input<number>;
enableForceNew?: pulumi.Input<string>;
/**
* Specifies the node pool ID.
*/
nodepoolId: pulumi.Input<string>;
/**
* Specifies the charging period of the nodes.
* If `periodUnit` is set to **month**, the value ranges from 1 to 9.
* If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the nodes.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the region in which to create the node pool scale resource.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the scalable checking.
* The value can be **instant** and **async**, defaults to **instant**.
*/
scalableChecking?: pulumi.Input<string>;
/**
* Specifies the IDs of scale groups to scale.
* **default** indicates the default group.
*/
scaleGroups: pulumi.Input<pulumi.Input<string>[]>;
}