@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
88 lines • 3.45 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.IpList = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* (Deprecated! Recommend use volcengine_rds_mysql_*** replace) Provides a resource to manage rds ip list
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.rds.IpList("foo", {
* groupName: "foo",
* instanceId: "mysql-0fdd3bab2e7c",
* ipLists: [
* "1.1.1.1",
* "2.2.2.2",
* ],
* });
* ```
*
* ## Import
*
* RDSIPList can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:rds/ipList:IpList default mysql-42b38c769c4b:group_name
* ```
*/
class IpList extends pulumi.CustomResource {
/**
* Get an existing IpList 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 IpList(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of IpList. 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'] === IpList.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["groupName"] = state ? state.groupName : undefined;
resourceInputs["instanceId"] = state ? state.instanceId : undefined;
resourceInputs["ipLists"] = state ? state.ipLists : undefined;
}
else {
const args = argsOrState;
if ((!args || args.groupName === undefined) && !opts.urn) {
throw new Error("Missing required property 'groupName'");
}
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'");
}
resourceInputs["groupName"] = args ? args.groupName : undefined;
resourceInputs["instanceId"] = args ? args.instanceId : undefined;
resourceInputs["ipLists"] = args ? args.ipLists : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(IpList.__pulumiType, name, resourceInputs, opts);
}
}
exports.IpList = IpList;
/** @internal */
IpList.__pulumiType = 'volcengine:rds/ipList:IpList';
//# sourceMappingURL=ipList.js.map