UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

136 lines 8.22 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.BackupPolicy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage rds mysql backup policy * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.rds_mysql.BackupPolicy("foo", { * binlogFileCountsEnable: true, * binlogSpaceLimitEnable: true, * crossBackupPolicy: { * backupEnabled: true, * crossBackupRegion: "cn-chongqing-sdv", * logBackupEnabled: true, * retention: 10, * }, * dataFullBackupPeriods: [ * "Monday", * "Sunday", * "Tuesday", * ], * instanceId: "mysql-b51d37110dd1", * lockDdlTime: 80, * }); * ``` * * ## Import * * RdsMysqlBackupPolicy can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:rds_mysql/backupPolicy:BackupPolicy default instanceId:backupPolicy * ``` * Warning:The resource cannot be deleted, and the destroy operation will not perform any actions. */ class BackupPolicy extends pulumi.CustomResource { /** * Get an existing BackupPolicy 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. */ static get(name, id, state, opts) { return new BackupPolicy(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BackupPolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === BackupPolicy.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["availableCrossRegions"] = state ? state.availableCrossRegions : undefined; resourceInputs["binlogBackupAllRetention"] = state ? state.binlogBackupAllRetention : undefined; resourceInputs["binlogBackupEnabled"] = state ? state.binlogBackupEnabled : undefined; resourceInputs["binlogBackupEncryptionEnabled"] = state ? state.binlogBackupEncryptionEnabled : undefined; resourceInputs["binlogFileCountsEnable"] = state ? state.binlogFileCountsEnable : undefined; resourceInputs["binlogLimitCount"] = state ? state.binlogLimitCount : undefined; resourceInputs["binlogLocalRetentionHour"] = state ? state.binlogLocalRetentionHour : undefined; resourceInputs["binlogSpaceLimitEnable"] = state ? state.binlogSpaceLimitEnable : undefined; resourceInputs["binlogStoragePercentage"] = state ? state.binlogStoragePercentage : undefined; resourceInputs["crossBackupPolicy"] = state ? state.crossBackupPolicy : undefined; resourceInputs["dataBackupAllRetention"] = state ? state.dataBackupAllRetention : undefined; resourceInputs["dataBackupEncryptionEnabled"] = state ? state.dataBackupEncryptionEnabled : undefined; resourceInputs["dataBackupRetentionDay"] = state ? state.dataBackupRetentionDay : undefined; resourceInputs["dataFullBackupPeriods"] = state ? state.dataFullBackupPeriods : undefined; resourceInputs["dataFullBackupStartUtcHour"] = state ? state.dataFullBackupStartUtcHour : undefined; resourceInputs["dataFullBackupTime"] = state ? state.dataFullBackupTime : undefined; resourceInputs["dataIncrBackupPeriods"] = state ? state.dataIncrBackupPeriods : undefined; resourceInputs["dataKeepDaysAfterReleased"] = state ? state.dataKeepDaysAfterReleased : undefined; resourceInputs["dataKeepPolicyAfterReleased"] = state ? state.dataKeepPolicyAfterReleased : undefined; resourceInputs["hourlyIncrBackupEnable"] = state ? state.hourlyIncrBackupEnable : undefined; resourceInputs["incrBackupHourPeriod"] = state ? state.incrBackupHourPeriod : undefined; resourceInputs["instanceId"] = state ? state.instanceId : undefined; resourceInputs["lockDdlTime"] = state ? state.lockDdlTime : undefined; resourceInputs["logBackupRetentionDay"] = state ? state.logBackupRetentionDay : undefined; resourceInputs["retentionPolicySynced"] = state ? state.retentionPolicySynced : undefined; } else { const args = argsOrState; if ((!args || args.instanceId === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } resourceInputs["binlogBackupAllRetention"] = args ? args.binlogBackupAllRetention : undefined; resourceInputs["binlogBackupEnabled"] = args ? args.binlogBackupEnabled : undefined; resourceInputs["binlogBackupEncryptionEnabled"] = args ? args.binlogBackupEncryptionEnabled : undefined; resourceInputs["binlogFileCountsEnable"] = args ? args.binlogFileCountsEnable : undefined; resourceInputs["binlogLimitCount"] = args ? args.binlogLimitCount : undefined; resourceInputs["binlogLocalRetentionHour"] = args ? args.binlogLocalRetentionHour : undefined; resourceInputs["binlogSpaceLimitEnable"] = args ? args.binlogSpaceLimitEnable : undefined; resourceInputs["binlogStoragePercentage"] = args ? args.binlogStoragePercentage : undefined; resourceInputs["crossBackupPolicy"] = args ? args.crossBackupPolicy : undefined; resourceInputs["dataBackupAllRetention"] = args ? args.dataBackupAllRetention : undefined; resourceInputs["dataBackupEncryptionEnabled"] = args ? args.dataBackupEncryptionEnabled : undefined; resourceInputs["dataBackupRetentionDay"] = args ? args.dataBackupRetentionDay : undefined; resourceInputs["dataFullBackupPeriods"] = args ? args.dataFullBackupPeriods : undefined; resourceInputs["dataFullBackupStartUtcHour"] = args ? args.dataFullBackupStartUtcHour : undefined; resourceInputs["dataFullBackupTime"] = args ? args.dataFullBackupTime : undefined; resourceInputs["dataIncrBackupPeriods"] = args ? args.dataIncrBackupPeriods : undefined; resourceInputs["dataKeepDaysAfterReleased"] = args ? args.dataKeepDaysAfterReleased : undefined; resourceInputs["dataKeepPolicyAfterReleased"] = args ? args.dataKeepPolicyAfterReleased : undefined; resourceInputs["hourlyIncrBackupEnable"] = args ? args.hourlyIncrBackupEnable : undefined; resourceInputs["incrBackupHourPeriod"] = args ? args.incrBackupHourPeriod : undefined; resourceInputs["instanceId"] = args ? args.instanceId : undefined; resourceInputs["lockDdlTime"] = args ? args.lockDdlTime : undefined; resourceInputs["logBackupRetentionDay"] = args ? args.logBackupRetentionDay : undefined; resourceInputs["retentionPolicySynced"] = args ? args.retentionPolicySynced : undefined; resourceInputs["availableCrossRegions"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BackupPolicy.__pulumiType, name, resourceInputs, opts); } } exports.BackupPolicy = BackupPolicy; /** @internal */ BackupPolicy.__pulumiType = 'volcengine:rds_mysql/backupPolicy:BackupPolicy'; //# sourceMappingURL=backupPolicy.js.map