// *** 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 DatabaseBackupSchedule extends pulumi.CustomResource { /** * Get an existing DatabaseBackupSchedule 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?: DatabaseBackupScheduleState, opts?: pulumi.CustomResourceOptions): DatabaseBackupSchedule { return new DatabaseBackupSchedule(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/databaseBackupSchedule:DatabaseBackupSchedule'; /** * Returns true if the given object is an instance of DatabaseBackupSchedule. 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 DatabaseBackupSchedule { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === DatabaseBackupSchedule.__pulumiType; } /** * Database cluster ID for which database auto backups should be configured */ declare public readonly clusterId: pulumi.Output; /** * Maximum stored copy count */ declare public readonly copyCount: pulumi.Output; /** * Creation date for first backup */ declare public readonly creationStartAt: pulumi.Output; declare public readonly databaseBackupScheduleId: 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; /** * Create a DatabaseBackupSchedule 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: DatabaseBackupScheduleArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: DatabaseBackupScheduleArgs | DatabaseBackupScheduleState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as DatabaseBackupScheduleState | undefined; resourceInputs["clusterId"] = state?.clusterId; resourceInputs["copyCount"] = state?.copyCount; resourceInputs["creationStartAt"] = state?.creationStartAt; resourceInputs["databaseBackupScheduleId"] = state?.databaseBackupScheduleId; resourceInputs["dayOfWeek"] = state?.dayOfWeek; resourceInputs["enabled"] = state?.enabled; resourceInputs["interval"] = state?.interval; } else { const args = argsOrState as DatabaseBackupScheduleArgs | undefined; if (args?.clusterId === undefined && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } 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'"); } resourceInputs["clusterId"] = args?.clusterId; resourceInputs["copyCount"] = args?.copyCount; resourceInputs["creationStartAt"] = args?.creationStartAt; resourceInputs["databaseBackupScheduleId"] = args?.databaseBackupScheduleId; resourceInputs["dayOfWeek"] = args?.dayOfWeek; resourceInputs["enabled"] = args?.enabled; resourceInputs["interval"] = args?.interval; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DatabaseBackupSchedule.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering DatabaseBackupSchedule resources. */ export interface DatabaseBackupScheduleState { /** * Database cluster ID for which database auto backups should be configured */ clusterId?: pulumi.Input; /** * Maximum stored copy count */ copyCount?: pulumi.Input; /** * Creation date for first backup */ creationStartAt?: pulumi.Input; databaseBackupScheduleId?: 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; } /** * The set of arguments for constructing a DatabaseBackupSchedule resource. */ export interface DatabaseBackupScheduleArgs { /** * Database cluster ID for which database auto backups should be configured */ clusterId: pulumi.Input; /** * Maximum stored copy count */ copyCount: pulumi.Input; /** * Creation date for first backup */ creationStartAt: pulumi.Input; databaseBackupScheduleId?: 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; }