@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
193 lines • 11 kB
JavaScript
;
// *** 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.LoadbalancerCopy = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a Dedicated load balancer copy resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const loadbalancerId = config.requireObject("loadbalancerId");
* const ipv4SubnetId = config.requireObject("ipv4SubnetId");
* const ipv6NetworkId = config.requireObject("ipv6NetworkId");
* const backendSubnetId = config.requireObject("backendSubnetId");
* const l4FlavorId = config.requireObject("l4FlavorId");
* const l7FlavorId = config.requireObject("l7FlavorId");
* const ipv6BandwidthId = config.requireObject("ipv6BandwidthId");
* const test = new huaweicloud.dedicatedelb.LoadbalancerCopy("test", {
* loadbalancerId: loadbalancerId,
* availabilityZones: [
* "cn-north-4a",
* "cn-north-4b",
* ],
* ipv4SubnetId: ipv4SubnetId,
* ipv4Address: "192.168.0.216",
* ipv6NetworkId: ipv6NetworkId,
* ipv6Address: "2407:c080:1200:2a02:34e6:8059:ce7f:1add",
* backendSubnets: [backendSubnetId],
* l4FlavorId: l4FlavorId,
* l7FlavorId: l7FlavorId,
* reusePool: "true",
* description: "test elb description",
* ipv6BandwidthId: ipv6BandwidthId,
* crossVpcBackend: "true",
* protectionStatus: "consoleProtection",
* protectionReason: "test protection reason",
* deletionProtectionEnable: "true",
* wafFailureAction: "discard",
* });
* ```
*
* ## Import
*
* The ELB load balancer copy can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:DedicatedElb/loadbalancerCopy:LoadbalancerCopy 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`loadbalancer_id`, `ipv6_bandwidth_id`, `deletion_protection_enable`, `reuse_pool`,
*
* `period_unit`, `period`, `auto_renew` and `force_delete`. It is generally recommended running `terraform plan` after importing a load balancer copy. You can then decide if changes should be applied to the load balancer copy, or the resource definition should be updated to align with the load balancer. Also you can ignore changes as below. hcl resource "huaweicloud_elb_loadbalancer_copy" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* loadbalancer_id, ipv6_bandwidth_id, deletion_protection_enable, reuse_pool, period_unit, period, auto_renew,
*
* force_delete,
*
* ]
*
* } }
*/
class LoadbalancerCopy extends pulumi.CustomResource {
/**
* Get an existing LoadbalancerCopy 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 LoadbalancerCopy(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of LoadbalancerCopy. 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'] === LoadbalancerCopy.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["autoRenew"] = state ? state.autoRenew : undefined;
resourceInputs["availabilityZones"] = state ? state.availabilityZones : undefined;
resourceInputs["backendSubnets"] = state ? state.backendSubnets : undefined;
resourceInputs["chargeMode"] = state ? state.chargeMode : undefined;
resourceInputs["chargingMode"] = state ? state.chargingMode : undefined;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["crossVpcBackend"] = state ? state.crossVpcBackend : undefined;
resourceInputs["deletionProtectionEnable"] = state ? state.deletionProtectionEnable : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["elbVirsubnetType"] = state ? state.elbVirsubnetType : undefined;
resourceInputs["enableForceNew"] = state ? state.enableForceNew : undefined;
resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined;
resourceInputs["forceDelete"] = state ? state.forceDelete : undefined;
resourceInputs["frozenScene"] = state ? state.frozenScene : undefined;
resourceInputs["gwFlavorId"] = state ? state.gwFlavorId : undefined;
resourceInputs["ipv4Address"] = state ? state.ipv4Address : undefined;
resourceInputs["ipv4PortId"] = state ? state.ipv4PortId : undefined;
resourceInputs["ipv4SubnetId"] = state ? state.ipv4SubnetId : undefined;
resourceInputs["ipv6Address"] = state ? state.ipv6Address : undefined;
resourceInputs["ipv6BandwidthId"] = state ? state.ipv6BandwidthId : undefined;
resourceInputs["ipv6NetworkId"] = state ? state.ipv6NetworkId : undefined;
resourceInputs["l4FlavorId"] = state ? state.l4FlavorId : undefined;
resourceInputs["l7FlavorId"] = state ? state.l7FlavorId : undefined;
resourceInputs["loadbalancerId"] = state ? state.loadbalancerId : undefined;
resourceInputs["loadbalancerType"] = state ? state.loadbalancerType : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["operatingStatus"] = state ? state.operatingStatus : undefined;
resourceInputs["period"] = state ? state.period : undefined;
resourceInputs["periodUnit"] = state ? state.periodUnit : undefined;
resourceInputs["protectionReason"] = state ? state.protectionReason : undefined;
resourceInputs["protectionStatus"] = state ? state.protectionStatus : undefined;
resourceInputs["publicBorderGroup"] = state ? state.publicBorderGroup : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["reusePool"] = state ? state.reusePool : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
resourceInputs["vpcId"] = state ? state.vpcId : undefined;
resourceInputs["wafFailureAction"] = state ? state.wafFailureAction : undefined;
}
else {
const args = argsOrState;
if ((!args || args.loadbalancerId === undefined) && !opts.urn) {
throw new Error("Missing required property 'loadbalancerId'");
}
resourceInputs["autoRenew"] = args ? args.autoRenew : undefined;
resourceInputs["availabilityZones"] = args ? args.availabilityZones : undefined;
resourceInputs["backendSubnets"] = args ? args.backendSubnets : undefined;
resourceInputs["chargingMode"] = args ? args.chargingMode : undefined;
resourceInputs["crossVpcBackend"] = args ? args.crossVpcBackend : undefined;
resourceInputs["deletionProtectionEnable"] = args ? args.deletionProtectionEnable : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["enableForceNew"] = args ? args.enableForceNew : undefined;
resourceInputs["enterpriseProjectId"] = args ? args.enterpriseProjectId : undefined;
resourceInputs["forceDelete"] = args ? args.forceDelete : undefined;
resourceInputs["ipv4Address"] = args ? args.ipv4Address : undefined;
resourceInputs["ipv4SubnetId"] = args ? args.ipv4SubnetId : undefined;
resourceInputs["ipv6Address"] = args ? args.ipv6Address : undefined;
resourceInputs["ipv6BandwidthId"] = args ? args.ipv6BandwidthId : undefined;
resourceInputs["ipv6NetworkId"] = args ? args.ipv6NetworkId : undefined;
resourceInputs["l4FlavorId"] = args ? args.l4FlavorId : undefined;
resourceInputs["l7FlavorId"] = args ? args.l7FlavorId : undefined;
resourceInputs["loadbalancerId"] = args ? args.loadbalancerId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["period"] = args ? args.period : undefined;
resourceInputs["periodUnit"] = args ? args.periodUnit : undefined;
resourceInputs["protectionReason"] = args ? args.protectionReason : undefined;
resourceInputs["protectionStatus"] = args ? args.protectionStatus : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["reusePool"] = args ? args.reusePool : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["wafFailureAction"] = args ? args.wafFailureAction : undefined;
resourceInputs["chargeMode"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["elbVirsubnetType"] = undefined /*out*/;
resourceInputs["frozenScene"] = undefined /*out*/;
resourceInputs["gwFlavorId"] = undefined /*out*/;
resourceInputs["ipv4PortId"] = undefined /*out*/;
resourceInputs["loadbalancerType"] = undefined /*out*/;
resourceInputs["operatingStatus"] = undefined /*out*/;
resourceInputs["publicBorderGroup"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
resourceInputs["vpcId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LoadbalancerCopy.__pulumiType, name, resourceInputs, opts);
}
}
exports.LoadbalancerCopy = LoadbalancerCopy;
/** @internal */
LoadbalancerCopy.__pulumiType = 'huaweicloud:DedicatedElb/loadbalancerCopy:LoadbalancerCopy';
//# sourceMappingURL=loadbalancerCopy.js.map