@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
107 lines • 5.75 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.VpcPublicGatewayDhcp = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Creates and manages Scaleway VPC Public Gateway DHCP.
* For more information, see [the documentation](https://developers.scaleway.com/en/products/vpc-gw/api/v1/#dhcp-c05544).
*
* ## Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const main = new scaleway.VpcPublicGatewayDhcp("main", {subnet: "192.168.1.0/24"});
* ```
*
* ## Import
*
* Public gateway DHCP config can be imported using the `{zone}/{id}`, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/vpcPublicGatewayDhcp:VpcPublicGatewayDhcp main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
class VpcPublicGatewayDhcp extends pulumi.CustomResource {
/**
* Get an existing VpcPublicGatewayDhcp 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 VpcPublicGatewayDhcp(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of VpcPublicGatewayDhcp. 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'] === VpcPublicGatewayDhcp.__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);
super(VpcPublicGatewayDhcp.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcPublicGatewayDhcp = VpcPublicGatewayDhcp;
/** @internal */
VpcPublicGatewayDhcp.__pulumiType = 'scaleway:index/vpcPublicGatewayDhcp:VpcPublicGatewayDhcp';
//# sourceMappingURL=vpcPublicGatewayDhcp.js.map