@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
182 lines (181 loc) • 5.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Use this data source to query detailed information of volumes
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooZones = volcengine.ecs.getZones({});
* const fooVolume: volcengine.ebs.Volume[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooVolume.push(new volcengine.ebs.Volume(`fooVolume-${range.value}`, {
* volumeName: `acc-test-volume-${range.value}`,
* volumeType: "ESSD_PL0",
* description: "acc-test",
* kind: "data",
* size: 60,
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* volumeChargeType: "PostPaid",
* projectName: "default",
* }));
* }
* const fooVolumes = volcengine.ebs.getVolumesOutput({
* ids: fooVolume.map(__item => __item.id),
* });
* ```
*/
export declare function getVolumes(args?: GetVolumesArgs, opts?: pulumi.InvokeOptions): Promise<GetVolumesResult>;
/**
* A collection of arguments for invoking getVolumes.
*/
export interface GetVolumesArgs {
/**
* A list of Volume IDs.
*/
ids?: string[];
/**
* The Id of instance.
*/
instanceId?: string;
/**
* The Kind of Volume.
*/
kind?: string;
/**
* A Name Regex of Volume.
*/
nameRegex?: string;
/**
* File name where to save data source results.
*/
outputFile?: string;
/**
* Tags.
*/
tags?: inputs.ebs.GetVolumesTag[];
/**
* The name of Volume.
*/
volumeName?: string;
/**
* The Status of Volume, the value can be `available` or `attaching` or `attached` or `detaching` or `creating` or `deleting` or `error` or `extending`.
*/
volumeStatus?: string;
/**
* The type of Volume.
*/
volumeType?: string;
/**
* The Id of Zone.
*/
zoneId?: string;
}
/**
* A collection of values returned by getVolumes.
*/
export interface GetVolumesResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly ids?: string[];
readonly instanceId?: string;
readonly kind?: string;
readonly nameRegex?: string;
readonly outputFile?: string;
/**
* Tags.
*/
readonly tags?: outputs.ebs.GetVolumesTag[];
/**
* The total count of Volume query.
*/
readonly totalCount: number;
readonly volumeName?: string;
readonly volumeStatus?: string;
readonly volumeType?: string;
/**
* The collection of Volume query.
*/
readonly volumes: outputs.ebs.GetVolumesVolume[];
readonly zoneId?: string;
}
/**
* Use this data source to query detailed information of volumes
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooZones = volcengine.ecs.getZones({});
* const fooVolume: volcengine.ebs.Volume[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooVolume.push(new volcengine.ebs.Volume(`fooVolume-${range.value}`, {
* volumeName: `acc-test-volume-${range.value}`,
* volumeType: "ESSD_PL0",
* description: "acc-test",
* kind: "data",
* size: 60,
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* volumeChargeType: "PostPaid",
* projectName: "default",
* }));
* }
* const fooVolumes = volcengine.ebs.getVolumesOutput({
* ids: fooVolume.map(__item => __item.id),
* });
* ```
*/
export declare function getVolumesOutput(args?: GetVolumesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetVolumesResult>;
/**
* A collection of arguments for invoking getVolumes.
*/
export interface GetVolumesOutputArgs {
/**
* A list of Volume IDs.
*/
ids?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The Id of instance.
*/
instanceId?: pulumi.Input<string>;
/**
* The Kind of Volume.
*/
kind?: pulumi.Input<string>;
/**
* A Name Regex of Volume.
*/
nameRegex?: pulumi.Input<string>;
/**
* File name where to save data source results.
*/
outputFile?: pulumi.Input<string>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.ebs.GetVolumesTagArgs>[]>;
/**
* The name of Volume.
*/
volumeName?: pulumi.Input<string>;
/**
* The Status of Volume, the value can be `available` or `attaching` or `attached` or `detaching` or `creating` or `deleting` or `error` or `extending`.
*/
volumeStatus?: pulumi.Input<string>;
/**
* The type of Volume.
*/
volumeType?: pulumi.Input<string>;
/**
* The Id of Zone.
*/
zoneId?: pulumi.Input<string>;
}