@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
136 lines • 6.59 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublicGatewayDhcp = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(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.
*
* ```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, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'scaleway:network/publicGatewayDhcp:PublicGatewayDhcp';
/**
* 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?.address;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["dnsLocalName"] = state?.dnsLocalName;
resourceInputs["dnsSearches"] = state?.dnsSearches;
resourceInputs["dnsServersOverrides"] = state?.dnsServersOverrides;
resourceInputs["enableDynamic"] = state?.enableDynamic;
resourceInputs["organizationId"] = state?.organizationId;
resourceInputs["poolHigh"] = state?.poolHigh;
resourceInputs["poolLow"] = state?.poolLow;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["pushDefaultRoute"] = state?.pushDefaultRoute;
resourceInputs["pushDnsServer"] = state?.pushDnsServer;
resourceInputs["rebindTimer"] = state?.rebindTimer;
resourceInputs["renewTimer"] = state?.renewTimer;
resourceInputs["subnet"] = state?.subnet;
resourceInputs["updatedAt"] = state?.updatedAt;
resourceInputs["validLifetime"] = state?.validLifetime;
resourceInputs["zone"] = state?.zone;
}
else {
const args = argsOrState;
if (args?.subnet === undefined && !opts.urn) {
throw new Error("Missing required property 'subnet'");
}
resourceInputs["address"] = args?.address;
resourceInputs["dnsLocalName"] = args?.dnsLocalName;
resourceInputs["dnsSearches"] = args?.dnsSearches;
resourceInputs["dnsServersOverrides"] = args?.dnsServersOverrides;
resourceInputs["enableDynamic"] = args?.enableDynamic;
resourceInputs["poolHigh"] = args?.poolHigh;
resourceInputs["poolLow"] = args?.poolLow;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["pushDefaultRoute"] = args?.pushDefaultRoute;
resourceInputs["pushDnsServer"] = args?.pushDnsServer;
resourceInputs["rebindTimer"] = args?.rebindTimer;
resourceInputs["renewTimer"] = args?.renewTimer;
resourceInputs["subnet"] = args?.subnet;
resourceInputs["validLifetime"] = args?.validLifetime;
resourceInputs["zone"] = args?.zone;
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;
//# sourceMappingURL=publicGatewayDhcp.js.map