UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

220 lines (219 loc) 6.37 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of redis backups * ## 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 fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooInstance = new volcengine.redis.Instance("fooInstance", { * zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)], * instanceName: "acc-test-tf-redis", * shardedCluster: 1, * password: "1qaz!QAZ12", * nodeNumber: 2, * shardCapacity: 1024, * shardNumber: 2, * engineVersion: "5.0", * subnetId: fooSubnet.id, * deletionProtection: "disabled", * vpcAuthMode: "close", * chargeType: "PostPaid", * port: 6381, * projectName: "default", * }); * const fooBackup: volcengine.redis.Backup[] = []; * for (const range = {value: 0}; range.value < 3; range.value++) { * fooBackup.push(new volcengine.redis.Backup(`fooBackup-${range.value}`, {instanceId: fooInstance.id})); * } * const fooBackups = volcengine.redis.getBackupsOutput({ * instanceId: fooInstance.id, * }); * ``` */ /** @deprecated volcengine.redis.Backups has been deprecated in favor of volcengine.redis.getBackups */ export declare function backups(args?: BackupsArgs, opts?: pulumi.InvokeOptions): Promise<BackupsResult>; /** * A collection of arguments for invoking Backups. */ export interface BackupsArgs { /** * The id of backup point. */ backupPointId?: string; /** * Backup name, supporting fuzzy query. */ backupPointName?: string; /** * The list of backup strategy, support AutomatedBackup and ManualBackup. */ backupStrategyLists?: string[]; /** * Query end time. */ endTime?: string; /** * Id of instance. */ instanceId?: string; /** * File name where to save data source results. */ outputFile?: string; /** * Back up the project to which it belongs. */ projectName?: string; /** * The query scope of the backup. */ scope?: string; /** * Query start time. */ startTime?: string; } /** * A collection of values returned by Backups. */ export interface BackupsResult { /** * The id of backup point. */ readonly backupPointId?: string; readonly backupPointName?: string; readonly backupStrategyLists?: string[]; /** * Information of backups. */ readonly backups: outputs.redis.BackupsBackup[]; /** * End time of backup. */ readonly endTime?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * Id of instance. */ readonly instanceId?: string; readonly outputFile?: string; /** * Project name of instance. */ readonly projectName?: string; readonly scope?: string; /** * Start time of backup. */ readonly startTime?: string; /** * The total count of backup query. */ readonly totalCount: number; } /** * Use this data source to query detailed information of redis backups * ## 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 fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooInstance = new volcengine.redis.Instance("fooInstance", { * zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)], * instanceName: "acc-test-tf-redis", * shardedCluster: 1, * password: "1qaz!QAZ12", * nodeNumber: 2, * shardCapacity: 1024, * shardNumber: 2, * engineVersion: "5.0", * subnetId: fooSubnet.id, * deletionProtection: "disabled", * vpcAuthMode: "close", * chargeType: "PostPaid", * port: 6381, * projectName: "default", * }); * const fooBackup: volcengine.redis.Backup[] = []; * for (const range = {value: 0}; range.value < 3; range.value++) { * fooBackup.push(new volcengine.redis.Backup(`fooBackup-${range.value}`, {instanceId: fooInstance.id})); * } * const fooBackups = volcengine.redis.getBackupsOutput({ * instanceId: fooInstance.id, * }); * ``` */ /** @deprecated volcengine.redis.Backups has been deprecated in favor of volcengine.redis.getBackups */ export declare function backupsOutput(args?: BackupsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<BackupsResult>; /** * A collection of arguments for invoking Backups. */ export interface BackupsOutputArgs { /** * The id of backup point. */ backupPointId?: pulumi.Input<string>; /** * Backup name, supporting fuzzy query. */ backupPointName?: pulumi.Input<string>; /** * The list of backup strategy, support AutomatedBackup and ManualBackup. */ backupStrategyLists?: pulumi.Input<pulumi.Input<string>[]>; /** * Query end time. */ endTime?: pulumi.Input<string>; /** * Id of instance. */ instanceId?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * Back up the project to which it belongs. */ projectName?: pulumi.Input<string>; /** * The query scope of the backup. */ scope?: pulumi.Input<string>; /** * Query start time. */ startTime?: pulumi.Input<string>; }