UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

115 lines 6.22 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.PublicGatewayDhcp = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * > **Important:** The resource `scaleway.network.PublicGatewayDhcp` has been deprecated and will no longer be supported. * In 2023, DHCP functionality was moved from Public Gateways to Private Networks, DHCP resources are now no longer needed. * For more information, please refer to the dedicated guide. * * Creates and manages Scaleway VPC Public Gateway DHCP configurations. * For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#dhcp-c05544). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.network.PublicGatewayDhcp("main", {subnet: "192.168.1.0/24"}); * ``` * * ## Import * * Public Gateway DHCP configuration can be imported using `{zone}/{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:network/publicGatewayDhcp:PublicGatewayDhcp main fr-par-1/11111111-1111-1111-1111-111111111111 * ``` */ class PublicGatewayDhcp extends pulumi.CustomResource { /** * Get an existing PublicGatewayDhcp 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 PublicGatewayDhcp(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PublicGatewayDhcp. 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'] === PublicGatewayDhcp.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state ? state.address : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["dnsLocalName"] = state ? state.dnsLocalName : undefined; resourceInputs["dnsSearches"] = state ? state.dnsSearches : undefined; resourceInputs["dnsServersOverrides"] = state ? state.dnsServersOverrides : undefined; resourceInputs["enableDynamic"] = state ? state.enableDynamic : undefined; resourceInputs["organizationId"] = state ? state.organizationId : undefined; resourceInputs["poolHigh"] = state ? state.poolHigh : undefined; resourceInputs["poolLow"] = state ? state.poolLow : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["pushDefaultRoute"] = state ? state.pushDefaultRoute : undefined; resourceInputs["pushDnsServer"] = state ? state.pushDnsServer : undefined; resourceInputs["rebindTimer"] = state ? state.rebindTimer : undefined; resourceInputs["renewTimer"] = state ? state.renewTimer : undefined; resourceInputs["subnet"] = state ? state.subnet : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; resourceInputs["validLifetime"] = state ? state.validLifetime : undefined; resourceInputs["zone"] = state ? state.zone : undefined; } else { const args = argsOrState; if ((!args || args.subnet === undefined) && !opts.urn) { throw new Error("Missing required property 'subnet'"); } resourceInputs["address"] = args ? args.address : undefined; resourceInputs["dnsLocalName"] = args ? args.dnsLocalName : undefined; resourceInputs["dnsSearches"] = args ? args.dnsSearches : undefined; resourceInputs["dnsServersOverrides"] = args ? args.dnsServersOverrides : undefined; resourceInputs["enableDynamic"] = args ? args.enableDynamic : undefined; resourceInputs["poolHigh"] = args ? args.poolHigh : undefined; resourceInputs["poolLow"] = args ? args.poolLow : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["pushDefaultRoute"] = args ? args.pushDefaultRoute : undefined; resourceInputs["pushDnsServer"] = args ? args.pushDnsServer : undefined; resourceInputs["rebindTimer"] = args ? args.rebindTimer : undefined; resourceInputs["renewTimer"] = args ? args.renewTimer : undefined; resourceInputs["subnet"] = args ? args.subnet : undefined; resourceInputs["validLifetime"] = args ? args.validLifetime : undefined; resourceInputs["zone"] = args ? args.zone : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["organizationId"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "scaleway:index/vpcPublicGatewayDhcp:VpcPublicGatewayDhcp" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(PublicGatewayDhcp.__pulumiType, name, resourceInputs, opts); } } exports.PublicGatewayDhcp = PublicGatewayDhcp; /** @internal */ PublicGatewayDhcp.__pulumiType = 'scaleway:network/publicGatewayDhcp:PublicGatewayDhcp'; //# sourceMappingURL=publicGatewayDhcp.js.map