// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; export class ServerDiskBackupSchedule extends pulumi.CustomResource { /** * Get an existing ServerDiskBackupSchedule 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. */ public static get(name: string, id: pulumi.Input, state?: ServerDiskBackupScheduleState, opts?: pulumi.CustomResourceOptions): ServerDiskBackupSchedule { return new ServerDiskBackupSchedule(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/serverDiskBackupSchedule:ServerDiskBackupSchedule'; /** * Returns true if the given object is an instance of ServerDiskBackupSchedule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is ServerDiskBackupSchedule { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ServerDiskBackupSchedule.__pulumiType; } /** * Maximum stored copy count */ declare public readonly copyCount: pulumi.Output; /** * Creation date for first backup */ declare public readonly creationStartAt: pulumi.Output; /** * Day of the week when auto backup should be created. Allowed only for week interval, counting starts from 1 (Monday) */ declare public readonly dayOfWeek: pulumi.Output; /** * Enable auto backups */ declare public readonly enabled: pulumi.Output; /** * Interval between auto backups */ declare public readonly interval: pulumi.Output; declare public readonly serverDiskBackupScheduleId: pulumi.Output; /** * Disk ID for which backup should be configured */ declare public readonly sourceServerDiskId: pulumi.Output; /** * Server ID for which disk auto backups should be configured */ declare public readonly sourceServerId: pulumi.Output; /** * Create a ServerDiskBackupSchedule 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: ServerDiskBackupScheduleArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ServerDiskBackupScheduleArgs | ServerDiskBackupScheduleState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ServerDiskBackupScheduleState | undefined; resourceInputs["copyCount"] = state?.copyCount; resourceInputs["creationStartAt"] = state?.creationStartAt; resourceInputs["dayOfWeek"] = state?.dayOfWeek; resourceInputs["enabled"] = state?.enabled; resourceInputs["interval"] = state?.interval; resourceInputs["serverDiskBackupScheduleId"] = state?.serverDiskBackupScheduleId; resourceInputs["sourceServerDiskId"] = state?.sourceServerDiskId; resourceInputs["sourceServerId"] = state?.sourceServerId; } else { const args = argsOrState as ServerDiskBackupScheduleArgs | undefined; if (args?.copyCount === undefined && !opts.urn) { throw new Error("Missing required property 'copyCount'"); } if (args?.creationStartAt === undefined && !opts.urn) { throw new Error("Missing required property 'creationStartAt'"); } if (args?.interval === undefined && !opts.urn) { throw new Error("Missing required property 'interval'"); } if (args?.sourceServerDiskId === undefined && !opts.urn) { throw new Error("Missing required property 'sourceServerDiskId'"); } if (args?.sourceServerId === undefined && !opts.urn) { throw new Error("Missing required property 'sourceServerId'"); } resourceInputs["copyCount"] = args?.copyCount; resourceInputs["creationStartAt"] = args?.creationStartAt; resourceInputs["dayOfWeek"] = args?.dayOfWeek; resourceInputs["enabled"] = args?.enabled; resourceInputs["interval"] = args?.interval; resourceInputs["serverDiskBackupScheduleId"] = args?.serverDiskBackupScheduleId; resourceInputs["sourceServerDiskId"] = args?.sourceServerDiskId; resourceInputs["sourceServerId"] = args?.sourceServerId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServerDiskBackupSchedule.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering ServerDiskBackupSchedule resources. */ export interface ServerDiskBackupScheduleState { /** * Maximum stored copy count */ copyCount?: pulumi.Input; /** * Creation date for first backup */ creationStartAt?: pulumi.Input; /** * Day of the week when auto backup should be created. Allowed only for week interval, counting starts from 1 (Monday) */ dayOfWeek?: pulumi.Input; /** * Enable auto backups */ enabled?: pulumi.Input; /** * Interval between auto backups */ interval?: pulumi.Input; serverDiskBackupScheduleId?: pulumi.Input; /** * Disk ID for which backup should be configured */ sourceServerDiskId?: pulumi.Input; /** * Server ID for which disk auto backups should be configured */ sourceServerId?: pulumi.Input; } /** * The set of arguments for constructing a ServerDiskBackupSchedule resource. */ export interface ServerDiskBackupScheduleArgs { /** * Maximum stored copy count */ copyCount: pulumi.Input; /** * Creation date for first backup */ creationStartAt: pulumi.Input; /** * Day of the week when auto backup should be created. Allowed only for week interval, counting starts from 1 (Monday) */ dayOfWeek?: pulumi.Input; /** * Enable auto backups */ enabled?: pulumi.Input; /** * Interval between auto backups */ interval: pulumi.Input; serverDiskBackupScheduleId?: pulumi.Input; /** * Disk ID for which backup should be configured */ sourceServerDiskId: pulumi.Input; /** * Server ID for which disk auto backups should be configured */ sourceServerId: pulumi.Input; }