@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
185 lines (184 loc) • 5.33 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 ebs snapshots
* ## 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 = new volcengine.ebs.Volume("fooVolume", {
* volumeName: "acc-test-volume",
* volumeType: "ESSD_PL0",
* description: "acc-test",
* kind: "data",
* size: 500,
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* volumeChargeType: "PostPaid",
* projectName: "default",
* });
* const fooSnapshot: volcengine.ebs.Snapshot[] = [];
* for (const range = {value: 0}; range.value < 2; range.value++) {
* fooSnapshot.push(new volcengine.ebs.Snapshot(`fooSnapshot-${range.value}`, {
* volumeId: fooVolume.id,
* snapshotName: "acc-test-snapshot",
* description: "acc-test",
* retentionDays: 3,
* projectName: "default",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* }));
* }
* const fooSnapshots = volcengine.ebs.getSnapshotsOutput({
* ids: fooSnapshot.map(__item => __item.id),
* });
* ```
*/
/** @deprecated volcengine.ebs.Snapshots has been deprecated in favor of volcengine.ebs.getSnapshots */
export declare function snapshots(args?: SnapshotsArgs, opts?: pulumi.InvokeOptions): Promise<SnapshotsResult>;
/**
* A collection of arguments for invoking Snapshots.
*/
export interface SnapshotsArgs {
/**
* A list of snapshot IDs.
*/
ids?: string[];
/**
* A Name Regex of Resource.
*/
nameRegex?: string;
/**
* File name where to save data source results.
*/
outputFile?: string;
/**
* The project name of snapshot.
*/
projectName?: string;
/**
* A list of snapshot status.
*/
snapshotStatuses?: string[];
/**
* Tags.
*/
tags?: inputs.ebs.SnapshotsTag[];
/**
* The zone id of snapshot.
*/
zoneId?: string;
}
/**
* A collection of values returned by Snapshots.
*/
export interface SnapshotsResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly ids?: string[];
readonly nameRegex?: string;
readonly outputFile?: string;
/**
* The project name of the snapshot.
*/
readonly projectName?: string;
readonly snapshotStatuses?: string[];
/**
* The collection of query.
*/
readonly snapshots: outputs.ebs.SnapshotsSnapshot[];
/**
* Tags.
*/
readonly tags?: outputs.ebs.SnapshotsTag[];
/**
* The total count of query.
*/
readonly totalCount: number;
/**
* The zone id of the snapshot.
*/
readonly zoneId?: string;
}
/**
* Use this data source to query detailed information of ebs snapshots
* ## 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 = new volcengine.ebs.Volume("fooVolume", {
* volumeName: "acc-test-volume",
* volumeType: "ESSD_PL0",
* description: "acc-test",
* kind: "data",
* size: 500,
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* volumeChargeType: "PostPaid",
* projectName: "default",
* });
* const fooSnapshot: volcengine.ebs.Snapshot[] = [];
* for (const range = {value: 0}; range.value < 2; range.value++) {
* fooSnapshot.push(new volcengine.ebs.Snapshot(`fooSnapshot-${range.value}`, {
* volumeId: fooVolume.id,
* snapshotName: "acc-test-snapshot",
* description: "acc-test",
* retentionDays: 3,
* projectName: "default",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* }));
* }
* const fooSnapshots = volcengine.ebs.getSnapshotsOutput({
* ids: fooSnapshot.map(__item => __item.id),
* });
* ```
*/
/** @deprecated volcengine.ebs.Snapshots has been deprecated in favor of volcengine.ebs.getSnapshots */
export declare function snapshotsOutput(args?: SnapshotsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<SnapshotsResult>;
/**
* A collection of arguments for invoking Snapshots.
*/
export interface SnapshotsOutputArgs {
/**
* A list of snapshot IDs.
*/
ids?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A Name Regex of Resource.
*/
nameRegex?: pulumi.Input<string>;
/**
* File name where to save data source results.
*/
outputFile?: pulumi.Input<string>;
/**
* The project name of snapshot.
*/
projectName?: pulumi.Input<string>;
/**
* A list of snapshot status.
*/
snapshotStatuses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.ebs.SnapshotsTagArgs>[]>;
/**
* The zone id of snapshot.
*/
zoneId?: pulumi.Input<string>;
}