@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
113 lines • 5.2 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.Zone = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage dns zone
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.dns.Zone("foo", {
* projectName: "default",
* remark: "xxx",
* tags: [{
* key: "xx",
* value: "xx",
* }],
* zoneName: "xxxx.com",
* });
* ```
*
* ## Import
*
* Zone can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:dns/zone:Zone default resource_id
* ```
*/
class Zone extends pulumi.CustomResource {
/**
* Get an existing Zone 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 Zone(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Zone. 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'] === Zone.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allocateDnsServerLists"] = state ? state.allocateDnsServerLists : undefined;
resourceInputs["autoRenew"] = state ? state.autoRenew : undefined;
resourceInputs["dnsSecurity"] = state ? state.dnsSecurity : undefined;
resourceInputs["expiredTime"] = state ? state.expiredTime : undefined;
resourceInputs["instanceNo"] = state ? state.instanceNo : undefined;
resourceInputs["isNsCorrect"] = state ? state.isNsCorrect : undefined;
resourceInputs["isSubDomain"] = state ? state.isSubDomain : undefined;
resourceInputs["projectName"] = state ? state.projectName : undefined;
resourceInputs["realDnsServerLists"] = state ? state.realDnsServerLists : undefined;
resourceInputs["recordCount"] = state ? state.recordCount : undefined;
resourceInputs["remark"] = state ? state.remark : undefined;
resourceInputs["stage"] = state ? state.stage : undefined;
resourceInputs["subDomainHost"] = state ? state.subDomainHost : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tradeCode"] = state ? state.tradeCode : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
resourceInputs["zid"] = state ? state.zid : undefined;
resourceInputs["zoneName"] = state ? state.zoneName : undefined;
}
else {
const args = argsOrState;
if ((!args || args.zoneName === undefined) && !opts.urn) {
throw new Error("Missing required property 'zoneName'");
}
resourceInputs["projectName"] = args ? args.projectName : undefined;
resourceInputs["remark"] = args ? args.remark : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["zoneName"] = args ? args.zoneName : undefined;
resourceInputs["allocateDnsServerLists"] = undefined /*out*/;
resourceInputs["autoRenew"] = undefined /*out*/;
resourceInputs["dnsSecurity"] = undefined /*out*/;
resourceInputs["expiredTime"] = undefined /*out*/;
resourceInputs["instanceNo"] = undefined /*out*/;
resourceInputs["isNsCorrect"] = undefined /*out*/;
resourceInputs["isSubDomain"] = undefined /*out*/;
resourceInputs["realDnsServerLists"] = undefined /*out*/;
resourceInputs["recordCount"] = undefined /*out*/;
resourceInputs["stage"] = undefined /*out*/;
resourceInputs["subDomainHost"] = undefined /*out*/;
resourceInputs["tradeCode"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
resourceInputs["zid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Zone.__pulumiType, name, resourceInputs, opts);
}
}
exports.Zone = Zone;
/** @internal */
Zone.__pulumiType = 'volcengine:dns/zone:Zone';
//# sourceMappingURL=zone.js.map