UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

185 lines 11.6 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.Job = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages DRS job resource within HuaweiCloud. * * ## Example Usage * * ## Import * * The DRS job can be imported by `id`. e.g. bash * * ```sh * $ pulumi import huaweicloud:Drs/job:Job test <id> * ``` * * Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`enterprise_project_id`, `force_destroy`, `source_db.0.password`, `destination_db.0.password`, `source_db.0.ip`, `destination_db.0.ip`, `source_db.0.kafka_security_config.0.trust_store_password`, `destination_db.0.kafka_security_config.0.trust_store_password`, `source_db.0.kafka_security_config.0.key_store_password`,`destination_db.0.kafka_security_config.0.key_store_password`, `source_db.0.kafka_security_config.0.key_password`, `destination_db.0.kafka_security_config.0.key_password`, `action`, `is_sync_re_edit`, `pause_mode`, `auto_renew`, `alarm_notify.0.topic_urn`, `policy_config`, `engine_type`, `public_ip_list`, `start_time`. It is generally recommended running **terraform plan** after importing a job. You can then decide if changes should be applied to the job, or the resource definition should be updated to align with the job. Also you can ignore changes as below. hcl resource "huaweicloud_drs_job" "test" { * * ... * * lifecycle { * * ignore_changes = [ * * source_db.0.password, destination_db.0.password, action, * * ] * * } } */ class Job extends pulumi.CustomResource { /** * Get an existing Job 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 Job(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Job. 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'] === Job.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["action"] = state ? state.action : undefined; resourceInputs["alarmNotify"] = state ? state.alarmNotify : undefined; resourceInputs["autoRenew"] = state ? state.autoRenew : undefined; resourceInputs["chargingMode"] = state ? state.chargingMode : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["databases"] = state ? state.databases : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["destinationDb"] = state ? state.destinationDb : undefined; resourceInputs["destinationDbReadnoly"] = state ? state.destinationDbReadnoly : undefined; resourceInputs["direction"] = state ? state.direction : undefined; resourceInputs["engineType"] = state ? state.engineType : undefined; resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined; resourceInputs["expiredDays"] = state ? state.expiredDays : undefined; resourceInputs["forceDestroy"] = state ? state.forceDestroy : undefined; resourceInputs["isOpenFastClean"] = state ? state.isOpenFastClean : undefined; resourceInputs["isSyncReEdit"] = state ? state.isSyncReEdit : undefined; resourceInputs["limitSpeeds"] = state ? state.limitSpeeds : undefined; resourceInputs["masterAz"] = state ? state.masterAz : undefined; resourceInputs["masterJobId"] = state ? state.masterJobId : undefined; resourceInputs["migrateDefiner"] = state ? state.migrateDefiner : undefined; resourceInputs["migrationType"] = state ? state.migrationType : undefined; resourceInputs["multiWrite"] = state ? state.multiWrite : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["netType"] = state ? state.netType : undefined; resourceInputs["nodeType"] = state ? state.nodeType : undefined; resourceInputs["orderId"] = state ? state.orderId : undefined; resourceInputs["originalJobDirection"] = state ? state.originalJobDirection : undefined; resourceInputs["pauseMode"] = state ? state.pauseMode : undefined; resourceInputs["period"] = state ? state.period : undefined; resourceInputs["periodUnit"] = state ? state.periodUnit : undefined; resourceInputs["policyConfig"] = state ? state.policyConfig : undefined; resourceInputs["privateIp"] = state ? state.privateIp : undefined; resourceInputs["progress"] = state ? state.progress : undefined; resourceInputs["publicIp"] = state ? state.publicIp : undefined; resourceInputs["publicIpLists"] = state ? state.publicIpLists : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["securityGroupId"] = state ? state.securityGroupId : undefined; resourceInputs["slaveAz"] = state ? state.slaveAz : undefined; resourceInputs["slaveJobId"] = state ? state.slaveJobId : undefined; resourceInputs["sourceDb"] = state ? state.sourceDb : undefined; resourceInputs["startTime"] = state ? state.startTime : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["subnetId"] = state ? state.subnetId : undefined; resourceInputs["tables"] = state ? state.tables : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; resourceInputs["vpcId"] = state ? state.vpcId : undefined; } else { const args = argsOrState; if ((!args || args.destinationDb === undefined) && !opts.urn) { throw new Error("Missing required property 'destinationDb'"); } if ((!args || args.direction === undefined) && !opts.urn) { throw new Error("Missing required property 'direction'"); } if ((!args || args.engineType === undefined) && !opts.urn) { throw new Error("Missing required property 'engineType'"); } if ((!args || args.sourceDb === undefined) && !opts.urn) { throw new Error("Missing required property 'sourceDb'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["action"] = args ? args.action : undefined; resourceInputs["alarmNotify"] = args ? args.alarmNotify : undefined; resourceInputs["autoRenew"] = args ? args.autoRenew : undefined; resourceInputs["chargingMode"] = args ? args.chargingMode : undefined; resourceInputs["databases"] = args ? args.databases : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["destinationDb"] = args ? args.destinationDb : undefined; resourceInputs["destinationDbReadnoly"] = args ? args.destinationDbReadnoly : undefined; resourceInputs["direction"] = args ? args.direction : undefined; resourceInputs["engineType"] = args ? args.engineType : undefined; resourceInputs["enterpriseProjectId"] = args ? args.enterpriseProjectId : undefined; resourceInputs["expiredDays"] = args ? args.expiredDays : undefined; resourceInputs["forceDestroy"] = args ? args.forceDestroy : undefined; resourceInputs["isOpenFastClean"] = args ? args.isOpenFastClean : undefined; resourceInputs["isSyncReEdit"] = args ? args.isSyncReEdit : undefined; resourceInputs["limitSpeeds"] = args ? args.limitSpeeds : undefined; resourceInputs["masterAz"] = args ? args.masterAz : undefined; resourceInputs["migrateDefiner"] = args ? args.migrateDefiner : undefined; resourceInputs["migrationType"] = args ? args.migrationType : undefined; resourceInputs["multiWrite"] = args ? args.multiWrite : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["netType"] = args ? args.netType : undefined; resourceInputs["nodeType"] = args ? args.nodeType : undefined; resourceInputs["pauseMode"] = args ? args.pauseMode : undefined; resourceInputs["period"] = args ? args.period : undefined; resourceInputs["periodUnit"] = args ? args.periodUnit : undefined; resourceInputs["policyConfig"] = args ? args.policyConfig : undefined; resourceInputs["publicIpLists"] = args ? args.publicIpLists : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["slaveAz"] = args ? args.slaveAz : undefined; resourceInputs["sourceDb"] = args ? args.sourceDb : undefined; resourceInputs["startTime"] = args ? args.startTime : undefined; resourceInputs["tables"] = args ? args.tables : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["masterJobId"] = undefined /*out*/; resourceInputs["orderId"] = undefined /*out*/; resourceInputs["originalJobDirection"] = undefined /*out*/; resourceInputs["privateIp"] = undefined /*out*/; resourceInputs["progress"] = undefined /*out*/; resourceInputs["publicIp"] = undefined /*out*/; resourceInputs["securityGroupId"] = undefined /*out*/; resourceInputs["slaveJobId"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["subnetId"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Job.__pulumiType, name, resourceInputs, opts); } } exports.Job = Job; /** @internal */ Job.__pulumiType = 'huaweicloud:Drs/job:Job'; //# sourceMappingURL=job.js.map