UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

106 lines 4.26 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.PrefixList = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage vpc prefix list * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.vpc.PrefixList("foo", { * description: "acc test description", * ipVersion: "IPv4", * maxEntries: 7, * prefixListEntries: [ * { * cidr: "192.168.4.0/28", * description: "acc-test-1", * }, * { * cidr: "192.168.9.0/28", * description: "acc-test-4", * }, * { * cidr: "192.168.8.0/28", * description: "acc-test-5", * }, * ], * prefixListName: "acc-test-prefix", * tags: [{ * key: "tf-key1", * value: "tf-value1", * }], * }); * ``` * * ## Import * * VpcPrefixList can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:vpc/prefixList:PrefixList default resource_id * ``` */ class PrefixList extends pulumi.CustomResource { /** * Get an existing PrefixList 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 PrefixList(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PrefixList. 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'] === PrefixList.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["ipVersion"] = state ? state.ipVersion : undefined; resourceInputs["maxEntries"] = state ? state.maxEntries : undefined; resourceInputs["prefixListAssociations"] = state ? state.prefixListAssociations : undefined; resourceInputs["prefixListEntries"] = state ? state.prefixListEntries : undefined; resourceInputs["prefixListName"] = state ? state.prefixListName : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; if ((!args || args.maxEntries === undefined) && !opts.urn) { throw new Error("Missing required property 'maxEntries'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["ipVersion"] = args ? args.ipVersion : undefined; resourceInputs["maxEntries"] = args ? args.maxEntries : undefined; resourceInputs["prefixListEntries"] = args ? args.prefixListEntries : undefined; resourceInputs["prefixListName"] = args ? args.prefixListName : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["prefixListAssociations"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PrefixList.__pulumiType, name, resourceInputs, opts); } } exports.PrefixList = PrefixList; /** @internal */ PrefixList.__pulumiType = 'volcengine:vpc/prefixList:PrefixList'; //# sourceMappingURL=prefixList.js.map