@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
115 lines • 5.16 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.Record = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage dns record
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.dns.Record("foo", {
* host: "a.com",
* type: "A",
* value: "1.1.1.2",
* zid: 58846,
* });
* ```
*
* ## Import
*
* DnsRecord can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:dns/record:Record default ZID:recordId
* ```
*/
class Record extends pulumi.CustomResource {
/**
* Get an existing Record 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 Record(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Record. 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'] === Record.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["enable"] = state ? state.enable : undefined;
resourceInputs["host"] = state ? state.host : undefined;
resourceInputs["line"] = state ? state.line : undefined;
resourceInputs["operators"] = state ? state.operators : undefined;
resourceInputs["pqdn"] = state ? state.pqdn : undefined;
resourceInputs["recordId"] = state ? state.recordId : undefined;
resourceInputs["recordSetId"] = state ? state.recordSetId : undefined;
resourceInputs["remark"] = state ? state.remark : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["ttl"] = state ? state.ttl : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
resourceInputs["value"] = state ? state.value : undefined;
resourceInputs["weight"] = state ? state.weight : undefined;
resourceInputs["zid"] = state ? state.zid : undefined;
}
else {
const args = argsOrState;
if ((!args || args.host === undefined) && !opts.urn) {
throw new Error("Missing required property 'host'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
if ((!args || args.value === undefined) && !opts.urn) {
throw new Error("Missing required property 'value'");
}
if ((!args || args.zid === undefined) && !opts.urn) {
throw new Error("Missing required property 'zid'");
}
resourceInputs["host"] = args ? args.host : undefined;
resourceInputs["line"] = args ? args.line : undefined;
resourceInputs["remark"] = args ? args.remark : undefined;
resourceInputs["ttl"] = args ? args.ttl : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["value"] = args ? args.value : undefined;
resourceInputs["weight"] = args ? args.weight : undefined;
resourceInputs["zid"] = args ? args.zid : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["enable"] = undefined /*out*/;
resourceInputs["operators"] = undefined /*out*/;
resourceInputs["pqdn"] = undefined /*out*/;
resourceInputs["recordId"] = undefined /*out*/;
resourceInputs["recordSetId"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Record.__pulumiType, name, resourceInputs, opts);
}
}
exports.Record = Record;
/** @internal */
Record.__pulumiType = 'volcengine:dns/record:Record';
//# sourceMappingURL=record.js.map