@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
249 lines (248 loc) • 9.51 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a CCI Persistent Volume Claim resource within HuaweiCloud.
*
* ## Example Usage
* ### Import an EVS volume
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const volumeId = config.requireObject("volumeId");
* const namespace = config.requireObject("namespace");
* const pvcName = config.requireObject("pvcName");
* const test = new huaweicloud.cci.Pvc("test", {
* namespace: namespace,
* volumeType: "ssd",
* volumeId: volumeId,
* });
* ```
* ### Import an OBS bucket
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const obsBucketName = config.requireObject("obsBucketName");
* const namespace = config.requireObject("namespace");
* const pvcName = config.requireObject("pvcName");
* const test = new huaweicloud.cci.Pvc("test", {
* namespace: namespace,
* volumeType: "obs",
* volumeId: obsBucketName,
* });
* ```
* ### Import an SFS
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const sfsId = config.requireObject("sfsId");
* const namespace = config.requireObject("namespace");
* const pvcName = config.requireObject("pvcName");
* const exportLocation = config.requireObject("exportLocation");
* const test = new huaweicloud.cci.Pvc("test", {
* namespace: namespace,
* volumeType: "nfs-rw",
* volumeId: sfsId,
* deviceMountPath: exportLocation,
* });
* ```
* ### Import an SFS Turbo
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const sfsTurboId = config.requireObject("sfsTurboId");
* const namespace = config.requireObject("namespace");
* const pvcName = config.requireObject("pvcName");
* const exportLocation = config.requireObject("exportLocation");
* const test = new huaweicloud.cci.Pvc("test", {
* namespace: namespace,
* volumeType: "efs-standard",
* volumeId: sfsTurboId,
* deviceMountPath: exportLocation,
* });
* ```
*
* ## Import
*
* PVCs can be imported using the `namespace`, `volume_type` and `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Cci/pvc:Pvc test <namespace>/<volume_type>/<id>
* ```
*/
export declare class Pvc extends pulumi.CustomResource {
/**
* Get an existing Pvc 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?: PvcState, opts?: pulumi.CustomResourceOptions): Pvc;
/**
* Returns true if the given object is an instance of Pvc. 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 Pvc;
/**
* The access mode the volume should have.
*/
readonly accessModes: pulumi.Output<string[]>;
/**
* The server time when PVC was created.
*/
readonly creationTimestamp: pulumi.Output<string>;
/**
* Specifies the share path of the SFS storage bound to the CCI
* Namespace. Required if `volumeType` is **nfs-rw**, **efs-standard** or **efs-performance**.
* Changing this will create a new PVC resource.
*/
readonly deviceMountPath: pulumi.Output<string>;
/**
* Whether the PVC is available.
*/
readonly enable: pulumi.Output<boolean>;
/**
* Specifies the unique name of the PVC resource. This parameter can contain a
* maximum of 63 characters, which may consist of lowercase letters, digits and hyphens, and must start and end with
* lowercase letters and digits. Changing this will create a new PVC resource.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the namespace to logically divide your cloud container instances
* into different group. Changing this will create a new PVC resource.
*/
readonly namespace: pulumi.Output<string>;
/**
* Specifies the region in which to create the PVC resource. If omitted, the
* provider-level region will be used. Changing this will create a new PVC resource.
*/
readonly region: pulumi.Output<string>;
/**
* The current phase of the PVC.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the ID of the storage bound to the CCI Namespace. Changing this
* will create a new PVC resource.
*/
readonly volumeId: pulumi.Output<string>;
/**
* Specifies the type of the storage bound to the CCI Namespace. The valid
* values are **sas**, **ssd**, **sata**, **obs**, **nfs-rw**, **efs-standard** and **efs-performance**,
* Default to **sas**. Changing this will create a new PVC resource.
*/
readonly volumeType: pulumi.Output<string | undefined>;
/**
* Create a Pvc 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: PvcArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Pvc resources.
*/
export interface PvcState {
/**
* The access mode the volume should have.
*/
accessModes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The server time when PVC was created.
*/
creationTimestamp?: pulumi.Input<string>;
/**
* Specifies the share path of the SFS storage bound to the CCI
* Namespace. Required if `volumeType` is **nfs-rw**, **efs-standard** or **efs-performance**.
* Changing this will create a new PVC resource.
*/
deviceMountPath?: pulumi.Input<string>;
/**
* Whether the PVC is available.
*/
enable?: pulumi.Input<boolean>;
/**
* Specifies the unique name of the PVC resource. This parameter can contain a
* maximum of 63 characters, which may consist of lowercase letters, digits and hyphens, and must start and end with
* lowercase letters and digits. Changing this will create a new PVC resource.
*/
name?: pulumi.Input<string>;
/**
* Specifies the namespace to logically divide your cloud container instances
* into different group. Changing this will create a new PVC resource.
*/
namespace?: pulumi.Input<string>;
/**
* Specifies the region in which to create the PVC resource. If omitted, the
* provider-level region will be used. Changing this will create a new PVC resource.
*/
region?: pulumi.Input<string>;
/**
* The current phase of the PVC.
*/
status?: pulumi.Input<string>;
/**
* Specifies the ID of the storage bound to the CCI Namespace. Changing this
* will create a new PVC resource.
*/
volumeId?: pulumi.Input<string>;
/**
* Specifies the type of the storage bound to the CCI Namespace. The valid
* values are **sas**, **ssd**, **sata**, **obs**, **nfs-rw**, **efs-standard** and **efs-performance**,
* Default to **sas**. Changing this will create a new PVC resource.
*/
volumeType?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Pvc resource.
*/
export interface PvcArgs {
/**
* Specifies the share path of the SFS storage bound to the CCI
* Namespace. Required if `volumeType` is **nfs-rw**, **efs-standard** or **efs-performance**.
* Changing this will create a new PVC resource.
*/
deviceMountPath?: pulumi.Input<string>;
/**
* Specifies the unique name of the PVC resource. This parameter can contain a
* maximum of 63 characters, which may consist of lowercase letters, digits and hyphens, and must start and end with
* lowercase letters and digits. Changing this will create a new PVC resource.
*/
name?: pulumi.Input<string>;
/**
* Specifies the namespace to logically divide your cloud container instances
* into different group. Changing this will create a new PVC resource.
*/
namespace: pulumi.Input<string>;
/**
* Specifies the region in which to create the PVC resource. If omitted, the
* provider-level region will be used. Changing this will create a new PVC resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the ID of the storage bound to the CCI Namespace. Changing this
* will create a new PVC resource.
*/
volumeId: pulumi.Input<string>;
/**
* Specifies the type of the storage bound to the CCI Namespace. The valid
* values are **sas**, **ssd**, **sata**, **obs**, **nfs-rw**, **efs-standard** and **efs-performance**,
* Default to **sas**. Changing this will create a new PVC resource.
*/
volumeType?: pulumi.Input<string>;
}