UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

171 lines 6.44 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.EscloudIpWhiteList = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage escloud ip white list * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * description: "tfdesc", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooEscloudInstanceV2 = new volcengine.escloud_v2.EscloudInstanceV2("fooEscloudInstanceV2", { * instanceName: "acc-test-escloud-instance", * version: "V7_10", * zoneIds: [ * fooZones.then(fooZones => fooZones.zones?.[0]?.id), * fooZones.then(fooZones => fooZones.zones?.[1]?.id), * fooZones.then(fooZones => fooZones.zones?.[2]?.id), * ], * subnetId: fooSubnet.id, * enableHttps: false, * adminPassword: "Password@@123", * chargeType: "PostPaid", * autoRenew: false, * period: 1, * configurationCode: "es.standard", * enablePureMaster: true, * deletionProtection: false, * projectName: "default", * nodeSpecsAssigns: [ * { * type: "Master", * number: 3, * resourceSpecName: "es.x2.medium", * storageSpecName: "es.volume.essd.pl0", * storageSize: 20, * }, * { * type: "Hot", * number: 6, * resourceSpecName: "es.x2.medium", * storageSpecName: "es.volume.essd.flexpl-standard", * storageSize: 500, * extraPerformance: { * throughput: 65, * }, * }, * { * type: "Kibana", * number: 1, * resourceSpecName: "kibana.x2.small", * storageSpecName: "", * storageSize: 0, * }, * ], * networkSpecs: [ * { * type: "Elasticsearch", * bandwidth: 1, * isOpen: true, * specName: "es.eip.bgp_fixed_bandwidth", * }, * { * type: "Kibana", * bandwidth: 1, * isOpen: true, * specName: "es.eip.bgp_fixed_bandwidth", * }, * ], * tags: [{ * key: "k1", * value: "v1", * }], * }); * const fooEscloudIpWhiteList = new volcengine.escloud_v2.EscloudIpWhiteList("fooEscloudIpWhiteList", { * instanceId: fooEscloudInstanceV2.id, * type: "public", * component: "es", * ipLists: [ * "172.16.0.10", * "172.16.0.11", * "172.16.0.12", * ], * }); * ``` * * ## Import * * EscloudIpWhiteList can be imported using the instance_id:type:component, e.g. * * ```sh * $ pulumi import volcengine:escloud_v2/escloudIpWhiteList:EscloudIpWhiteList default resource_id * ``` */ class EscloudIpWhiteList extends pulumi.CustomResource { /** * Get an existing EscloudIpWhiteList 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 EscloudIpWhiteList(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of EscloudIpWhiteList. 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'] === EscloudIpWhiteList.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["component"] = state ? state.component : undefined; resourceInputs["instanceId"] = state ? state.instanceId : undefined; resourceInputs["ipLists"] = state ? state.ipLists : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.component === undefined) && !opts.urn) { throw new Error("Missing required property 'component'"); } if ((!args || args.instanceId === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } if ((!args || args.ipLists === undefined) && !opts.urn) { throw new Error("Missing required property 'ipLists'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["component"] = args ? args.component : undefined; resourceInputs["instanceId"] = args ? args.instanceId : undefined; resourceInputs["ipLists"] = args ? args.ipLists : undefined; resourceInputs["type"] = args ? args.type : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EscloudIpWhiteList.__pulumiType, name, resourceInputs, opts); } } exports.EscloudIpWhiteList = EscloudIpWhiteList; /** @internal */ EscloudIpWhiteList.__pulumiType = 'volcengine:escloud_v2/escloudIpWhiteList:EscloudIpWhiteList'; //# sourceMappingURL=escloudIpWhiteList.js.map